public ActionResult AddStoreShipTemplate(AddStoreShipTemplateModel model, int storeId = -1) { StoreInfo storeInfo = AdminStores.GetStoreById(storeId); if (storeInfo == null) return PromptView("店铺不存在"); if (ModelState.IsValid) { StoreShipTemplateInfo storeShipTemplateInfo = new StoreShipTemplateInfo() { StoreId = storeId, Title = model.TemplateTitle, Free = model.Free, Type = model.Type }; int storeSTid = AdminStores.CreateStoreShipTemplate(storeShipTemplateInfo); if (storeSTid > 0) { StoreShipFeeInfo storeShipFeeInfo = new StoreShipFeeInfo() { StoreSTid = storeSTid, RegionId = -1, StartValue = model.StartValue, StartFee = model.StartFee, AddValue = model.AddValue, AddFee = model.AddFee }; AdminStores.CreateStoreShipFee(storeShipFeeInfo); AddMallAdminLog("添加店铺配送模板", "添加店铺配送模板,店铺配送模板为:" + model.TemplateTitle); return PromptView("店铺配送模板添加成功"); } else { return PromptView("店铺配送模板添加失败"); } } ViewData["referer"] = MallUtils.GetMallAdminRefererCookie(); return View(model); }
public ActionResult AddStoreShipTemplate(int storeId = -1) { StoreInfo storeInfo = AdminStores.GetStoreById(storeId); if (storeInfo == null) return PromptView("店铺不存在"); AddStoreShipTemplateModel model = new AddStoreShipTemplateModel(); ViewData["referer"] = MallUtils.GetMallAdminRefererCookie(); return View(model); }