예제 #1
0
        public ActionResult EditStoreShipTemplate(EditStoreShipTemplateModel model, int storeSTid = -1)
        {
            StoreShipTemplateInfo storeShipTemplateInfo = AdminStores.GetStoreShipTemplateById(storeSTid);
            if (storeShipTemplateInfo == null)
                return PromptView("店铺配送模板不存在");
            if (storeShipTemplateInfo.StoreId != WorkContext.StoreId)
                return PromptView("不能操作其它店铺的配送模板");

            if (ModelState.IsValid)
            {
                storeShipTemplateInfo.Title = model.TemplateTitle;
                storeShipTemplateInfo.Free = model.Free;
                storeShipTemplateInfo.Type = model.Type;

                AdminStores.UpdateStoreShipTemplate(storeShipTemplateInfo);
                AddStoreAdminLog("修改店铺配送模板", "修改店铺配送模板,店铺配送模板ID为:" + storeSTid);
                return PromptView("店铺配送模板修改成功");
            }

            ViewData["referer"] = MallUtils.GetStoreAdminRefererCookie();
            return View(model);
        }
예제 #2
0
        public ActionResult EditStoreShipTemplate(int storeSTid = -1)
        {
            StoreShipTemplateInfo storeShipTemplateInfo = AdminStores.GetStoreShipTemplateById(storeSTid);
            if (storeShipTemplateInfo == null)
                return PromptView("店铺配送模板不存在");
            if (storeShipTemplateInfo.StoreId != WorkContext.StoreId)
                return PromptView("不能操作其它店铺的配送模板");

            EditStoreShipTemplateModel model = new EditStoreShipTemplateModel();
            model.TemplateTitle = storeShipTemplateInfo.Title;
            model.Free = storeShipTemplateInfo.Free;
            model.Type = storeShipTemplateInfo.Type;

            ViewData["referer"] = MallUtils.GetStoreAdminRefererCookie();
            return View(model);
        }