示例#1
0
        private void Login_Check(string _User, string _Pass)
        {
            Accounts account = new Accounts();

            if (CmbUser.Text == "Employee")
            {
                if (_User == account.EmployeeUser && _Pass == account.EmployeePass)
                {
                    FormMain formMain = new FormMain();
                    formMain.Show();
                    this.Hide();
                }
            }
            else if (CmbUser.Text == "Admin")
            {
                if (_User == account.AdminUser && _Pass == account.AdminPass)
                {
                    MainAdmin form = new MainAdmin();
                    form.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("Error Either User or Password");
            }
        }
示例#2
0
        private void MainAdmin_Load(object sender, EventArgs e)
        {
            _obj = this;
            HomeAdmin home = new HomeAdmin
            {
                Dock = DockStyle.Fill
            };

            PanelContainer.Controls.Add(home);
        }