Exemplo n.º 1
0
        private void LoginButtonClicked(object sender, EventArgs e)
        {
            Account user = new Account();

            user.AccountId = this.textBoxId.Text;
            user.Password  = this.textBoxPassword.Text;
            ID             = user.AccountId;


            AccountRepository aRepo = new AccountRepository();

            if (aRepo.UserLoginVerification(user).AccountType == "Admin Admission Department")
            {
                AdmissionDeptHome h1 = new AdmissionDeptHome();
                h1.Show();
                this.Hide();
            }
            else if (aRepo.UserLoginVerification(user).AccountType == "Student")
            {
                User = aRepo.UserLoginVerification(user).Name;
                StudentHome s1 = new StudentHome(ID, User);
                s1.Show();
                this.Hide();
            }
            else if (aRepo.UserLoginVerification(user).AccountType == "Admin Registration Department")
            {
                User = aRepo.UserLoginVerification(user).Name;
                RegistrationDept s1 = new RegistrationDept();
                s1.Show();
                this.Hide();
            }
            else if (aRepo.UserLoginVerification(user).AccountType == "Admin Accounts Department")
            {
                User = aRepo.UserLoginVerification(user).Name;
                AccountsDept s1 = new AccountsDept();
                s1.Show();
                this.Hide();
            }
            else if (aRepo.UserLoginVerification(user).AccountType == "Admin HR Department")
            {
                User = aRepo.UserLoginVerification(user).Name;
                HrDepartment s1 = new HrDepartment();
                s1.Show();
                this.Hide();
            }
            else if (aRepo.UserLoginVerification(user).AccountType == "Faculty")
            {
                FacultyHome f1 = new FacultyHome(ID);
                f1.Show();
                this.Hide();
            }
            else if (aRepo.UserLoginVerification(user).AccountType == "False")
            {
                MessageBox.Show("Invalid ID or Password", "Login Failed");
            }
            else
            {
                MessageBox.Show("Invalid ID or Password", "Login Failed");
            }
        }
        private void buttonBack_Click(object sender, EventArgs e)
        {
            FacultyHome fh = new FacultyHome(uId);

            fh.Show();
            this.Hide();
        }
Exemplo n.º 3
0
        private void CloseClicked(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            FacultyHome cs = new FacultyHome(uId);

            cs.Show();
        }
Exemplo n.º 4
0
        private void buttonNo_Click(object sender, EventArgs e)
        {
            this.Hide();
            FacultyHome cs = new FacultyHome(uId);

            cs.Show();
        }
Exemplo n.º 5
0
 private void buttonBack_Click(object sender, EventArgs e)
 {
     if (textBoxAccountType.Text == "Student")
     {
         StudentHome sh = new StudentHome(textBoxId.Text, textBoxName.Text);
         sh.Show();
         this.Hide();
     }
     else if (textBoxAccountType.Text == "Faculty")
     {
         FacultyHome fh = new FacultyHome(textBoxId.Text);
         fh.Show();
         this.Hide();
     }
 }
Exemplo n.º 6
0
        private void buttonYes_Click(object sender, EventArgs e)
        {
            TeacherRepository tr = new TeacherRepository();

            if (tr.UpdateStatusNadim(uId))
            {
                MessageBox.Show("Vacation Applied");
                this.Hide();
                FacultyHome cs = new FacultyHome(uId);
                cs.Show();
            }
            else
            {
                MessageBox.Show("Something went wrong");
            }
        }