Ejemplo n.º 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            fTableManager f = new fTableManager();

            this.Hide();
            f.ShowDialog();
            this.Show();
        }
Ejemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            AccountDAO aDAO     = new AccountDAO();
            string     username = textBox1.Text;
            string     password = textBox2.Text;
            int        login    = aDAO.Login(username, password);

            if (login >= 0)
            {
                fTableManager f = new fTableManager(username, login);
                this.Hide();
                f.ShowDialog();
            }
            else
            {
                MessageBox.Show("Hãy kiểm tra lại thông tin tài khoản của bạn", "Đăng nhập không thành công"
                                , MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }