コード例 #1
0
        public DataTable GetOwenTreeByCatchBySysCode(string User_ID, string SysRole_IDS, string ModuleIDLike)
        {
            string str  = ConfigurationManager.AppSettings["IsEnableDataCache"];
            bool   flag = false;

            if (!string.IsNullOrEmpty(str) && (str.ToLower().Equals("true") || str.ToLower().Equals("false")))
            {
                flag = bool.Parse(str);
            }
            if (flag)
            {
                string cacheName = "Owen_LeftTree_" + clsUtility.GetSysCode() + "_" + User_ID + "_" + ModuleIDLike;
                object cache     = CacheClass.GetCache(cacheName);
                if (cache == null)
                {
                    try
                    {
                        cache = this.GetOwenTreeBySysCode(User_ID, SysRole_IDS, ModuleIDLike);
                        if (cache != null)
                        {
                            int num = 1;
                            CacheClass.AddCache(cacheName, DateTime.Now.AddMinutes((double)num), cache);
                        }
                    }
                    catch
                    {
                    }
                }
                return((DataTable)cache);
            }
            object obj3 = this.GetOwenTreeBySysCode(User_ID, SysRole_IDS, ModuleIDLike);

            CacheClass.DeleteCache("Owen_LeftTree_" + clsUtility.GetSysCode() + "_" + User_ID + "_" + ModuleIDLike);
            return((DataTable)obj3);
        }
コード例 #2
0
ファイル: SysManageController.cs プロジェクト: qqpedily/zsk
        public IHttpActionResult GetCache()
        {
            object IdentityTypeList = CacheClass.GetCache("IdentityTypeList");

            //object val= CacheClass.GetCache("ceshi");
            return(Json(IdentityTypeList));
        }
コード例 #3
0
        public string GetSetMapByCacheBySysCode(string ModuleId, string type)
        {
            string cacheName = "GetSetMap_" + clsUtility.GetSysCode() + "_" + ModuleId + type;
            object cache     = CacheClass.GetCache(cacheName);

            if (cache == null)
            {
                try
                {
                    cache = this.GetSetMapBySysCode(ModuleId, type);
                    if (cache != null)
                    {
                        int num = 1;
                        CacheClass.AddCache(cacheName, DateTime.Now.AddMinutes((double)num), cache);
                    }
                }
                catch
                {
                }
            }
            return(cache.ToString());
        }
コード例 #4
0
        public DataTable GetOwenModuleListByCacheBySysCode(string User_ID, string SysRole_IDS)
        {
            string cacheName = "Owen_TopTree_" + clsUtility.GetSysCode() + "_" + User_ID;
            object cache     = CacheClass.GetCache(cacheName);

            if (cache == null)
            {
                try
                {
                    cache = this.GetModuleListBySysCode_Power(User_ID, SysRole_IDS).Tables[0];
                    if (cache != null)
                    {
                        int num = 1;
                        CacheClass.AddCache(cacheName, DateTime.Now.AddMinutes((double)num), cache);
                    }
                }
                catch
                {
                }
            }
            return((DataTable)cache);
        }
コード例 #5
0
        public DataTable GetOwenModuleListByCache(string DoctorInfo_ID, string SysRole_IDS)
        {
            string cacheName = "Owen_TopTree_" + DoctorInfo_ID;
            object cache     = CacheClass.GetCache(cacheName);

            if (cache == null)
            {
                try
                {
                    cache = this.GetSysModuleList_Power(DoctorInfo_ID, SysRole_IDS).Tables[0];
                    if (cache != null)
                    {
                        int num = 1;
                        CacheClass.AddCache(cacheName, DateTime.Now.AddMinutes((double)num), cache);
                    }
                }
                catch
                {
                }
            }
            return((DataTable)cache);
        }
コード例 #6
0
        public DataTable GetListByCache()
        {
            string cacheName = "MODEL_SysModuleList";
            object cache     = CacheClass.GetCache(cacheName);

            cache = null;
            if (cache == null)
            {
                try
                {
                    cache = this.GetSysModuleList("").Tables[0];
                    if (cache != null)
                    {
                        int num = 1;
                        CacheClass.AddCache(cacheName, DateTime.Now.AddMinutes((double)num), cache);
                    }
                }
                catch
                {
                }
            }
            return((DataTable)cache);
        }