Example #1
0
        public static bool ExistsSettingCateByName(string strCateName)
        {
            IList <SettingCategoryInfo> cacheSettingCategoryList = SettingCategory.GetCacheSettingCategoryList();
            bool result;

            if (cacheSettingCategoryList != null && cacheSettingCategoryList.Count > 0)
            {
                result = ((from p in cacheSettingCategoryList
                           where p.CateName == strCateName
                           select p).FirstOrDefault <SettingCategoryInfo>() != null);
            }
            else
            {
                result = false;
            }
            return(result);
        }
Example #2
0
        public static SettingCategoryInfo GetCacheSettingCategory(int intCateID)
        {
            IList <SettingCategoryInfo> cacheSettingCategoryList = SettingCategory.GetCacheSettingCategoryList();
            SettingCategoryInfo         result;

            if (cacheSettingCategoryList != null && cacheSettingCategoryList.Count > 0)
            {
                result = (from p in cacheSettingCategoryList
                          where p.AutoID.Equals(intCateID)
                          select p).FirstOrDefault <SettingCategoryInfo>();
            }
            else
            {
                result = null;
            }
            return(result);
        }