private void btnEliminar_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { idProducto = dataGridView1.CurrentRow.Cells["Id"].Value.ToString(); ObjCN.EliminarProduct(Convert.ToInt32(idProducto)); MessageBox.Show("Eliminado Correctamente"); MostrarProducto(); } else { MessageBox.Show("Seleccione una fila por favor"); } }