Пример #1
0
        public int getFbAdminByEmployeeID(string EmployeeID)
        {
            using (FbAdminBLL bll = new FbAdminBLL())
            {
                int IntResult  = bll.getFbAdminByUserID(EmployeeID);
                return IntResult;

            }
        }
Пример #2
0
 public string DeleteFbAdmin(string employeeId, string ownercompanyId)
 {
     using (FbAdminBLL bll = new FbAdminBLL())
     {
         //先获取用户信息,再清空权限缓存
         T_SYS_USER User = this.GetUserByEmployeeID(employeeId);
         if (User != null)
         {
             string keyString = "GetSysUserRoleByUser" + User.SYSUSERID;
             WCFCache.Current[keyString] = null;
         }
         
         return bll.DeleteFbAdmin(employeeId,ownercompanyId);
         
     }
 }
Пример #3
0
        public T_SYS_FBADMIN getFbAdmin(string sysUserID)
        {
            using (FbAdminBLL bll = new FbAdminBLL())
            {
                T_SYS_FBADMIN Admin = bll.getFbAdminBySysUserID(sysUserID);
                return Admin ;

            }
        }
Пример #4
0
        public List<V_FBAdmin> getFbAdmins(string userID, List<string> companyids)
        {
            using (FbAdminBLL bll = new FbAdminBLL())
            {
                IQueryable<V_FBAdmin> Admins= bll.GetFbAdmins(userID,companyids);
                return Admins == null ? null : Admins.ToList();

            }
        }
Пример #5
0
        public string BatchAddFBAdmins(List<T_SYS_FBADMIN> lstAdmin)
        {

            using (FbAdminBLL UserRoleBll = new FbAdminBLL())
            {
                //先清缓存
                if (lstAdmin.Count() > 0)
                {
                    List<T_SYS_USER> users = this.GetSysUserAllInfos();
                    for (int i = 0; i < lstAdmin.Count(); i++)
                    {
                        T_SYS_USER EntUser = new T_SYS_USER();
                        EntUser = users.Where(p=>p.EMPLOYEEID == lstAdmin[i].EMPLOYEEID).FirstOrDefault();
                        string keyString = "GetSysUserRoleByUser" + EntUser.SYSUSERID;
                        WCFCache.Current[keyString] = null;
                    }
                    
                }
                return UserRoleBll.AddFbAdmin(lstAdmin);
                
            }
        }
Пример #6
0
 public string UpdateFbAdmin(string employeeid, string ownercompanyid, T_SYS_FBADMIN fbAdmin)
 {
     using (FbAdminBLL bll = new FbAdminBLL())
     {
         return bll.UpdateFbAdmin(employeeid, ownercompanyid, fbAdmin);
     }
 }