Ejemplo n.º 1
0
 public ServiceResult Save(Dictionary <string, string> datas)
 {
     return(Json(() =>
     {
         List <ConfigSaveViewModel> list = new List <ConfigSaveViewModel>();
         foreach (var data in datas)
         {
             if (!string.IsNullOrEmpty(data.Key))
             {
                 list.Add(new ConfigSaveViewModel()
                 {
                     Id = data.Key, Value = data.Value
                 });
             }
         }
         BaseConfig.Save(list.ToArray(), UserId);
         return new ServiceResult(ServiceResultCode.Success);
     }, "保存失败"));
 }