public static List <int> GetDepartmentIdList(int siteId) { var departmentIdList = new List <int>(); var departmentInfoList = DepartmentManagerCache.GetDepartmentInfoListByCache(siteId); foreach (var departmentInfo in departmentInfoList) { departmentIdList.Add(departmentInfo.Id); } return(departmentIdList); }
public static List <int> GetDepartmentIdList(int siteId, string userName) { var departmentIdList = new List <int>(); var departmentInfoList = DepartmentManagerCache.GetDepartmentInfoListByCache(siteId); foreach (var departmentInfo in departmentInfoList) { if (StringUtils.In(departmentInfo.UserNames, userName)) { departmentIdList.Add(departmentInfo.Id); } } return(departmentIdList); }
public static DepartmentInfo GetDepartmentInfo(int siteId, int departmentId) { var entries = DepartmentManagerCache.GetDepartmentInfoListByCache(siteId); return(entries.FirstOrDefault(x => x != null && x.Id == departmentId)); }
public static List <DepartmentInfo> GetDepartmentInfoList(int siteId) { return(DepartmentManagerCache.GetDepartmentInfoListByCache(siteId)); }