private void btnLogin_Click(object sender, EventArgs e)
        {
            string userName = txbUserName.Text;
            string password = txbPassWord.Text;

            if (Login(userName, password))
            {
                fTableManager f = new fTableManager();
                this.Hide();
                f.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("Thông tin tài khoản hoặc mật khẩu không chính xác !");
            }
        }
Esempio n. 2
0
        private void btnLogIn_Click(object sender, EventArgs e)
        {
            string userName = txtUseName.Text;
            string passWord = txtPassWord.Text;

            if (Login(userName, passWord))
            {
                Account       loginAcc = AccountDAO.Instance.GetAccountByUserName(userName);
                fTableManager f        = new fTableManager(loginAcc);
                this.Hide(); //ẩn form đăng nhập hiện tại
                f.ShowDialog();
                this.Show(); //hiện form đăng nhập lại khi tắt chương trình
            }
            else
            {
                MessageBox.Show("sai tài khoản hoặc mật khẩu !", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtPassWord.Focus();
            }
        }