public static List<Maticsoft.Model.SNS.Categories> GetAllList(int type) { string cacheKey = "GetAllList-" + type; object cache = DataCache.GetCache(cacheKey); if (cache == null) { try { cache = new Maticsoft.BLL.SNS.Categories().GetAllCateByCache(type); if (cache != null) { int num = Globals.SafeInt(Maticsoft.BLL.SysManage.ConfigSystem.GetValueByCache("ModelCache"), 30); DataCache.SetCache(cacheKey, cache, DateTime.Now.AddMinutes((double) num), TimeSpan.Zero); } } catch { } } return (List<Maticsoft.Model.SNS.Categories>) cache; }
public bool IsExistedCate(int categoryid) { Maticsoft.BLL.SNS.Categories categories = new Maticsoft.BLL.SNS.Categories(); return (categories.GetRecordCount("CategoryID=" + categoryid) > 0); }