public static List <int> GetCategoryIdList(int siteId, string userName) { var departmentIdList = new List <int>(); var departmentInfoList = CategoryManagerCache.GetCategoryInfoListByCache(siteId); foreach (var departmentInfo in departmentInfoList) { if (StringUtils.In(departmentInfo.UserNames, userName)) { departmentIdList.Add(departmentInfo.Id); } } return(departmentIdList); }
public static CategoryInfo GetCategoryInfo(int siteId, int departmentId) { var entries = CategoryManagerCache.GetCategoryInfoListByCache(siteId); return(entries.FirstOrDefault(x => x != null && x.Id == departmentId)); }
public static List <CategoryInfo> GetCategoryInfoList(int siteId) { return(CategoryManagerCache.GetCategoryInfoListByCache(siteId)); }