Exemplo n.º 1
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            //aa
            DBConnect          cn       = new DBConnect();
            string             txtID    = txtId.Text;
            string             txtPass  = txtPASS.Text;
            EmployeeManagement employee = new EmployeeManagement();

            cn.conn.Open();
            if (employee.CheckLogin(txtID, txtPass) == 3)
            {
                frmNhanVien NV = new frmNhanVien();
                NV.Show();
            }
            else if (employee.CheckLogin(txtID, txtPass) == 0)
            {
                MessageBox.Show("Dữ liệu không hợp lệ");
            }
            else
            {
                frmQuanLi QL = new frmQuanLi();
                QL.Show();
            }
            cn.conn.Close();
        }