예제 #1
0
        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());
        }
예제 #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            etudiant          et = Dataform.CurrentItem as etudiant;
            EtudiantOperation f  = new EtudiantOperation();

            f.modifier(et);
        }
예제 #3
0
        //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();
        }
예제 #4
0
        //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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        //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);
        }
예제 #7
0
 private void detach_etudiant(etudiant entity)
 {
     this.SendPropertyChanging();
     entity.filiere = null;
 }
예제 #8
0
 private void attach_etudiant(etudiant entity)
 {
     this.SendPropertyChanging();
     entity.filiere = this;
 }
예제 #9
0
 partial void Deleteetudiant(etudiant instance);
예제 #10
0
 partial void Updateetudiant(etudiant instance);
예제 #11
0
 partial void Insertetudiant(etudiant instance);