Exemplo n.º 1
0
        public ActionResult EditBuySendPromotion(BuySendPromotionModel model, int pmId = -1)
        {
            BuySendPromotionInfo buySendPromotionInfo = AdminPromotions.AdminGetBuySendPromotionById(pmId);
            if (buySendPromotionInfo == null)
                return PromptView("买送促销不存在");

            if (ModelState.IsValid)
            {
                buySendPromotionInfo.StartTime = model.StartTime;
                buySendPromotionInfo.EndTime = model.EndTime;
                buySendPromotionInfo.UserRankLower = model.UserRankLower;
                buySendPromotionInfo.State = model.State;
                buySendPromotionInfo.Name = model.PromotionName;
                buySendPromotionInfo.Type = model.Type;
                buySendPromotionInfo.BuyCount = model.BuyCount;
                buySendPromotionInfo.SendCount = model.SendCount;

                AdminPromotions.UpdateBuySendPromotion(buySendPromotionInfo);
                AddMallAdminLog("修改买送促销", "修改买送促销,买送促销ID为:" + pmId);
                return PromptView("买送促销修改成功");
            }

            LoadBuySendPromotion();
            return View(model);
        }
Exemplo n.º 2
0
        public ActionResult AddBuySendPromotion(BuySendPromotionModel model)
        {
            if (ModelState.IsValid)
            {
                BuySendPromotionInfo buySendPromotionInfo = new BuySendPromotionInfo()
                {
                    StoreId = model.StoreId,
                    StartTime = model.StartTime,
                    EndTime = model.EndTime,
                    UserRankLower = model.UserRankLower,
                    State = model.State,
                    Name = model.PromotionName,
                    Type = model.Type,
                    BuyCount = model.BuyCount,
                    SendCount = model.SendCount
                };

                AdminPromotions.CreateBuySendPromotion(buySendPromotionInfo);
                AddMallAdminLog("添加买送促销", "添加买送促销,买送促销为:" + model.PromotionName);
                return PromptView("买送促销添加成功");
            }

            LoadBuySendPromotion();
            return View(model);
        }
Exemplo n.º 3
0
        public ActionResult EditBuySendPromotion(int pmId = -1)
        {
            BuySendPromotionInfo buySendPromotionInfo = AdminPromotions.AdminGetBuySendPromotionById(pmId);
            if (buySendPromotionInfo == null)
                return PromptView("买送促销不存在");

            BuySendPromotionModel model = new BuySendPromotionModel();
            model.StartTime = buySendPromotionInfo.StartTime;
            model.EndTime = buySendPromotionInfo.EndTime;
            model.UserRankLower = buySendPromotionInfo.UserRankLower;
            model.State = buySendPromotionInfo.State;
            model.PromotionName = buySendPromotionInfo.Name;
            model.Type = buySendPromotionInfo.Type;
            model.BuyCount = buySendPromotionInfo.BuyCount;
            model.SendCount = buySendPromotionInfo.SendCount;

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

            LoadBuySendPromotion();
            return View(model);
        }
Exemplo n.º 4
0
 public ActionResult AddBuySendPromotion()
 {
     BuySendPromotionModel model = new BuySendPromotionModel();
     LoadBuySendPromotion();
     return View(model);
 }