private void btSupprimer_Click(object sender, EventArgs e)
 {
     try
     {
         ac.SupprimerActivite(int.Parse(dataActivite.CurrentRow.Cells[0].Value.ToString()), double.Parse(dataActivite.CurrentRow.Cells[2].Value.ToString()));
     }
     catch (NullReferenceException ex)
     {
         MessageBox.Show("Il faut séléctionner une activité", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
 private void metroTile2_Click(object sender, EventArgs e)
 {
     try
     {
         acc.SupprimerActivite(int.Parse(dataActivite.CurrentRow.Cells[0].Value.ToString()), double.Parse(dataActivite.CurrentRow.Cells[2].Value.ToString()));
         acc.getActuelActivity(dataActivite);
         btSupprimerActivite.Enabled = true;
         btModifierActivite.Enabled  = true;
     }
     catch (NullReferenceException ex)
     {
         MessageBox.Show("Il faut séléctionner une activité", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }