Exemplo n.º 1
0
 public static DataTable GetModules()
 {
     const string key = "VmgPortal.Portal.Module.GetModules";
     DataCaching data = new DataCaching();
     DataTable dtModuleControls = (DataTable)data.GetCache(key);
     if (dtModuleControls != null) return dtModuleControls;
     return DataAccessProvider.Instance().GetModules();
 }
Exemplo n.º 2
0
 public static PortalSetting GetSetting()
 {
     DataCaching data = new DataCaching();
     PortalSetting setting = (PortalSetting)data.GetCache(key);
     if (setting != null) return setting;
     setting = DataAccessProvider.Instance().GetPortalSetting();
     data.InsertCacheNoExpireTime(key, setting);
     return setting;
 }
Exemplo n.º 3
0
        public static DataTable GetModules()
        {
            const string key              = "VmgPortal.Portal.Module.GetModules";
            DataCaching  data             = new DataCaching();
            DataTable    dtModuleControls = (DataTable)data.GetCache(key);

            if (dtModuleControls != null)
            {
                return(dtModuleControls);
            }
            return(DataAccessProvider.Instance().GetModules());
        }
Exemplo n.º 4
0
        public static PortalSetting GetSetting()
        {
            DataCaching   data    = new DataCaching();
            PortalSetting setting = (PortalSetting)data.GetCache(key);

            if (setting != null)
            {
                return(setting);
            }
            setting = DataAccessProvider.Instance().GetPortalSetting();
            data.InsertCacheNoExpireTime(key, setting);
            return(setting);
        }
        public static DataTable GetAll()
        {
            const string key    = "VmgPortal.Portal.MainLanguages.GetAll";
            DataCaching  data   = new DataCaching();
            DataTable    dtLang = (DataTable)data.GetCache(key);

            if (dtLang != null)
            {
                return(dtLang);
            }
            dtLang = DataAccessProvider.Instance().GetAll();
            data.InsertCacheNoExpireTime(key, dtLang);
            return(dtLang);
        }
Exemplo n.º 6
0
        public static DataTable GetAll()
        {
            DataTable   retVal;
            DataCaching dataCaching = new DataCaching();
            string      cacheKey    = "Main.Languages_GetAll";

            retVal = (DataTable)dataCaching.GetCache(cacheKey);
            if (retVal == null)
            {
                retVal = LanguageDB.GetAll();
                dataCaching.InsertCacheNoExpireTime(cacheKey, retVal);
            }
            return(retVal);
        }
Exemplo n.º 7
0
        public static string GetValue(string _name)
        {
            DataCaching dataCaching = new DataCaching();
            object      _data       = dataCaching.GetCache(_name);

            if (_data != null)
            {
                return((string)_data);
            }
            else
            {
                string _retVal = SettingDB.GetValue(_name);
                dataCaching.InsertCacheNoExpireTime(_name, _retVal);
                return(_retVal);
            }
        }