public ActionResult Edit([Bind(Include = "TenantID,TenantName,ClientID,ClientSecret,URL,Created,CreateBy,Modified,ModifiedBy")] Tenant tenant) { if (ModelState.IsValid) { db.Entry(tenant).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tenant)); }
public ActionResult Edit([Bind(Include = "SectionID,SectionName,SectionDescription,Visible,Created,Modified,CreatedBy,ModifiedBy,NewsLetterID")] Section section) { if (ModelState.IsValid) { db.Entry(section).State = EntityState.Modified; section.ModifiedBy = User.Identity.Name; section.Modified = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.NewsLetterID = new SelectList(db.NewsLetters, "NewsLetterID", "Name", section.NewsLetterID); return(View(section)); }
public ActionResult Edit([Bind(Include = "NewsLetterID,Name,Description,Visible,Created,Modified,CreatedBy,ModifiedBy,TenantID")] NewsLetter newsLetter) { if (ModelState.IsValid) { db.Entry(newsLetter).State = EntityState.Modified; newsLetter.ModifiedBy = User.Identity.Name; newsLetter.Modified = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TenantID = new SelectList(db.Tenants, "TenantID", "TenantName", newsLetter.TenantID); return(View(newsLetter)); }
public ActionResult Edit([Bind(Include = "NewsItemID,NewsItemName,NewsItemDescription,ActualLink,Visible,Created,Modified,CreatedBy,ModifiedBy,SectionID")] NewsItem newsItem) { if (ModelState.IsValid) { newsItem.ModifiedBy = User.Identity.Name; newsItem.Modified = DateTime.Now; db.Entry(newsItem).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SectionID = new SelectList(db.Sections, "SectionID", "SectionName", newsItem.SectionID); return(View(newsItem)); }