Ejemplo n.º 1
0
        private void StaffLogin()
        {
            LoginUI loginUI = new LoginUI();

            if (DialogResult.Yes.Equals(loginUI.ShowDialog()))
            {
                if (StaffID == -13131)
                {
                    lblHeader.Text            = "Apartment Manager System (Configuration Mode)";
                    tsmiStaff.Visible         = false;
                    tsmiManager.Visible       = false;
                    tsmiOption.Visible        = true;
                    tableLayoutPanel2.Enabled = false;
                }
                else
                {
                    lblHeader.Text            = "Apartment Manager System";
                    tableLayoutPanel2.Enabled = true;
                    tsmiOption.Visible        = false;
                    tsmiManager.Visible       = SuperUser;
                }
                this.Show();
            }
            else
            {
                this.Close();
            }
        }
Ejemplo n.º 2
0
 private void btnEnter_Click(object sender, EventArgs e)
 {
     LoginUI objLoginUI = new LoginUI();
     //objLoginUI.ShowDialog();
     objLoginUI.Show();
     this.Hide();
 }
Ejemplo n.º 3
0
        private void ChangeLoginRole_Click(object sender, EventArgs e)
        {
            LoginUI objLoginUI = new LoginUI();
            objLoginUI.Show();
            //this.Close();
            this.Hide();

            LoginUIBLL objLoginUIBLL = new LoginUIBLL();
            LoginUserModel objLoginUserModel = new LoginUserModel();
            objLoginUserModel.UserId = toolLoginUserId.Text;
            objLoginUIBLL.UpdateLoginUserStateClose();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            ShowTitle();
            switch (LoginUI.UserType())
            {
            case "管理员":
                AdminUI.Menu();
                break;

            case "教师":
                TeacherUI.Menu();
                break;

            case "学生":
                StudentUI.Menu();
                break;
            }
        }