コード例 #1
0
ファイル: ABM_Productos.cs プロジェクト: Agushadad/PAV1
 private void btn_EliminarProducto_Click(object sender, EventArgs e)
 {
     if (Grid_Producto.CurrentCell.Value == null)
     {
         MessageBox.Show("No se selecciono ningun producto para eliminar");
     }
     else
     {
         string       ID           = Grid_Producto.CurrentRow.Cells[0].Value.ToString();
         DialogResult dialogResult = MessageBox.Show("¿Esta seguro que desea eliminar el usuario seleccionado?", "IMPORTANTE", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
         if (dialogResult == DialogResult.Yes)
         {
             producto.Eliminar(ID);
         }
     }
 }