Ejemplo n.º 1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (accountBus.logIn(txtUsername.Text, txtPassword.Text))
     {
         this.Hide();
         currentUser = accountBus.getAccountByUsername(txtUsername.Text);
         frmMain1 form = new frmMain1(this);
         form.ShowDialog();
         this.Show();
         //--
         currentUser              = null;
         txtUsername.Text         = "Username";
         txtPassword.Text         = "Password";
         txtPassword.PasswordChar = default;
         txtUsername.Focus();
     }
     else
     {
         MessageBox.Show("Sai mật khẩu hoặc tài khoản");
         txtPassword.Text = "";
         txtUsername.Focus();
     }
 }
Ejemplo n.º 2
0
 public frmTaiKhoan(frmMain1 parent)
 {
     this.parent = parent;
     InitializeComponent();
 }