/// <summary> /// 更新配置信息 /// </summary> /// <param name="model">The model.</param> /// <returns>true if XXXX, false otherwise.</returns> public static bool UpdateValue(ConfigModel model) { using (var dal = FactoryDispatcher.ConfigFactory()) { return(dal.UpdateValue(model)); } }
/// <summary> /// 更新配置信息 /// </summary> /// <param name="model">The model.</param> /// <returns>true if XXXX, false otherwise.</returns> public static bool UpdateValue(ConfigModel model) { using (var dal = FactoryDispatcher.ConfigFactory()) { bool flag = dal.UpdateValue(model); if (flag) { WebCacheHelper.DeleteDepFile(cacheKey); } return(flag); } }
/// <summary> /// 获取配置数据 /// </summary> /// <returns>List<ConfigModel>.</returns> public static List <ConfigModel> GetConfigList() { List <ConfigModel> lst = WebCacheHelper <List <ConfigModel> > .Get(cacheKey); if (lst == null) { using (var dal = FactoryDispatcher.ConfigFactory()) { lst = dal.List(); WebCacheHelper.Insert(cacheKey, lst, new System.Web.Caching.CacheDependency(WebCacheHelper.GetDepFile(cacheKey))); } } return(lst); }
/// <summary> /// 更新配置信息 /// </summary> /// <param name="lst">The LST.</param> /// <returns>true if XXXX, false otherwise.</returns> public static bool UpdateValue(List <ConfigModel> lst) { using (var dal = FactoryDispatcher.ConfigFactory()) { foreach (var item in lst) { dal.UpdateValue(new ConfigModel() { Code = item.Code, Value = item.Value, Remark = item.Remark }); } return(true); } }