Exemple #1
0
 private void AssignWarehouse()
 {
     try
     {
         GlobalUser.SetWarehouseId(NullCheck.IsNullInt(dViewDataShow.SelectedRows[0].Cells["WarehouseId"].Value));
     }
     catch
     {
         SelectWarehouse();
     }
     activeMenu = ActiveMenuTypes.MainMenu;
     HideDataShow();
     ShowMenu(new string[] { "Priėmimas", "Padėjimas", "Surinkimas", "Išvežimas" });
 }
Exemple #2
0
        private void SetupForm()
        {
            DataTable dt = Sql.GetTable(WarehouseComboSql);

            if (dt != null && dt.Rows.Count > 0)
            {
                if (dt.AsEnumerable().Where(x => x.Field <string>("WarehouseCode") == "TEST").FirstOrDefault() != null)
                {
                    GlobalUser.SetWarehouseId(NullCheck.IsNullInt(dt.AsEnumerable().Where(x => x.Field <string>("WarehouseCode") == "TEST").FirstOrDefault()["WarehouseId"]));
                }
                else
                {
                    GlobalUser.SetWarehouseId(NullCheck.IsNullInt(dt.Rows[0]["WarehouseId"]));
                }
            }
            else
            {
                MessageBox.Show("Nerastas registruotas sandėlys sistemoje.", "Ispėjimas", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            this.MinimizeBox     = false;
            this.WindowState     = FormWindowState.Maximized;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            SetupUserInfo();
        }