Пример #1
0
 private void stagiaireDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 3)
         {
             Stagiaire s = (Stagiaire)stagiaireBindingSource.Current;
             new StagiaireBAO().UpdateStat(s.Id);
             this.Actualiser();
         }
         if (e.ColumnIndex == 4)
         {
             Stagiaire            s = (Stagiaire)stagiaireBindingSource.Current;
             FormUpdateStagiaires f = new FormUpdateStagiaires();
             f.Update(s);
             f.ShowDialog();
             this.Actualiser();
         }
         if (e.ColumnIndex == 5)
         {
             Stagiaire s = (Stagiaire)stagiaireBindingSource.Current;
             new StagiaireBAO().Delete(s.Id);
             this.Actualiser();
         }
         Stagiaire x = (Stagiaire)stagiaireBindingSource.Current;
         pictureBox1.Image = Image.FromFile(x.ProfilImage);
         Nom.Text          = x.Nom;
         prenom.Text       = x.Prenom;
         Filiere.Text      = x.Filiere.Titre;
     }
     catch (Exception)
     {
     }
 }
Пример #2
0
 private void stagiaireDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 3)
     {
         Stagiaire            s = (Stagiaire)stagiaireBindingSource.Current;
         FormUpdateStagiaires f = new FormUpdateStagiaires();
         f.Update(s);
         f.ShowDialog();
         this.Actualiser();
     }
     if (e.ColumnIndex == 4)
     {
         Stagiaire s = (Stagiaire)stagiaireBindingSource.Current;
         new StagiaireBAO().Delete(s.Id);
         this.Actualiser();
     }
 }