Ejemplo n.º 1
0
 private void dtgAlmacen_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 2)
         {
             string mensaje = "";
             P.Idproducto = Convert.ToInt32(dtgAlmacen.CurrentRow.Cells[3].Value);
             P.Idalmacen  = Convert.ToInt32(dtgAlmacen.CurrentRow.Cells[0].Value);
             P.Estado     = false;
             mensaje      = P.BloquearAlmacen();
             if (mensaje == "1")
             {
                 MessageBoxEx.Show("Bloqueado", "FactSYS", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 LlenarGrid();
                 Limpiar();
             }
             else if (mensaje == "2")
             {
                 MessageBoxEx.Show("Existencia del producto debe ser cero", "FactSYS", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message);
     }
 }