public ActionResult DeleteConfirmed(long id) { AuthorizedEmail authorizedEmail = db.AuthorizedEmails.Find(id); db.AuthorizedEmails.Remove(authorizedEmail); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AuthorizedEmailId,Description,ManifestationId")] AuthorizedEmail authorizedEmail) { if (ModelState.IsValid) { db.Entry(authorizedEmail).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ManifestationId = new SelectList(db.Manifestations, "ManifestationId", "ManifestationId", authorizedEmail.ManifestationId); return(View(authorizedEmail)); }
public ActionResult Create([Bind(Include = "AuthorizedEmailId,Description,ManifestationId")] AuthorizedEmail authorizedEmail) { if (ModelState.IsValid) { db.AuthorizedEmails.Add(authorizedEmail); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ManifestationId = new SelectList(db.Manifestations, "ManifestationId", "ManifestationId", authorizedEmail.ManifestationId); return(View(authorizedEmail)); }
// GET: AuthorizedEmails/Details/5 public ActionResult Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AuthorizedEmail authorizedEmail = db.AuthorizedEmails.Find(id); if (authorizedEmail == null) { return(HttpNotFound()); } return(View(authorizedEmail)); }
// GET: AuthorizedEmails/Edit/5 public ActionResult Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AuthorizedEmail authorizedEmail = db.AuthorizedEmails.Find(id); if (authorizedEmail == null) { return(HttpNotFound()); } ViewBag.ManifestationId = new SelectList(db.Manifestations, "ManifestationId", "ManifestationId", authorizedEmail.ManifestationId); return(View(authorizedEmail)); }