コード例 #1
0
        private void buttonBack_Click(object sender, EventArgs e)
        {
            FacultyHome fh = new FacultyHome(uId);

            fh.Show();
            this.Hide();
        }
コード例 #2
0
ファイル: Login.cs プロジェクト: raihanthecooldude/UMS-CSharp
        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");
            }
        }
コード例 #3
0
        private void buttonBack_Click(object sender, EventArgs e)
        {
            FacultyHome fh = new FacultyHome(uId);

            fh.Visible   = true;
            this.Visible = false;
        }
コード例 #4
0
        private void CloseClicked(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            FacultyHome cs = new FacultyHome(uId);

            cs.Show();
        }
コード例 #5
0
        private void buttonNo_Click(object sender, EventArgs e)
        {
            this.Hide();
            FacultyHome cs = new FacultyHome(uId);

            cs.Show();
        }
コード例 #6
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();
     }
 }
コード例 #7
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");
            }
        }