Exemple #1
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (dgvService.SelectedRows.Count < 0 && dgvService.CurrentCell.RowIndex != 1)
     {
         MessageBox.Show("Seleccione un id");
     }
     else
     {
         DialogResult dialogResult = MessageBox.Show("Desea eliminar  '" + dgvService.CurrentRow.Cells[1].Value, "Eliminar servicio", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             sbo.deleteServ(Convert.ToInt32(dgvService.CurrentRow.Cells[0].Value));
         }
     }
 }