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(); } }
private void btnEnter_Click(object sender, EventArgs e) { LoginUI objLoginUI = new LoginUI(); //objLoginUI.ShowDialog(); objLoginUI.Show(); this.Hide(); }
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(); }
static void Main(string[] args) { ShowTitle(); switch (LoginUI.UserType()) { case "管理员": AdminUI.Menu(); break; case "教师": TeacherUI.Menu(); break; case "学生": StudentUI.Menu(); break; } }