public void ReloadConnectWayListCache() { string key = GlobalKey.CONNECTWAY_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadIbuytimeListCache() { string key = GlobalKey.IBUYTIME_LIST; MangaCache.Remove(key); GetList(true); }
/// <summary> /// 重新加载省份列表缓存 /// </summary> public void ReloadProvinceListCache() { string key = GlobalKey.PROVINCE_LIST; MangaCache.Remove(key); GetProvinceList(true); }
public void ReloadInfoTypeListCache() { string key = GlobalKey.INFOTYPE_LIST; MangaCache.Remove(key); GetList(true); }
/// <summary> /// 更新指定公司的客户线索缓存 /// </summary> /// <param name="corpid"></param> public void ReloadCustomerListByCorporationCache(int corpid) { string key = GlobalKey.CUSTOMER_LIST + "_corp" + corpid; MangaCache.Remove(key); GetCustomerListByCorporation(corpid, true); }
public void ReloadCarModelListCache() { string key = GlobalKey.CARMODEL_LIST; MangaCache.Remove(key); GetCarModelList(true); }
public void ReloadCarSeriesListCache() { string key = GlobalKey.CARSERIES_LIST; MangaCache.Remove(key); GetCarSeriesList(true); }
public void ReloadTracktagListCache() { string key = GlobalKey.TRACKTAG_LIST; MangaCache.Remove(key); GetList(true); }
/// <summary> /// 重新加载城市列表缓存 /// </summary> public void ReloadCityListCache() { string key = GlobalKey.CITY_LIST; MangaCache.Remove(key); GetCityList(true); }
public void ReloadCustomerLevelListCache() { string key = GlobalKey.CUSTOMERLEVEL_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadModuleListCache() { string key = GlobalKey.MODULE_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadTalkListCache() { string key = GlobalKey.TALK_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadGiveupCauseListCache() { string key = GlobalKey.GIVEUPCAUSE_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadNoticeListCache() { string key = GlobalKey.NOTICE_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadPaymentWayListCache() { string key = GlobalKey.PAYMENTWAY_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadCarBrandListCache() { string key = GlobalKey.CARBRAND_LIST; MangaCache.Remove(key); GetCarBrandList(true); }
public void ReloadInfoSourceListCache() { string key = GlobalKey.INFOSOURCE_LIST; MangaCache.Remove(key); GetList(true); }
public void ReloadPowerGroupListCache() { string key = GlobalKey.POWERGROUP_LIST; MangaCache.Remove(key); GetList(true); }
/// <summary> /// 重新加载地区列表缓存 /// </summary> public void ReloadDistrictListCache() { string key = GlobalKey.DISTRICT_LIST; MangaCache.Remove(key); GetDistrictList(true); }
public void ReloadCorporationListCache() { string key = GlobalKey.CORPORATION_LIST; MangaCache.Remove(key); GetList(true); }
/// <summary> /// 加载配置文件,并且封装配置信息 /// </summary> /// <returns></returns> public static CommConfig GetConfig() { CommConfig config = MangaCache.GetLocal(GlobalKey.COMMCONFIG) as CommConfig;//尝试从缓存获取配置信息类 if (config == null) { //当缓存中不存在时建立 string path = GetFilePath(); XmlDocument doc = new XmlDocument(); doc.Load(path); config = new CommConfig(doc); MangaCache.MaxLocalWithFile(GlobalKey.COMMCONFIG, config, path); } return(config); }
public static void Write(EventLogEntry entry) { try { if (entry.ApplicationType != ApplicationType.NoSet && (entry.EventType == EventType.Information || entry.EventType == EventType.Debug)) { entry.Uniquekey = ""; CommConfig config = CommConfig.GetConfig(); CommonDataProvider.Instance().WriteEventLogEntry(entry); return; } string key = string.Empty; if (entry.EventType == EventType.Warning) { key = GlobalKey.EVENTLOG_KEY + "_" + string.Format("{0}-{1}-{2}-{3}-{4}", entry.ApplicationID, entry.EntryID, entry.EventID, (int)entry.EventType, entry.Message.GetHashCode()); } else if (entry.EventType == EventType.Error && entry.Ex != null) { key = GlobalKey.EVENTLOG_KEY + "_" + string.Format("{0}-{1}-{2}-{3}-{4}-{5}", entry.ApplicationID, entry.EntryID, entry.EventID, (int)entry.EventType, entry.Ex.StackTrace.GetHashCode(), entry.Ex.Message.GetHashCode()); entry.Message = entry.Ex.Message + "-" + entry.Ex.StackTrace + "\r\n" + entry.Message; } else { key = GlobalKey.EVENTLOG_KEY + "_" + string.Format("{0}-{1}", (int)entry.EventType, entry.Message.GetHashCode()); } EventLogEntry oldentry = MangaCache.Get(key) as EventLogEntry; if (oldentry != null) { oldentry.PCount++; oldentry.LastUpdateTime = DateTime.Now; } else { DateTime time = DateTime.Now; entry.PCount = 1; entry.Uniquekey = key; entry.AddTime = time; entry.LastUpdateTime = time; CommConfig config = CommConfig.GetConfig(); CommonDataProvider.Instance().WriteEventLogEntry(entry); entry.PCount = 0; MangaCache.Add(key, entry, 30, TimeSpan.Zero, System.Web.Caching.CacheItemPriority.AboveNormal, new CacheItemRemovedCallback(RemovedCallback)); } } catch { } }
public List <PowerGroupInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetPowerGroupList().OrderBy(l => l.Sort).ToList()); } string key = GlobalKey.POWERGROUP_LIST; List <PowerGroupInfo> list = MangaCache.Get(key) as List <PowerGroupInfo>; if (list == null) { list = CommonDataProvider.Instance().GetPowerGroupList().OrderBy(l => l.Sort).ToList(); MangaCache.Max(key, list); } return(list); }
public List <TalkInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetTalkList()); } string key = GlobalKey.TALK_LIST; List <TalkInfo> list = MangaCache.Get(key) as List <TalkInfo>; if (list == null) { list = CommonDataProvider.Instance().GetTalkList(); MangaCache.Max(key, list); } return(list); }
public List <GiveupCauseInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetGiveupCauseList()); } string key = GlobalKey.GIVEUPCAUSE_LIST; List <GiveupCauseInfo> list = MangaCache.Get(key) as List <GiveupCauseInfo>; if (list == null) { list = CommonDataProvider.Instance().GetGiveupCauseList(); MangaCache.Max(key, list); } return(list); }
public List <CorporationInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetCorporationList().OrderBy(l => l.Sort).ToList()); } string key = GlobalKey.CORPORATION_LIST; List <CorporationInfo> list = MangaCache.Get(key) as List <CorporationInfo>; if (list == null) { list = CommonDataProvider.Instance().GetCorporationList().OrderBy(l => l.Sort).ToList(); MangaCache.Max(key, list); } return(list); }
public List <PaymentWayInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetPaymentWayList()); } string key = GlobalKey.PAYMENTWAY_LIST; List <PaymentWayInfo> list = MangaCache.Get(key) as List <PaymentWayInfo>; if (list == null) { list = CommonDataProvider.Instance().GetPaymentWayList(); MangaCache.Max(key, list); } return(list); }
public List <ModuleInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetModuleList().OrderBy(l => l.Sort).ToList()); } string key = GlobalKey.MODULE_LIST; List <ModuleInfo> list = MangaCache.Get(key) as List <ModuleInfo>; if (list == null) { list = CommonDataProvider.Instance().GetModuleList().OrderBy(l => l.Sort).ToList(); MangaCache.Max(key, list); } return(list); }
public List <CustomerLevelInfo> GetList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetCustomerLevelList().OrderBy(l => l.Sort).ToList()); } string key = GlobalKey.CUSTOMERLEVEL_LIST; List <CustomerLevelInfo> list = MangaCache.Get(key) as List <CustomerLevelInfo>; if (list == null) { list = CommonDataProvider.Instance().GetCustomerLevelList().OrderBy(l => l.Sort).ToList(); MangaCache.Max(key, list); } return(list); }
public List <CarBrandInfo> GetCarBrandList(bool fromCache = false) { if (!fromCache) { return(CommonDataProvider.Instance().GetCarBrandList().OrderBy(l => l.NameIndex).ThenBy(l => l.Name).ToList()); } string key = GlobalKey.CARBRAND_LIST; List <CarBrandInfo> list = MangaCache.Get(key) as List <CarBrandInfo>; if (list == null) { list = CommonDataProvider.Instance().GetCarBrandList().OrderBy(l => l.NameIndex).ThenBy(l => l.Name).ToList(); MangaCache.Max(key, list); } return(list); }