public ActionResult Edit([Bind(Include = "CampaignID,EndDate,StartDate")] CampaignDateViewModel campaignViewModel)
 {
     if (ModelState.IsValid)
     {
         if (iCampaign.saveDates(campaignViewModel.StartDate, campaignViewModel.EndDate))
         {
             return(RedirectToAction("Details", new { id = 1 }));
         }
     }
     return(View(campaignViewModel));
 }
        // GET: Campaign/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CampaignDateViewModel campaignViewModel = iCampaign.getCampaignViewModel();

            if (campaignViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(campaignViewModel));
        }
 // Save dates to DB
 public bool saveDates(DateTime startDate, DateTime endDate)
 {
     if (validateDates(startDate, endDate))
     {
         CampaignDateViewModel campaign = dataGatewayCampaign.SelectByID(campaignID);
         campaign.StartDate = startDate;
         campaign.EndDate   = endDate;
         dataGatewayCampaign.Update(campaign);
         return(true);
     }
     else
     {
         return(false);
     }
 }