Ejemplo n.º 1
0
 private void supprimerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count == 1)
     {
         int          idSupprimer = Convert.ToInt32(dataGridView1.CurrentRow.Cells["IDA"].Value);
         DialogResult rep         = MessageBox.Show("Etes-vous sûr de vouloir supprimer cette activite " + dataGridView1.CurrentRow.Cells["CODEA"].Value.ToString()
                                                    + "  " + dataGridView1.CurrentRow.Cells["LIBELLEA"].Value.ToString() + " ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (rep == DialogResult.Yes)
         {
             Controleur.supprimerActivite(idSupprimer);
             charger();
         }
     }
 }