} //end reset pass exit button private void ChangePassExitLabel_Click(object sender, EventArgs e) { Clear(); this.loginBG.Visible = false; this.taskbarMenu.Visible = true; this.searchProjectsBG.Visible = false; this.profileBG.Visible = true; this.reportsBG.Visible = false; this.employeePageBG.Visible = false; this.projectPageBG.Visible = false; this.searchEmployeesBG.Visible = false; this.adminBackPanel.Visible = false; this.resetPassBG.Visible = false; this.changePassBG.Visible = false; this.projectPageRemoveProjectButton.Visible = false; this.adminVacationPageBG.Visible = false; this.employeeAdminViewVacationsButton.Visible = false; profile.GetHours(profileHoursTextBox); profile.GetEmail(profileEmailTextBox); profile.GetPhone(profilePhoneTextBox); profile.GetName(profileFNameBox, profileLNameBox); profile.ListProjects(profileProjectGrid); profile.ListVacations(vacationsGrid); } //end change pass exit button
} //end MainForm //BUTTONS //Login Buttons private void LoginButton_Click(object sender, EventArgs e) { this.eID = login.Login(emailBox, passBox); if (eID == null) { success = 0; } else { success = 1; } if (success == 1) { this.signOutLabel.Visible = true; this.loginBG.Visible = false; this.taskbarMenu.Visible = true; this.profileBG.Visible = true; emailBox.Text = ""; profile = new ProfilePage(); profile.Setup(conn, eID); profile.GetHours(profileHoursTextBox); profile.GetEmail(profileEmailTextBox); profile.GetPhone(profilePhoneTextBox); profile.GetName(profileFNameBox, profileLNameBox); profile.ListProjects(profileProjectGrid); profile.ListVacations(vacationsGrid); isAdmin = profile.GetAdmin(); if (isAdmin == true) { admin = new AdminPage(); admin.Setup(conn); this.adminLabel.Visible = true; } } passBox.Text = ""; } //end login button