示例#1
0
 public void DeleteSetting(as_settings item)
 {
     try
     {
         RDL.CacheManager.PurgeCacheItems("as_settings");
         db.DeleteSetting(item.id);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
示例#2
0
        public bool SaveSetting(as_settings item)
        {
            try {
                db.SaveSetting(item);

                RDL.CacheManager.PurgeCacheItems("as_settings");
                return(true);
            }
            catch (Exception ex) {
                RDL.Debug.LogError(ex);
                return(false);
            }
        }
示例#3
0
        public as_settings GetSetting(int id)
        {
            var res = new as_settings();
            var key = "as_settings_id_" + id;

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