Ejemplo n.º 1
0
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            AdminLogin     adminloggin = (AdminLogin)HttpContext.Current.Session[Common.CommonConstants.ADMIN_SESSION];
            NhanVienAccess nvac        = new NhanVienAccess();

            if (adminloggin != null && nvac.KiemTraDangNhap(adminloggin.username, adminloggin.password, permissionAdmin))
            {
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// return true if the username exists
 /// else false
 /// </summary>
 /// <param name="userName"></param>
 /// <returns></returns>
 public bool IsExistedUsername(string userName)
 {
     try
     {
         NhanVienAccess nvAc = new NhanVienAccess();
         return(nvAc.IsExistedUsername(userName));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 3
0
 public int ValidMaNhanVienToAdd()
 {
     try
     {
         NhanVienAccess nvAc = new NhanVienAccess();
         return(nvAc.ValidMaNhanVienToAdd());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 4
0
 public NhanVien DangNhap(string id, string pwd)
 {
     try
     {
         NhanVienAccess nvAc = new NhanVienAccess();
         return(nvAc.DangNhap(id, pwd));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 5
0
 public void XoaNhanVien(string maNV)
 {
     try
     {
         NhanVienAccess nvAC = new NhanVienAccess();
         nvAC.XoaNhanVien(maNV);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 6
0
 public void SuaNhanVien(NhanVien nv)
 {
     try
     {
         NhanVienAccess nvAC = new NhanVienAccess();
         nvAC.SuaNhanVien(nv);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 7
0
 public void DoiMatKhau(string maNV, string newPassword)
 {
     try
     {
         NhanVienAccess nvAc = new NhanVienAccess();
         nvAc.DoiMatKhau(maNV, newPassword);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 8
0
 public List <NhanVien> LayToanBoNhanVien()
 {
     try
     {
         NhanVienAccess nvAC = new NhanVienAccess();
         return(nvAC.LayToanBoNhanVien());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 9
0
 public void CapQuyenAdmin(string maNV)
 {
     try
     {
         NhanVienAccess nvAc = new NhanVienAccess();
         nvAc.CapQuyenAdmin(maNV);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 10
0
 public List <NhanVien> ShowNhanVien()
 {
     return(NhanVienAccess.ShowNhanVien());
 }
Ejemplo n.º 11
0
 public static int PhanQuyen(string tk)
 {
     return(NhanVienAccess.PhanQuyen(tk));
 }
Ejemplo n.º 12
0
 public static string LayTen(string manv)
 {
     return(NhanVienAccess.LayTen(manv));
 }
Ejemplo n.º 13
0
 public static List <NhanVien> ThongKeNV(string mapm)
 {
     return(NhanVienAccess.ThongKeNV(mapm));
 }
Ejemplo n.º 14
0
 public static List <NhanVien> SearchNhanVien(string key, string x)
 {
     return(NhanVienAccess.SearchNhanVien(key, x));
 }
Ejemplo n.º 15
0
 public static void XoaNV(NhanVien nv)
 {
     NhanVienAccess.Delete(nv);
 }
Ejemplo n.º 16
0
 public static void SuaNV(NhanVien nv)
 {
     NhanVienAccess.UpDate(nv);
 }
Ejemplo n.º 17
0
 public static void ThemNV(NhanVien nv)
 {
     NhanVienAccess.Insert(nv);
 }