public ActionResult Edit([Bind(Include = "ID,Type")] CampaignType campaignType) { if (ModelState.IsValid) { db.Entry(campaignType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(campaignType)); }
public ActionResult Edit([Bind(Include = "ID,FirstName,LastName,Email,Phone")] CampaignLead campaignLead) { if (ModelState.IsValid) { db.Entry(campaignLead).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(campaignLead)); }
public ActionResult Edit([Bind(Include = "ID,Code,Name")] Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Edit([Bind(Include = "ID,Name")] EmailSystem emailSystem) { if (ModelState.IsValid) { db.Entry(emailSystem).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(emailSystem)); }
public ActionResult Edit([Bind(Include = "ID,Name,Description,Color")] Trade trade) { if (ModelState.IsValid) { db.Entry(trade).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(trade)); }
public ActionResult Edit([Bind(Include = "ID,CampaignID,HeadLine,SubHeadLine,KeyBannerImage,IntroductionMessage,CTAText,CTALink,SecondaryCaption,Column1Image,Column1Title,Column1Message,Column1CTAText,Column1CTALink,Column2Image,Column2Title,Column2Message,Column2CTAText,Column2CTALink,Tags,HeadLine1,SubHeadLine1,KeyBannerImage1,IntroductionMessage1,CTAText1,CTALink1,SecondaryCaption1,Column1Image1,Column1Title1,Column1Message1,Column1CTAText1,Column1CTALink1,Column2Image1,Column2Title1,Column2Message1,Column2CTAText1,Column2CTALink1")] TemplateC templateC) { if (ModelState.IsValid) { db.Entry(templateC).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Edit", new { @id = templateC.ID })); } ViewBag.CampaignID = new SelectList(db.Campaigns, "ID", "Name", templateC.CampaignID); return(View(templateC)); }
public ActionResult Edit([Bind(Include = "ID,CampaignID,Month")] CampaignMonth campaignMonth) { if (ModelState.IsValid) { db.Entry(campaignMonth).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CampaignID = new SelectList(db.Campaigns, "ID", "Name", campaignMonth.CampaignID); return(View(campaignMonth)); }
public ActionResult Edit([Bind(Include = "ID,TradeID,Name,Role,Email,Phone")] CampaignOwner campaignOwner) { if (ModelState.IsValid) { db.Entry(campaignOwner).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TradeID = new SelectList(db.Trades, "ID", "Name", campaignOwner.TradeID); return(View(campaignOwner)); }
public ActionResult Edit([Bind(Include = "ID,Name,Objective,CampaignTypeID,CampaignOwnerID,CampaignLeadID,StatusID,EmailSystemID")] Campaign campaign) { if (ModelState.IsValid) { db.Entry(campaign).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CampaignTypeID = new SelectList(db.CampaignTypes, "ID", "Type", campaign.CampaignTypeID); ViewBag.CampaignOwnerID = new SelectList(db.CampaignOwners, "ID", "FirstName", campaign.CampaignOwnerID); ViewBag.CampaignLeadID = new SelectList(db.CampaignLeads, "ID", "FirstName", campaign.CampaignLeadID); ViewBag.EmailSystemID = new SelectList(db.EmailSystems, "ID", "Name", campaign.EmailSystemID); ViewBag.StatusID = new SelectList(db.Status, "ID", "Name", campaign.StatusID); return(View(campaign)); }
public ActionResult Edit([Bind(Include = "ID,Name,Objective,CampaignTypeID,CampaignLeadID,StatusID,EmailSystemID,CampaignPlanID,StartDate,EndDate,DateSubmitted,CampaignMarket,CampaignProducts,SuccessMetric,AccountSize,ContactPriority,Notes,CampaignProjectManager,Email,Email_Deliveries,Website_Sessions,Transactions,Email_Recipients,Open_Rate,Click_Rate,Bounce_Rate,Conversion_Rate,LandingPage,LandingUrl,USGraphWeeks,USGraphWeekRevenue,USGraphWeekUnits,CAGraphWeeks,CAGraphWeekRevenue,CAGraphWeekUnits,Email_Status,TemplateType,JobFunctions")] Campaign campaign) { if (ModelState.IsValid) { db.Entry(campaign).State = EntityState.Modified; db.SaveChanges(); //return RedirectToAction("Edit"); ViewBag.CampaignTypeID = new SelectList(db.CampaignTypes, "ID", "Type", campaign.CampaignTypeID); ViewBag.CampaignLeadID = new SelectList(db.CampaignLeads, "ID", "FirstName", campaign.CampaignLeadID); ViewBag.CampaignPlanID = new SelectList(db.CampaignPlans, "ID", "PlanName", campaign.CampaignPlanID); ViewBag.EmailSystemID = new SelectList(db.EmailSystems, "ID", "Name", campaign.EmailSystemID); ViewBag.StatusID = new SelectList(db.Status, "ID", "Name", campaign.StatusID); ViewBag.AccountSizeMultiple = new SelectList(db.AccountSizes, "ID", "AccSize"); ViewBag.CampaignMarketMultiple = new SelectList(db.CampaignMarkets, "ID", "Market"); ViewBag.Trades = db.Trades.ToList(); var tradeData = from t in db.CampaignTrades join x in db.CampaignOwners on t.TradeID equals x.TradeID join y in db.Trades on t.TradeID equals y.ID select new TradeDetails() { CampaignId = t.CampaignID, TradeName = y.Name, TradeDescription = y.Description, Name = x.Name, Email = x.Email, Phone = x.Phone, Role = x.Role, Color = y.Color }; ViewBag.Owners = tradeData.ToList(); return(View(campaign)); } ViewBag.CampaignTypeID = new SelectList(db.CampaignTypes, "ID", "Type", campaign.CampaignTypeID); ViewBag.CampaignLeadID = new SelectList(db.CampaignLeads, "ID", "FirstName", campaign.CampaignLeadID); ViewBag.CampaignPlanID = new SelectList(db.CampaignPlans, "ID", "PlanName", campaign.CampaignPlanID); ViewBag.EmailSystemID = new SelectList(db.EmailSystems, "ID", "Name", campaign.EmailSystemID); ViewBag.StatusID = new SelectList(db.Status, "ID", "Name", campaign.StatusID); ViewBag.AccountSizeMultiple = new SelectList(db.AccountSizes, "ID", "AccSize"); ViewBag.CampaignMarketMultiple = new SelectList(db.CampaignMarkets, "ID", "Market"); return(View(campaign)); }