コード例 #1
0
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         objProducto.EliminarProducto(Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value));
         MessageBox.Show("Se elimino correctamente");
         ListarProductos();
     }
     else
     {
         MessageBox.Show("Seleccione una fila");
     }
 }