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); } } }
public NewManagerAccForm() { InitializeComponent(); manager = new studentManager(); }
public ConfirmPasswordForm() { InitializeComponent(); user = new User(); manager = new studentManager(); }