public ActionResult EditFullSendPromotion(FullSendPromotionModel model, int pmId = -1) { FullSendPromotionInfo fullSendPromotionInfo = AdminPromotions.AdminGetFullSendPromotionById(pmId); if (fullSendPromotionInfo == null) return PromptView("满赠促销活动不存在"); if (ModelState.IsValid) { fullSendPromotionInfo.Name = model.PromotionName; fullSendPromotionInfo.StartTime = model.StartTime; fullSendPromotionInfo.EndTime = model.EndTime; fullSendPromotionInfo.UserRankLower = model.UserRankLower; fullSendPromotionInfo.State = model.State; fullSendPromotionInfo.LimitMoney = model.LimitMoney; fullSendPromotionInfo.AddMoney = model.AddMoney; AdminPromotions.UpdateFullSendPromotion(fullSendPromotionInfo); AddMallAdminLog("修改满赠促销活动", "修改满赠促销活动,满赠促销活动ID为:" + pmId); return PromptView("满赠促销活动修改成功"); } LoadFullSendPromotion(); return View(model); }
public ActionResult AddFullSendPromotion(FullSendPromotionModel model) { if (ModelState.IsValid) { FullSendPromotionInfo fullSendPromotionInfo = new FullSendPromotionInfo() { StoreId = model.StoreId, Name = model.PromotionName, StartTime = model.StartTime, EndTime = model.EndTime, UserRankLower = model.UserRankLower, State = model.State, LimitMoney = model.LimitMoney, AddMoney = model.AddMoney }; AdminPromotions.CreateFullSendPromotion(fullSendPromotionInfo); AddMallAdminLog("添加满赠促销活动", "添加满赠促销活动,满赠促销活动为:" + model.PromotionName); return PromptView("满赠促销活动添加成功"); } LoadFullSendPromotion(); return View(model); }
public ActionResult EditFullSendPromotion(int pmId = -1) { FullSendPromotionInfo fullSendPromotionInfo = AdminPromotions.AdminGetFullSendPromotionById(pmId); if (fullSendPromotionInfo == null) return PromptView("满赠促销活动不存在"); FullSendPromotionModel model = new FullSendPromotionModel(); model.PromotionName = fullSendPromotionInfo.Name; model.StartTime = fullSendPromotionInfo.StartTime; model.EndTime = fullSendPromotionInfo.EndTime; model.UserRankLower = fullSendPromotionInfo.UserRankLower; model.State = fullSendPromotionInfo.State; model.LimitMoney = fullSendPromotionInfo.LimitMoney; model.AddMoney = fullSendPromotionInfo.AddMoney; model.StoreId = fullSendPromotionInfo.StoreId; model.StoreName = AdminStores.GetStoreById(fullSendPromotionInfo.StoreId).Name; LoadFullSendPromotion(); return View(model); }
public ActionResult AddFullSendPromotion() { FullSendPromotionModel model = new FullSendPromotionModel(); LoadFullSendPromotion(); return View(model); }