Exemplo n.º 1
0
        public as_userCheckSet GetUserCheckSet(int id)
        {
            var res = new as_userCheckSet();

            //var key = "as_userCheckSet_" + id.ToString();
            //if (CacheManager.EnableCaching && CacheManager.Cache[key] != null)
            //{
            //    res = (as_userCheckSet)CacheManager.Cache[key];
            //}
            //else
            //{
            try
            {
                res = db.GetUserCheckSet(id);
                //CacheManager.CacheData(key, res);
            }
            catch (Exception ex)
            {
                Debug.LogError(ex);
            }

            //}

            return(res);
        }
Exemplo n.º 2
0
 public void SaveUserCheckSet(as_userCheckSet item)
 {
     try
     {
         RDL.CacheManager.PurgeCacheItems("as_userCheckSet_" + item.id);
         db.SaveUserCheckSet(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Exemplo n.º 3
0
        public as_userCheckSet AddUserCheckSet(string name, string code, string roles)
        {
            var res = new as_userCheckSet();

            try
            {
                res = new as_userCheckSet {
                    id = 0, name = name, code = code, roles = String.IsNullOrEmpty(roles) ? "admin" : roles
                };
                db.SaveUserCheckSet(res);
            }
            catch (Exception ex) { }
            return(res);
        }