public ActionResult AddStoreShipTemplate(AddStoreShipTemplateModel model) { if (ModelState.IsValid) { StoreShipTemplateInfo storeShipTemplateInfo = new StoreShipTemplateInfo() { StoreId = WorkContext.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); AddStoreAdminLog("添加店铺配送模板", "添加店铺配送模板,店铺配送模板为:" + model.TemplateTitle); return PromptView("店铺配送模板添加成功"); } else { return PromptView("店铺配送模板添加失败"); } } ViewData["referer"] = MallUtils.GetStoreAdminRefererCookie(); return View(model); }
public ActionResult AddStoreShipTemplate() { AddStoreShipTemplateModel model = new AddStoreShipTemplateModel(); ViewData["referer"] = MallUtils.GetStoreAdminRefererCookie(); return View(model); }