Esempio n. 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.GetAccountByIdLogin(userName);
                if (loginAccount.loaitk == 1)
                {
                    pq = 1;
                }
                else
                {
                    pq = 0;
                }
                name = loginAccount.tenhienthi;
                id   = loginAccount.idlogin;
                pass = loginAccount.pass;
                fTableManager f = new fTableManager(pq, name, id, pass);
                this.Hide();
                f.ShowDialog();
                this.ShowDialog();
            }
            else
            {
                MessageBox.Show("Sai Tên Tài Khoản Hoặc Mật Khẩu");
            }
        }
Esempio n. 2
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.GetAccountByIdLogin(idLogin);

                fTableManager f = new fTableManager(loginAccount);
                this.Hide();
                f.ShowDialog();
                this.ShowDialog();
            }
            else
            {
                MessageBox.Show("Sai Tên Tài Khoản Hoặc Mật Khẩu");
            }
        }