WOW !! MUCH LOVE ! SO WORLD PEACE !
Fond bitcoin pour l'amélioration du site: 1memzGeKS7CB3ECNkzSn2qHwxU6NZoJ8o
  Dogecoin (tips/pourboires): DCLoo9Dd4qECqpMLurdgGnaoqbftj16Nvp


Home | Publier un mémoire | Une page au hasard

 > 

Conception et réalisation d'un système informatisé pour la gestion de demandeurs d'emploi. Cas de ONEM/BDD.

( Télécharger le fichier original )
par Bellone Espoir NTEMBE TANKUY
ISC/BDD - Informatique de gestion 2015
  

précédent sommaire suivant

Bitcoin is a swarm of cyber hornets serving the goddess of wisdom, feeding on the fire of truth, exponentially growing ever smarter, faster, and stronger behind a wall of encrypted energy

D. Bouton Modifier/Ajouter

Private Sub CmdValider_Click()

On Error Resume Next

Set rs = New ADODB.Recordset

rs.Open "select * from Emploi", cn, 1, 2

'################################

If txtCod = "" Or txtDom = "" Or txtCat = "" Or txtLib = "" Then

MsgBox "Veuillez entrer toutes les informations nécessaires", vbInformation

Exit Sub

End If

'###############################

'---Modifier

Do While Not rs.EOF

If txtCod = rs.Fields(1) Then

msg = MsgBox("Cet emploi existe déjà, voulez-vous le modifier?", vbYesNo + vbQuestion)

'---

If msg = vbYes Then

rs!CodEmploi = txtCod.Text

rs!DomEmploi = txtDom.Text

rs!CatEmploi = txtCat.Text

rs!LibEmploi = txtLib.Text

rs.Update

MsgBox "Emploi modifié avec succès"

NTB

Exit Sub

Else

Exit Sub

End If

End If

rs.MoveNext

Loop

'---Ajouter

If txtCod <>rs.Fields(1) Then

ajout = MsgBox("Cet emploi n'existe pas, voulez-vous l'ajouter?", vbYesNo + vbQuestion)

If ajout = vbYes Then

rs.AddNew

rs!CodEmploi = txtCod.Text

rs!DomEmploi = txtDom.Text

rs!CatEmploi = txtCat.Text

rs!LibEmploi = txtLib.Text

rs.Update

MsgBox "Emploi ajouté avec succès", vbInformation

NTB

EffacerEmp

Exit Sub

Else

Exit Sub

End If

End If

End Sub

E. Bouton rechercher

Private Sub cmdrechercher_Click()

Set rs = New ADODB.Recordset

rs.Open "select * from Candidat where CIN like '" & TxtNumCan & "' or NomCan like '" & TxtNomCan & "' or PreCan like '" & TxtPrenCan & "' or SexeCan like '" & CmbSex & "' or Mobilité like '" & CmbMobil & "'", cn, 1, 2

If TxtNumCan = "" And CmbSex = "" And TxtNomCan = "" And TxtPrenCan = "" And CmbMobil = "" Then

MsgBox "Entrer au moins un critère de recherche"

Exit Sub

End If

If rs!CIN = "" Or rs!NomCan = "" Or rs!PreCan = "" Or rs!SexeCan = "" Or rs!Mobilité = "" Then

MsgBox "Il n'y a aucun candidat qui répond à ce critère de recherche"

Exit Sub

End If

MSFlexGrid1.Clear

MSFlexGrid2.Clear

MSFlexGrid3.Clear

MSFlexGrid4.Clear

MSFlexGrid5.Clear

Label11 = ""

Label12 = ""

MSFlexGrid1.FormatString = "CIN | Nom | Post-nom | Prénom "

MSFlexGrid1.Rows = 1

MSFlexGrid1.SelectionMode = flexSelectionByRow

MSFlexGrid1.AllowUserResizing = flexResizeBoth

Do While Not rs.EOF

MSFlexGrid1.AddItem rs.Fields(0) & vbTab & rs.Fields(1) & vbTab & rs.Fields(2) & vbTab & rs.Fields(3)

rs.MoveNext

TxtNumCan = ""

CmbSex = ""

TxtNomCan = ""

TxtPrenCan = ""

CmbMobil = ""

Loop

End Sub

F. Sauvegarde de la base de données

Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" _

(ByVal lpExistingFileName As String, ByVal lpNewFileName As String, _

ByVal bFailIfExists As Long) As Long

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

Frmmenu.Show

End Sub

Private Sub Label1_Click()

Unload Me

Frmmenu.Show

End Sub

Private Sub Label2_Click()

Dim Nouvfich As String

com1.DialogTitle = "Sauvgarder de la base de donnée"

com1.DefaultExt = ".MDB"

com1.FileName = "ONEM"

com1.Flags = &H1004

com1.Filter = "Base de données (*.mdb)|*.mdb"

On Error GoTo erreur

com1.ShowSave

Nouvfich = com1.FileName

CopyFile App.Path & "\ONEM.mdb", Nouvfich, False

MsgBox "La base de données a été bien sauvegardée", vbInformation + vbOKOnly, "ONEM.mdb"

erreur:

If Err = 32755 Then

Exit Sub

End If

End Sub

Private Sub Label3_Click()

Unload Me

End Sub

En ce qui concerne les interfaces correspondantes aux quelques codes présentés ci-haut, référez-vous aux annexes de la présente recherche.

précédent sommaire suivant






Bitcoin is a swarm of cyber hornets serving the goddess of wisdom, feeding on the fire of truth, exponentially growing ever smarter, faster, and stronger behind a wall of encrypted energy








"Il faut répondre au mal par la rectitude, au bien par le bien."   Confucius