private void MANG_FORM_Load(object sender, EventArgs e) { try { DS_Building.DataSource = BuildingQuery.GetBuildings(); UpdateEkanbanContainer(); } catch { } EkanbanContainerPn.VerticalScroll.Enabled = true; EkanbanContainerPn.VerticalScroll.Value = 10; EkanbanContainerPn.VerticalScroll.Visible = true; var admin = employeeQr.GetAppUser("admin", "admin"); //LOGIN_UI.LOGIN_FORM LOGIN_FORM = new LOGIN_UI.LOGIN_FORM(3); //LOGIN_FORM.ShowDialog(); //if (!LOGIN_FORM.LoginStatus) // this.Close(); //CurrentUser = LOGIN_FORM.User; OrderPage = new OrderPage(admin); }
private void Login() { UserClass = 0; _status = false; lb_loginEXP.Text = ""; User = EmpployeeQuery.GetAppUser(User.user, User.password); if (User == null) { lb_loginEXP.Text = "User name or password is invalid!"; return; } else { UserClass = ShareFuncs.GetInt(User.userClass); if (UserClass == 0 || UserClass == 1) { lb_loginEXP.Text = $"Login as Worker, change account to continous! "; } if (UserClass == 2) { lb_loginEXP.Text = $"Login as Officer account successfully! "; } if (UserClass == 3) { lb_loginEXP.Text = "Login as Admin account successfully! "; } if (UserClass >= RequiedUser) { _status = true; this.Close(); } } }