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");
            }
        }
Exemple #2
0
        private void BackClicked(object sender, EventArgs e)
        {
            StudentHome sh = new StudentHome(ID, User);

            sh.Show();
            this.Hide();
        }
        private void BackClicked(object sender, EventArgs e)
        {
            this.CourseComboBox.Visible      = true;
            this.SelectCourseLabel.Visible   = true;
            this.DoneRegistrationBtn.Visible = true;
            StudentHome sh = new StudentHome(ID, User);

            sh.Show();
            this.Hide();
        }
 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();
     }
 }
 private void BackClicked(object sender, EventArgs e)
 {
     if (b == true)
     {
         StudentHome sh = new StudentHome(ID, User);
         sh.Show();
         this.Hide();
     }
     else
     {
         CheckScholarship cgs = new CheckScholarship();
         cgs.Show();
         this.Hide();
     }
 }