Beispiel #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);
        }
Beispiel #2
0
        public DataTable GetOwenTreeByCatchBySysCode(string User_ID, string SysRole_IDS, string ModuleIDLike, bool IsEnableDataCache)
        {
            DataTable table = new DataTable();

            if (IsEnableDataCache)
            {
                return(this.GetOwenTreeByCatchBySysCode(User_ID, SysRole_IDS, ModuleIDLike));
            }
            table = this.GetOwenTreeBySysCode(User_ID, SysRole_IDS, ModuleIDLike);
            CacheClass.DeleteCache("Owen_LeftTree_" + clsUtility.GetSysCode() + "_" + User_ID + "_" + ModuleIDLike);
            return(table);
        }
Beispiel #3
0
        public void ClearCacheFormulations_Dict()
        {
            string cacheName = "Formulations_Dict";

            CacheClass.DeleteCache(cacheName);
        }