示例#1
0
 private void Grid_items_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 3)
     {
         SeleccionProductos selectProducts = new SeleccionProductos
         {
             Dtproducto = ds.Tables["dtproducto"]
         };
         selectProducts.ShowDialog();
         grid_items.Rows[e.RowIndex].Cells["product_id"].Value = selectProducts.GetProductId;
         //establecer la unidad.
         if (selectProducts.GetMasterRolls)
         {
             grid_items.Rows[e.RowIndex].Cells["unidad"].Value = "Master";
         }
         if (selectProducts.GetResma)
         {
             grid_items.Rows[e.RowIndex].Cells["unidad"].Value = "Resma";
         }
         if (selectProducts.Getgraphics)
         {
             grid_items.Rows[e.RowIndex].Cells["unidad"].Value = "Graphics";
         }
     }
 }
示例#2
0
 private void GridDevol_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 1)
     {
         SeleccionProductos products = new SeleccionProductos
         {
             Dtproducto = manager.GetProducts()
         };
         products.ShowDialog();
         GridDevol.Rows[e.RowIndex].Cells["product_id"].Value = products.GetProductId;
         GridDevol.Rows[e.RowIndex].Cells["tipo"].Value       = products.GetProductTipo;
         //GridDevol.Rows[e.RowIndex].Cells["cantidad"].Value = "1";
         GridDevol.Rows[e.RowIndex].Cells["roll_id"].Value = "";
         GridDevol.CurrentCell = GridDevol[4, e.RowIndex];
     }
 }