Exemple #1
0
        } //end home button

        private void ProjectsButton_Click(object sender, EventArgs e)
        {
            this.signOutLabel.Visible        = true;
            this.loginBG.Visible             = false;
            this.taskbarMenu.Visible         = true;
            this.profileBG.Visible           = false;
            this.reportsBG.Visible           = false;
            this.employeePageBG.Visible      = false;
            this.projectPageBG.Visible       = false;
            this.searchEmployeesBG.Visible   = false;
            this.searchProjectsBG.Visible    = true;
            this.adminBackPanel.Visible      = false;
            this.resetPassBG.Visible         = false;
            this.changePassBG.Visible        = false;
            this.adminVacationPageBG.Visible = false;
            this.employeeAdminViewVacationsButton.Visible = false;

            isAdmin = profile.GetAdmin();
            if (isAdmin == true)
            {
                this.projectPageRemoveProjectButton.Visible = true;
            }

            Clear();

            edit.ListProjects(projectsGrid);
        } //end project button
Exemple #2
0
        } //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