コード例 #1
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            userName = txtUsername.Text;
            passWord = txtPassword.Text;

            if (Login(userName, passWord))
            {
                account = AccountDAO.Instance.GetAccountByUsername(userName);
                if (account.IDTypeAccount == 0)
                {
                    fSelectModeAdmin f = new fSelectModeAdmin();
                    this.Hide();
                    f.ShowDialog();
                    this.Show();
                }
                else
                {
                    fTableManager f = new fTableManager();
                    this.Hide();
                    f.ShowDialog();
                    this.Show();
                }
            }
            else
            {
                MessageBox.Show("Sai tên tài khoản hoặc mật khẩu!!!!!!");
            }
        }
コード例 #2
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            String userName = txtUsername.Text;
            String passWord = txtPassword.Text;

            if (Login(userName, passWord))
            {
                fTableManager f = new fTableManager();
                this.Hide();
                f.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("Sai tên tài khaoản hoặc mật khẩu!!!!!!");
            }
        }