Пример #1
0
        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);
                AddAdminOperateLog("修改满赠促销活动", "修改满赠促销活动,满赠促销活动ID为:" + pmId);
                return PromptView("满赠促销活动修改成功");
            }

            LoadFullSendPromotion();
            return View(model);
        }
Пример #2
0
        public ActionResult AddFullSendPromotion(FullSendPromotionModel model)
        {
            if (ModelState.IsValid)
            {
                FullSendPromotionInfo fullSendPromotionInfo = new FullSendPromotionInfo()
                {
                    Name = model.PromotionName,
                    StartTime = model.StartTime,
                    EndTime = model.EndTime,
                    UserRankLower = model.UserRankLower,
                    State = model.State,
                    LimitMoney = model.LimitMoney,
                    AddMoney = model.AddMoney
                };

                AdminPromotions.CreateFullSendPromotion(fullSendPromotionInfo);
                AddAdminOperateLog("添加满赠促销活动", "添加满赠促销活动,满赠促销活动为:" + model.PromotionName);
                return PromptView("满赠促销活动添加成功");
            }

            LoadFullSendPromotion();
            return View(model);
        }
Пример #3
0
        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;

            LoadFullSendPromotion();

            return View(model);
        }
Пример #4
0
 public ActionResult AddFullSendPromotion()
 {
     FullSendPromotionModel model = new FullSendPromotionModel();
     LoadFullSendPromotion();
     return View(model);
 }