예제 #1
0
        private void MainMenu_Load(object sender, EventArgs e)
        {
            this.FormClosed += MainMenu_FormClosed;
            if (UserController.current.Roles.name == "Admin")
            {
                settingsToolStripMenuItem1.Visible  = true;
                quảnLíUserToolStripMenuItem.Visible = true;
            }
            else
            {
                settingsToolStripMenuItem1.Visible  = false;
                quảnLíUserToolStripMenuItem.Visible = false;
            }
            DateTime current      = DateTime.Now;
            var      listnotcheck = HistoryController.CheckListNotCheck();

            if (listnotcheck.Count > 0)
            {
                foreach (int[] list in listnotcheck)
                {
                    DateTime     a          = new DateTime(list[2], list[1], list[0]);
                    FinishReport finishForm = new FinishReport();
                    finishForm.dt = a;
                    finishForm.ShowDialog();
                }
            }

            dtshowcustomer_find = Module.MydataGridView(dtshowcustomer_find);
            scalewh             = (double)643 / (double)panel1.Size.Height;
            scaleww             = (double)1039 / (double)panel1.Size.Width;
            scalew            = 1 * scaleww;
            scaleh            = 1 * scalewh;
            startSize         = panel1.Size;
            bt_chotca.Enabled = false;


            load();
            loadState();
            Timer time = new Timer()
            {
                Interval = 1000
            };

            time.Start();
            time.Tick += Time_Tick;
        }