示例#1
0
        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);
        }
示例#2
0
        public static CategoryInfo GetCategoryInfo(int siteId, int departmentId)
        {
            var entries = CategoryManagerCache.GetCategoryInfoListByCache(siteId);

            return(entries.FirstOrDefault(x => x != null && x.Id == departmentId));
        }
示例#3
0
 public static List <CategoryInfo> GetCategoryInfoList(int siteId)
 {
     return(CategoryManagerCache.GetCategoryInfoListByCache(siteId));
 }