private static void InitializeOnlinePaymentService() { FileConfigService fileConfigService = new FileConfigService(); var servicesConfig = fileConfigService.GetConfig("PaymentServices.json"); if (!string.IsNullOrEmpty(servicesConfig)) { } }
/// <summary> /// 配置短消息 /// </summary> private static void ConfigSMS() { FileConfigService fileConfigService = new FileConfigService(); var SMSConfig = fileConfigService.GetConfig("SMS.json"); if (!string.IsNullOrEmpty(SMSConfig)) { SMSAccountInfo.Initialize( JsonConvert.DeserializeObject<SMSAccountInfo>(SMSConfig)); } }
private void UpdateConfig(PublicConfig serachConfig) { FileConfigService fileConfigService = new FileConfigService(); fileConfigService.SaveConfig("SiteSerach.json",serachConfig.ToJson()); }
private PublicConfig GetConfig() { PublicConfig serachConfig = null; FileConfigService fileConfigService = new FileConfigService(); var SMSConfig = fileConfigService.GetConfig("SiteSerach.json"); if (!string.IsNullOrEmpty(SMSConfig)) { serachConfig = JsonConvert.DeserializeObject<PublicConfig>(SMSConfig); } else { serachConfig = new PublicConfig(); serachConfig.ConfigName = "站内搜索配置"; serachConfig.ConfigValue = "0"; serachConfig.CreatedTime = DateTime.Now; serachConfig.LastUpdatedTime = new DateTime(2014,1,1); } return serachConfig; }