Пример #1
0
        public ActionResult EditPublishedCampaign(UpdatePublishedCampaignEditModel model)
        {
            if (ModelState.IsValid)
            {
                _campaignService.EditPublishedCampaign(model);

                model.FeedbackMessage = FeedbackMessageModel.CreateWarningMessage("Campaign end date upadted successfully");
            }
            return(PartialView(model));
        }
Пример #2
0
        public void EditPublishedCampaign(UpdatePublishedCampaignEditModel model)
        {
            Campaign campaign = null;

            if (model.CampaignId > 0)
            {
                campaign = _campaignRepository.GetById(model.CampaignId);
            }

            campaign.EndDate = model.CampaignEndDate.Value;
            campaign         = _campaignRepository.Save(campaign);
        }