} //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
private void LoginButton_Click(object sender, EventArgs e) { //setup Connection object dbconn = new DBConn(); conn = dbconn.Dbsetup(); login = new LoginPage(); login.Setup(conn); employee.Setup(conn); /* * //QUICK LOGIN * emailBox.Text = "*****@*****.**"; * passBox.Text = "******"; */ string email = emailBox.Text; string pword = passBox.Text; eID = login.Login(email, pword); int success; 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.ListProjects(profileProjectGrid); edit.Setup(conn); isAdmin = profile.getAdmin(eID); if (isAdmin == true) { admin = new AdminPage(); admin.Setup(conn); this.adminLabel.Visible = true; } } passBox.Text = ""; }
private void HomeButton_Click(object sender, EventArgs e) { this.profileBG.Visible = true; this.scheduleBG.Visible = false; this.employeePageBG.Visible = false; this.projectPageBG.Visible = false; this.searchEmployeesBG.Visible = false; this.searchProjectsBG.Visible = false; this.adminBackPanel.Visible = false; this.Clear(); profile.GetHours(profileHoursTextBox); profile.GetEmail(profileEmailTextBox); profile.GetPhone(profilePhoneTextBox); profile.ListProjects(profileProjectGrid); }
} //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