private void Dataform_DeletingItem(object sender, System.ComponentModel.CancelEventArgs e) { etudiant et = Dataform.CurrentItem as etudiant; EtudiantOperation f = new EtudiantOperation(); f.Delete(et.cne.ToString()); }
private void Button_Click_1(object sender, RoutedEventArgs e) { etudiant et = Dataform.CurrentItem as etudiant; EtudiantOperation f = new EtudiantOperation(); f.modifier(et); }
//modifier public void modifier(etudiant etudiant) { var x = (from f in cl.etudiant where f.cne == etudiant.cne select f).SingleOrDefault(); x.nom = etudiant.nom; x.prenom = etudiant.prenom; x.dateNaiss = etudiant.dateNaiss; cl.SubmitChanges(); }
//ajouter public void ajouter(etudiant etudiant) { List <etudiant> Listeetudiant = new List <etudiant>(); etudiant f = new etudiant(); f.cne = etudiant.cne; f.nom = etudiant.nom; f.prenom = etudiant.prenom; f.dateNaiss = etudiant.dateNaiss; cl.etudiant.InsertOnSubmit(f); cl.SubmitChanges(); //Listeetudiant.Add(f); }
public List <etudiant> geAlleudiant() { List <etudiant> Listeetudiant = new List <etudiant>(); var x = from c in cl.etudiant select new { c.cne, c.nom, c.prenom, c.dateNaiss }; foreach (var y in x) { etudiant et = new etudiant(); et.cne = y.cne; et.nom = y.nom; et.prenom = y.prenom; et.dateNaiss = y.dateNaiss; Listeetudiant.Add(et); } return(Listeetudiant); }
//affiher les étudiants pour chaque filière public List <etudiant> getchaquefiliere(String v) { MainWindow ft = new MainWindow(); List <etudiant> Listeetudiant = new List <etudiant>(); var x = (from c in cl.etudiant join d in cl.filiere on c.id_filiere equals d.id_filiere where d.nom_filiere == v select new { c.cne, c.nom, c.prenom, c.dateNaiss, c.tof }); foreach (var y in x) { etudiant et = new etudiant(); et.cne = y.cne; et.nom = y.nom; et.prenom = y.prenom; et.dateNaiss = y.dateNaiss; et.tof = y.tof; Listeetudiant.Add(et); } return(Listeetudiant); }
private void detach_etudiant(etudiant entity) { this.SendPropertyChanging(); entity.filiere = null; }
private void attach_etudiant(etudiant entity) { this.SendPropertyChanging(); entity.filiere = this; }
partial void Deleteetudiant(etudiant instance);
partial void Updateetudiant(etudiant instance);
partial void Insertetudiant(etudiant instance);