public void TestLogin2() { PdbAccount ac = new EmployeeManagement_Service.Service.Basic.Functions.UserLogins() { }.CheckLogin("bv1", "bv1", "Bảo vệ"); Assert.AreNotEqual(ac, null); }
public void TestLogin1() { PdbAccount ac = new EmployeeManagement_Service.Service.Basic.Functions.UserLogins() { }.CheckLogin("kt1", "kt1", "Kế toán"); Assert.AreEqual(ac, null); }
//Button for login private void bntlogin_Click(object sender, EventArgs e) { _depar = cbbdepartment.Text; PdbAccount ac = new EmployeeManagement_Service.Service.Basic.Functions.UserLogins { }.CheckLogin(txtusername.Text, txtpassword.Text, cbbdepartment.Text); if (ac != null) { this.Visible = false; MainForm mainform = new MainForm(); mainform.ShowDialog(); this.Visible = true; txtusername.Text = ""; txtpassword.Text = ""; } else { MessageBox.Show("Đăng nhập thất bại", "Error"); } }