Exemple #1
0
 private void deletar_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in dataGridExercicios.SelectedRows)
     {
         try
         {
             FichaDetalhe fichaDet = new FichaDetalhe();
             fichaDet.Id = Convert.ToInt16(dataGridExercicios.CurrentRow.Cells[0].Value);
             fichaDet.delete();
             dataGridExercicios.Rows.Remove(row);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }