public ReturnForm(PosMain posmain) { AppCon ac = new AppCon(); softwareType = ac.GetValue("SoftwareType"); machineTable = ac.GetValue("MachineTable"); mainFrm = posmain; InitializeComponent(); }
public Result(MaCuon macuon, string May, PosMain posMain, int vitri) { InitializeComponent(); label6.Text = macuon.KyHieu; label7.Text = macuon.Kho; macuonl.Text = macuon.Macuon; label10.Text = macuon.SoKg.ToString("###,###"); machine = May; xvitri = vitri; posMainFrm = posMain; macuonData = macuon; }
public AddForm(PosMain posMain) { AppCon ac = new AppCon(); softwareType = ac.GetValue("SoftwareType"); machineTable = ac.GetValue("MachineTable"); if (softwareType == "SV" && machineTable == "") { messageBox msg = new messageBox("Lỗi", "Lỗi cấu hình", "Phải nhập thông tin Machine Table"); msg.ShowDialog(); } InitializeComponent(); mainFrm = posMain; }
static void Main(string[] args) { if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Length > 1) { return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //tuy theo moi soft co productName khac nhau string siteCode = "HTC"; //giá trị mặc định if (args.Length > 0) { siteCode = args[0]; } Config.NewKeyValue("SiteCode", siteCode); InitApp(); SetEnvironment(siteCode); RunSplashScreen(); Login frmLogin = new Login(); frmLogin.StartPosition = FormStartPosition.CenterScreen; frmLogin.ShowDialog(); frmLogin.Activate(); Menufrm frmMenu = new Menufrm(); frmMenu.StartPosition = FormStartPosition.CenterScreen; //var main = new Main(frmLogin.drUser); //main.StartPosition = FormStartPosition.CenterScreen; var posMain = new PosMain(frmLogin.drUser); posMain.StartPosition = FormStartPosition.CenterScreen; int choice = 0; DataRow currUser = frmLogin.drUser; //dang nhap thanh cong, bat dau su dung chuong trinh frmLogin.DialogResult = DialogResult.OK; if (frmLogin.DialogResult != DialogResult.Cancel) { do { frmMenu.ShowDialog(); choice = frmMenu.menuChoice; switch (choice) { case 1: posMain.ShowDialog(); if (posMain.DialogResult == DialogResult.Cancel) { choice = 0; } break; case 4: posMain.ShowDialog(); if (posMain.DialogResult == DialogResult.Cancel) { choice = 0; } break; case 5: Settings settings = new Settings(); settings.ShowDialog(); break; case 6: Application.Exit(); break; } }while (choice == 0); } }