public ActionResult Performance(PerformanceModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.ImageCDN = model.ImageCDN == null ? "" : model.ImageCDN; mallConfigInfo.CSSCDN = model.CSSCDN == null ? "" : model.CSSCDN; mallConfigInfo.ScriptCDN = model.ScriptCDN == null ? "" : model.ScriptCDN; mallConfigInfo.OnlineUserExpire = model.OnlineUserExpire; mallConfigInfo.UpdateOnlineTimeSpan = model.UpdateOnlineTimeSpan; mallConfigInfo.MaxOnlineCount = model.MaxOnlineCount; mallConfigInfo.OnlineCountExpire = model.OnlineCountExpire; mallConfigInfo.IsStatBrowser = model.IsStatBrowser; mallConfigInfo.IsStatOS = model.IsStatOS; mallConfigInfo.IsStatRegion = model.IsStatRegion; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改性能设置"); return PromptView(Url.Action("performance"), "修改性能设置成功"); } return View(model); }
public ActionResult Performance() { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; PerformanceModel model = new PerformanceModel(); model.ImageCDN = mallConfigInfo.ImageCDN; model.CSSCDN = mallConfigInfo.CSSCDN; model.ScriptCDN = mallConfigInfo.ScriptCDN; model.OnlineUserExpire = mallConfigInfo.OnlineUserExpire; model.UpdateOnlineTimeSpan = mallConfigInfo.UpdateOnlineTimeSpan; model.MaxOnlineCount = mallConfigInfo.MaxOnlineCount; model.OnlineCountExpire = mallConfigInfo.OnlineCountExpire; model.IsStatBrowser = mallConfigInfo.IsStatBrowser; model.IsStatOS = mallConfigInfo.IsStatOS; model.IsStatRegion = mallConfigInfo.IsStatRegion; return View(model); }