コード例 #1
0
        public void addStockOut()
        {
            int _id = Convert.ToInt16(gdvStaff.GetRowCellDisplayText(gdvStaff.GetSelectedRows()[0], gdvStaff.Columns[0]));

            if (gdvStaff.RowCount <= 0 || _id == 0)
            {
                MsgBox.msgLoad("search", "Please select on your recorde");
                return;
            }
            frmAddStockOut _frmStockOut = new frmAddStockOut();

            _frmStockOut._idStaff = _id;
            _frmStockOut.ShowDialog();
        }
コード例 #2
0
 public void editWarehouse()
 {
     try
     {
         frmAddStockOut _frmAddStockOut = new frmAddStockOut();
         _frmAddStockOut._idStockOut  = Convert.ToInt16(gdvStockOut.GetRowCellDisplayText(gdvStockOut.GetSelectedRows()[0], gdvStockOut.Columns["Id"]));
         _frmAddStockOut._idStaff     = Convert.ToInt16(gdvStockOut.GetRowCellDisplayText(gdvStockOut.GetSelectedRows()[0], gdvStockOut.Columns["idStaff"]));
         _frmAddStockOut._idLocation  = Convert.ToInt16(gdvStockOut.GetRowCellDisplayText(gdvStockOut.GetSelectedRows()[0], gdvStockOut.Columns["idLocation"]));
         _frmAddStockOut._idRoom      = Convert.ToInt16(gdvStockOut.GetRowCellDisplayText(gdvStockOut.GetSelectedRows()[0], gdvStockOut.Columns["idRoom"]));
         _frmAddStockOut._Description = gdvStockOut.GetRowCellDisplayText(gdvStockOut.GetSelectedRows()[0], gdvStockOut.Columns["Description"]);
         _frmAddStockOut._save        = false;
         _frmAddStockOut.ShowDialog();
         if (MsgBox._resultYes)
         {
             loadGrid();
         }
         MsgBox._resultYes = false;
     }
     catch (Exception er)
     {
         MsgBox.msgLoad("error", er.Message);
     }
 }