private void OpenSelectedProject() { if (LoginAllowed()) { this.selectedProject = ((BussinessLogic.Project)(this.listBox_ProjectList.SelectedItem)); this.MainForm.OpenedProject = this.selectedProject; this.MainForm.UserInfo = this.userInfo; this.Close(); } else { this.HandleInValidLogin(); } }
private bool LoginAllowed() { if (this.textBox_Username.Text.Trim().Length == 0 || this.textBox_Password.Text.Trim().Length == 0) { return(false); } else { BussinessLogic.Login login = new BussinessLogic.Login(this.textBox_Username.Text, this.textBox_Password.Text); bool isAllowed = login.IsAllowed(); if (isAllowed) { this.userInfo = login; } return(isAllowed); } }
private void LoadRememberedUser() { this.UserInfo = new BussinessLogic.Login("", ""); this.UserInfo.User = new BussinessLogic.Users(); this.UserInfo.User.LoadRememberMe(); }
private bool LoginAllowed() { if (this.textBox_Username.Text.Trim().Length == 0 || this.textBox_Password.Text.Trim().Length == 0) { return false; } else { BussinessLogic.Login login = new BussinessLogic.Login(this.textBox_Username.Text, this.textBox_Password.Text); bool isAllowed = login.IsAllowed(); if (isAllowed) this.userInfo = login; return isAllowed; } }