Exemple #1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     string userName = txbUserName.Text;
     string passWord = txbPassWord.Text;
     if (Login(userName, passWord))
     {
         Account loginAccount = AccountDAO.Instance.GetAccountByUserName(userName);
         frmTableManager f = new frmTableManager(loginAccount);
         this.Hide();
         f.ShowDialog();
         this.Show();
     }
     else
     {
         MessageBox.Show("Sai tên tài khoản hoặc mật khẩu!");
     }
 }
Exemple #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string userName = this.txtUsername.Text;
            string passWord = this.txtPassword.Text;

            if (Login(userName, passWord))
            {
                Account         loginAccount = AccountDAO.Instance.getAccountByUserName(userName);
                frmTableManager f            = new frmTableManager(loginAccount);
                this.Hide();
                f.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("Đăng nhập thất bại");
            }
        }