Пример #1
0
        public ActionResult EditFullCutPromotion(FullCutPromotionModel model, int pmId = -1)
        {
            FullCutPromotionInfo fullCutPromotionInfo = AdminPromotions.AdminGetFullCutPromotionById(pmId);
            if (fullCutPromotionInfo == null)
                return PromptView("满减促销不存在");

            if (ModelState.IsValid)
            {
                fullCutPromotionInfo.Name = model.PromotionName;
                fullCutPromotionInfo.Type = model.Type;
                fullCutPromotionInfo.StartTime = model.StartTime;
                fullCutPromotionInfo.EndTime = model.EndTime;
                fullCutPromotionInfo.UserRankLower = model.UserRankLower;
                fullCutPromotionInfo.State = model.State;
                fullCutPromotionInfo.LimitMoney1 = model.LimitMoney1;
                fullCutPromotionInfo.CutMoney1 = model.CutMoney1;
                fullCutPromotionInfo.LimitMoney2 = model.LimitMoney2;
                fullCutPromotionInfo.CutMoney2 = model.CutMoney2;
                fullCutPromotionInfo.LimitMoney3 = model.LimitMoney3;
                fullCutPromotionInfo.CutMoney3 = model.CutMoney3;

                AdminPromotions.UpdateFullCutPromotion(fullCutPromotionInfo);
                AddMallAdminLog("修改满减促销活动", "修改满减促销活动,满减促销活动ID为:" + pmId);
                return PromptView("满减促销活动修改成功");
            }

            LoadFullCutPromotion();
            return View(model);
        }
Пример #2
0
        public ActionResult AddFullCutPromotion(FullCutPromotionModel model)
        {
            if (ModelState.IsValid)
            {
                FullCutPromotionInfo fullCutPromotionInfo = new FullCutPromotionInfo()
                {
                    StoreId = model.StoreId,
                    Name = model.PromotionName,
                    Type = model.Type,
                    StartTime = model.StartTime,
                    EndTime = model.EndTime,
                    UserRankLower = model.UserRankLower,
                    State = model.State,
                    LimitMoney1 = model.LimitMoney1,
                    CutMoney1 = model.CutMoney1,
                    LimitMoney2 = model.LimitMoney2,
                    CutMoney2 = model.CutMoney2,
                    LimitMoney3 = model.LimitMoney3,
                    CutMoney3 = model.CutMoney3
                };

                AdminPromotions.CreateFullCutPromotion(fullCutPromotionInfo);
                AddMallAdminLog("添加满减促销活动", "添加满减促销活动,满减促销活动为:" + model.PromotionName);
                return PromptView("满减促销活动添加成功");
            }

            LoadFullCutPromotion();
            return View(model);
        }
Пример #3
0
        public ActionResult EditFullCutPromotion(int pmId = -1)
        {
            FullCutPromotionInfo fullCutPromotionInfo = AdminPromotions.AdminGetFullCutPromotionById(pmId);
            if (fullCutPromotionInfo == null)
                return PromptView("满减促销活动不存在");

            FullCutPromotionModel model = new FullCutPromotionModel();
            model.PromotionName = fullCutPromotionInfo.Name;
            model.Type = fullCutPromotionInfo.Type;
            model.StartTime = fullCutPromotionInfo.StartTime;
            model.EndTime = fullCutPromotionInfo.EndTime;
            model.UserRankLower = fullCutPromotionInfo.UserRankLower;
            model.State = fullCutPromotionInfo.State;
            model.LimitMoney1 = fullCutPromotionInfo.LimitMoney1;
            model.CutMoney1 = fullCutPromotionInfo.CutMoney1;
            model.LimitMoney2 = fullCutPromotionInfo.LimitMoney2;
            model.CutMoney2 = fullCutPromotionInfo.CutMoney2;
            model.LimitMoney3 = fullCutPromotionInfo.LimitMoney3;
            model.CutMoney3 = fullCutPromotionInfo.CutMoney3;

            model.StoreId = fullCutPromotionInfo.StoreId;
            model.StoreName = AdminStores.GetStoreById(fullCutPromotionInfo.StoreId).Name;

            LoadFullCutPromotion();

            return View(model);
        }
Пример #4
0
 public ActionResult AddFullCutPromotion()
 {
     FullCutPromotionModel model = new FullCutPromotionModel();
     LoadFullCutPromotion();
     return View(model);
 }