Bonjour à tous!
Ce code me renvois un message" The method or operation are not implemented"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 private void btnajoutemploye_Click(object sender, EventArgs e) { EmployeControlleur ec = new EmployeControlleur(); EmployeInfo ei = new EmployeInfo(); bool result; ei.matricule = int.Parse(mat.Text); ei.nom = nom.Text; ei.prenom = pre.Text; ei.naissance = naiss.Text; ei.lieu = lieu.Text; ei.sexe = sex.Text; ei.situationfamille = stmat.Text; result = ec.ajoutemploye(ei); if (result == true) { MessageBox.Show("Opération effectuée avec succès..."); this.Close(); } else { MessageBox.Show("Erreur..."); }
voici la méthode que j'utilise:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 public bool ajoutemploye(EmployeInfo employe) { DataBaseHelper dh = new DataBaseHelper(); dh.ExecuteNonQuery("Insert into Employe values (" + employe.matricule + ",'" + employe.nom + ",'" + employe.prenom + ",'" + employe.naissance + ",'" + employe.lieu + ",'" + employe.sexe + ",'" + employe.situationfamille + ",'" + employe.personnecontact + ",'" + employe.idserv + "'," + employe.idstatut + ")"); return true;
quelqu'un peut il m'éclairer un peu plus,Merci!
Partager