public ActionResult Mall(MallModel model) { if (ModelState.IsValid) { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; mallConfigInfo.IsGuestSC = model.IsGuestSC; mallConfigInfo.SCSubmitType = model.SCSubmitType; mallConfigInfo.GuestSCCount = model.GuestSCCount; mallConfigInfo.MemberSCCount = model.MemberSCCount; mallConfigInfo.SCExpire = model.SCExpire; mallConfigInfo.OSNFormat = model.OSNFormat; mallConfigInfo.OnlinePayExpire = model.OnlinePayExpire; mallConfigInfo.OfflinePayExpire = model.OfflinePayExpire; mallConfigInfo.BroHisCount = model.BroHisCount; mallConfigInfo.MaxShipAddress = model.MaxShipAddress; mallConfigInfo.FavoriteProductCount = model.FavoriteProductCount; mallConfigInfo.FavoriteStoreCount = model.FavoriteStoreCount; BMAConfig.SaveMallConfig(mallConfigInfo); Emails.ResetMall(); SMSes.ResetMall(); AddMallAdminLog("修改商城设置"); return PromptView(Url.Action("mall"), "修改商城设置成功"); } return View(model); }
public ActionResult Mall() { MallConfigInfo mallConfigInfo = BMAConfig.MallConfig; MallModel model = new MallModel(); model.IsGuestSC = mallConfigInfo.IsGuestSC; model.SCSubmitType = mallConfigInfo.SCSubmitType; model.GuestSCCount = mallConfigInfo.GuestSCCount; model.MemberSCCount = mallConfigInfo.MemberSCCount; model.SCExpire = mallConfigInfo.SCExpire; model.OSNFormat = mallConfigInfo.OSNFormat; model.OnlinePayExpire = mallConfigInfo.OnlinePayExpire; model.OfflinePayExpire = mallConfigInfo.OfflinePayExpire; model.BroHisCount = mallConfigInfo.BroHisCount; model.MaxShipAddress = mallConfigInfo.MaxShipAddress; model.FavoriteProductCount = mallConfigInfo.FavoriteProductCount; model.FavoriteStoreCount = mallConfigInfo.FavoriteStoreCount; return View(model); }