Exemple #1
0
 private void Login_button_Click(object sender, EventArgs e)
 {
     if (student_rbtn.Checked == true)
     {
         CurrentUser.isManager = true;
         var studentmanager = new studentManager();
         if (studentmanager.login(Username_textBox.Text, Password_textBox.Text))
         {
             this.DialogResult = DialogResult.Yes;
         }
         else
         {
             MessageBox.Show("Invalid Username or Password", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else if (human_rbtn.Checked == true)
     {
         user = new User();
         CurrentUser.isContact = true;
         if (user.login(Username_textBox.Text, Password_textBox.Text))
         {
             this.DialogResult = DialogResult.Yes;
         }
         else
         {
             MessageBox.Show("Invalid Username or Password", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Exemple #2
0
 public NewManagerAccForm()
 {
     InitializeComponent();
     manager = new studentManager();
 }
Exemple #3
0
 public ConfirmPasswordForm()
 {
     InitializeComponent();
     user    = new User();
     manager = new studentManager();
 }