예제 #1
0
        private void radButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                etudiant etud = new etudiant();
                etud = radform.CurrentItem as etudiant;

                var x = (from c in ListerFiliers.cl.etudiant where c.cne == etud.cne select c).Single();
                x.nom                 = etud.nom;
                x.prenom              = etud.prenom;
                x.adresse             = etud.adresse;
                x.date_naiss          = etud.date_naiss;
                x.sexe                = etud.sexe;
                x.telephone           = etud.telephone;
                x.Filiere.Nom_filiere = etud.Filiere.Nom_filiere;
                if (image != "" && image != null)
                {
                    x.image = image;
                }
                ListerFiliers.cl.SubmitChanges();
                MessageBox.Show("validated!");
            }
            catch (Exception ex)
            {
                MessageBox.Show("une erreu est survenue");
            }
        }
예제 #2
0
        private void search_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            etudiant filiere = (etudiant)search.SelectedItem;
            string   datecre = filiere.Filiere.date_creation.ToString();
            DateTime date    = Convert.ToDateTime(datecre);

            infosup.Content = filiere.Filiere.Nom_filiere + "\n responsable : " + filiere.Filiere.responsable + "\n date de création : " + date.ToShortDateString();

            //trier datagridview
            ListerFiliers.MyItems = new ObservableCollection <etudiant>((from c in ListerFiliers.cl.etudiant where c.Filiere.Nom_filiere == filiere.Filiere.Nom_filiere select c).ToList());

            filter.Operator = FilterOperator.Contains;
            filter.Value    = filiere.Filiere.Nom_filiere;
            filter.Member   = "Filiere.Nom_Filiere";
            this.GridData.FilterDescriptors.Add(filter);
        }
예제 #3
0
 private void detach_etudiant(etudiant entity)
 {
     this.SendPropertyChanging();
     entity.Filiere = null;
 }
예제 #4
0
 private void attach_etudiant(etudiant entity)
 {
     this.SendPropertyChanging();
     entity.Filiere = this;
 }
예제 #5
0
 partial void Deleteetudiant(etudiant instance);
예제 #6
0
 partial void Updateetudiant(etudiant instance);
예제 #7
0
 partial void Insertetudiant(etudiant instance);
예제 #8
0
        private void GridData_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
        {
            etudiant etudiant = (etudiant)GridData.SelectedItem;

            id = Convert.ToInt32(etudiant.cne);
        }