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

 > 

La gestion de mouvement des abonnées au sein d'une station-service cas de la station koweit service


par Michel PALUKU WAKITIKIRA
Institut supérieur d'informatique et de gestion - Graduat 2012
  

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

III.7.1. QUELQUES INTERFACES

· MENU PRINCIPALE

· MENU ABONNE

' connection avec la base de donne

Private Sub Chargement_Form()

Set Cx = New ADODB.Connection

Cx.Provider = "Microsoft.jet.Oledb.4.0"

Cx.ConnectionString = App.Path & "\GMA12.mdb"

Cx.Open

StringReq = "SELECT TClients.Id_Abonne,TClients.Nom_Abonne,TClients.Adresse_Abonne,TClients.Telephone_Abonne,TClients.Email_Abonne,TClients.Plaque_Vehicule_Abonne FROM TClients;"

Set RC = New ADODB.Recordset

RC.Open StringReq, Cx, adOpenDynamic, adLockOptimistic

End Sub

' l'activation de form

Private Sub Activation_Form()

StringRequet = "SELECT TClients.Id_Abonne FROM TClients;"

Set rs = New ADODB.Recordset

rs.Open StringRequet, Cx, adOpenDynamic, adLockOptimistic

cboNom.Clear

Do Until rs.EOF

cboNom.AddItem rs!Id_Abonne

rs.MoveNext

Loop

End Sub

NB : Si Administrateur le bouton Modifier et Supprimer sont actives, sinon (autres utilisateur) ils ne sont pas actifs

· 'BOUTON ENREGISTRER

Private Sub cmdEnregistrer_Click()

If txtPnomAgent.Text = "" Then

MsgBox "Vous devez saisir le Matricule svp !!", vbExclamation, "Enregistrement"

txtPnomAgent.SetFocus

Exit Sub

End If

RC.Find "Date_Vente=" & "'" & txtPnomAgent.Text & "'"

If RC.EOF Then

Cx.Execute ("INSERT INTO Tvente(Id_vente,Date_Vente,Id_Produit,Id_Abonne,Produit_vendu,Quantite_vendu,Prix_unitaire) VALUES('" & txtId_vente.Text & "','" & txtPnomAgent.Text & "','" & Combo_IdProduit.Text & "','" & Combo_IdAbonne.Text & "','" & txtNomAgent.Text & "','" & txtemail.Text & "','" & txtPrix_unitaire.Text & "')")

MsgBox "Un entregistrement effectue", vbInformation, "Enregistrement"

RC.MovePrevious

If RC.EOF Then

RC.MoveFirst

End If

txtId_vente.Text = RC!Id_vente

txtNomAgent.Text = RC!Produit_vendu

txtPnomAgent.Text = RC!Date_Vente

txtemail.Text = RC!Quantite_vendu

txtPrix_unitaire.Text = RC!Prix_unitaire

Combo_IdProduit.Text = RC!Id_Produit

Combo_IdAbonne.Text = RC!Id_Abonne

RC.Close

rs.Close

Call Chargement_Form

Call Activation_Form

Else

MsgBox "L'entregistrement existe", vbCritical, "Enregistrement"

txtId_vente.Text = RC!Id_vente

txtNomAgent.Text = RC!Produit_vendu

txtPnomAgent.Text = RC!Date_Vente

txtemail.Text = RC!Quantite_vendu

txtPrix_unitaire.Text = RC!Prix_unitaire

Combo_IdProduit.Text = RC!Id_Produit

Combo_IdAbonne.Text = RC!Id_Abonne

End If

End Sub

MENU VENTE

· MENU PRODUIT

'BOUTON RECHERCEH

Private Sub cmdRechercher_Click()

Dim Stringrep As String

Stringrep = InputBox("Saisie le matricule de l'agent recherche", "Rechercher agent")

If Stringrep = Empty Then

MsgBox "Vous n'avez rien saisie", vbCritical, "Recherche agent"

Exit Sub

End If

RC.MoveFirst

RC.Find "Id_Produit=" & "'" & Stringrep & "'"

Do While Not RC.EOF

If RC!Id_Produit = Stringrep Then

txtMatAgent.Text = Stringrep

Combo1.Text = RC!Designation_PRODUIT

txtPnomAgent.Text = RC!Unite_Produit

Exit Do

End If

RC.MoveNext

Loop

MsgBox "Matricule inexistant", vbInformation, "Echec de recherche"

Exit Sub

End Sub

· MENU VERIFICATION CREDIT

'RAPPORT INDIVIDUEL CREDIDT ABONNE

Private Sub cmdRapportIndiv_Click()

Set RC = New ADODB.Recordset

RC.Open "SELECT TCredit.Id_Enregistrer, TCredit.Id_Abonne,TCredit.Id_vente , TCredit.Nom_Abonne,TCredi.Designation_Produit,TCredit.Quantite_maximum,TCredit.Quantite_commander,TCredit.Quantite_consommer,TCredit.Quantite_restant,TCredit.Prix_unitaire,TCredit.Paiement_cash,TCredit.Avance,TCredit.Reste From TCredit where TCredit.Id_Enregistrer ='" & txtnumenreg.Text & "' ", Cx, adOpenDynamic, adLockReadOnly

If Not RC.EOF Then

Set DRESSAIE.DataSource = RC

DRverifi_unique.Show

End If

End Sub

'BOUTON SUIVANT

Private Sub cmdSuivant_Click()

RC.MoveNext `POUR PRECEDENT RC.MOVEPREVIOUS

If RC.EOF Then `If RC.BOF Then

RC.MoveLast `RC.MoveFirst

End If

txtnumenreg.Text = RC!Id_Enregistrer

Combo3.Text = RC!Id_Abonne

Combo4.Text = RC!Nom_Abonne_Abonne

Combo2.Text = RC!Id_Abonne

Text3.Text = RC!Quantite_consommer

txtqtecmd.Text = RC!Quantite_commander

txtrestant.Text = RC!Quantite_restant

Combo1.Text = RC!Quantite_maximum

Text5.Text = RC!Paiement_cash

Text6.Text = RC!Avance

Text8.Text = RC!Prix_unitaire

Combo2.Text = RC!Designation_PRODUIT

Text9.Text = RC!Reste

End Sub

· MENU APPROVISIONNEMENT

'BOUTON SUPPRIMER

Private Sub cmdSupprimer_Click()

If RC.RecordCount = 0 Then

MsgBox "Il n'ya plus d'enregistrement !!", vbExclamation, "Plus d'enregistrements"

Exit Sub

End If

Dim StringQst As String

StringQst = MsgBox("Voulez vous vraiment supprimer cet enregistrement ?", vbQuestion + vbYesNo, "Supprimer enregistrement")

If StringQst = vbYes Then

Cx.Execute ("DELETE FROM TApprovisionnement WHERE TApprovisionnement.Id_approv='" & txtMatAgent.Text & "'")

RC.MoveNext

If RC.EOF Then

RC.MoveLast

End If

txtMatAgent.Text = RC!Id_approv

txtNomAgent.Text = RC!Designation_PRODUIT

RC.Close

rs.Close

Call Chargement_Form

Call Activation_Form

End If

If StringQst = vbNo Then

MsgBox "Operation annulée", vbCritical, "Supprimer enregistrement"

Beep

End If

End Sub

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








"Je voudrais vivre pour étudier, non pas étudier pour vivre"   Francis Bacon