コード例 #1
0
ファイル: Categories.cs プロジェクト: huaminglee/myyyyshop
 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;
 }
コード例 #2
0
ファイル: Categories.cs プロジェクト: huaminglee/myyyyshop
 public bool IsExistedCate(int categoryid)
 {
     Maticsoft.BLL.SNS.Categories categories = new Maticsoft.BLL.SNS.Categories();
     return (categories.GetRecordCount("CategoryID=" + categoryid) > 0);
 }