public int getFbAdminByEmployeeID(string EmployeeID) { using (FbAdminBLL bll = new FbAdminBLL()) { int IntResult = bll.getFbAdminByUserID(EmployeeID); return IntResult; } }
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); } }
public T_SYS_FBADMIN getFbAdmin(string sysUserID) { using (FbAdminBLL bll = new FbAdminBLL()) { T_SYS_FBADMIN Admin = bll.getFbAdminBySysUserID(sysUserID); return Admin ; } }
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(); } }
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); } }
public string UpdateFbAdmin(string employeeid, string ownercompanyid, T_SYS_FBADMIN fbAdmin) { using (FbAdminBLL bll = new FbAdminBLL()) { return bll.UpdateFbAdmin(employeeid, ownercompanyid, fbAdmin); } }