public void addStockIn()
 {
     _reload = false;
     Warehouse.frmItem frmProduct = new frmItem();
     frmProduct.ShowDialog();
     if (_reload)
     {
         loadGrid(_idStaff);
     }
 }
Exemplo n.º 2
0
 public void addNewWarehouse()
 {
     _reload = false;
     Warehouse.frmItem frmProduct = new frmItem();
     frmProduct.ShowDialog();
     if (_reload)
     {
         loadGrid();
     }
 }
        public void editWarehouse()
        {
            string checkProblem = "Unchecked";

            try
            {
                frmItem _frmItem = new frmItem();
                _frmItem._idItem = Convert.ToInt16(gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Id"]));
                checkProblem     = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Problem"]);
                if (checkProblem != "Unchecked")
                {
                    _frmItem._checkProblem = true;
                }

                _frmItem._brand        = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Brand"]);
                _frmItem._nameEn       = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["ItemEn"]);
                _frmItem._nameKh       = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["ItemKh"]);
                _frmItem._Image        = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Image"]);
                _frmItem._code         = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Code"]);
                _frmItem._serialNumber = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Serial Number"]);
                _frmItem._idLocation   = Convert.ToInt16(gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["idLocation"]));
                _frmItem._description  = gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Description"]);
                _frmItem._idRoom       = Convert.ToInt16(gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["idRoom"]));
                _frmItem._idProduct    = Convert.ToInt16(gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["idProduct"]));
                _frmItem._quantity     = Convert.ToInt16(gdvStockIn.GetRowCellDisplayText(gdvStockIn.GetSelectedRows()[0], gdvStockIn.Columns["Quantity"]));
                _frmItem._save         = false;
                _frmItem.ShowDialog();

                if (_reload)
                {
                    loadGrid(_idStaff);
                }
                _reload = false;
            }
            catch (Exception er)
            {
                MsgBox.msgLoad("error", er.Message);
            }
        }