예제 #1
0
 public void DeleteSettingCategory(as_settingCategories item)
 {
     try
     {
         RDL.CacheManager.PurgeCacheItems("as_settingcategories");
         db.DeleteSettingCategory(item.id);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
예제 #2
0
        public as_settingCategories GetSettingCategories(int id)
        {
            var res = new as_settingCategories();
            var key = "as_settingcategories_id_" + id;

            if (CacheManager.EnableCaching && CacheManager.Cache[key] != null)
            {
                res = (as_settingCategories)CacheManager.Cache[key];
            }
            else
            {
                try
                {
                    res = db.GetSettingCategory(id);
                    CacheManager.CacheData(key, res);
                }
                catch (Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            return(res);
        }