Esempio n. 1
0
        protected void button1_Click(object sender, EventArgs e)
        {
            String tenDangnhap = USER.Text;
            String matKhau     = PASS.Text;
            int    ketQua      = NguoiDung.DangNhap(tenDangnhap, matKhau);

            switch (ketQua)
            {
            case 0:
                MessageBox.Show("Không tồn tại người dùng trong hệ thống");
                break;

            case 1:
                MessageBox.Show("Mật khẩu sai");
                notice.Visible = true;
                break;

            case 2:
                TrangChinh tc = new TrangChinh();
                this.Hide();
                tc.ShowDialog();
                this.Close();
                break;
            }
        }