public ActionResult Edit([Bind(Include = "Id,Naam,Intro,LaatseAanpassing")] Gip gip) { if (ModelState.IsValid) { gip.LaatseAanpassing = DateTime.Now; gip.PersoonLaatsteAanpassing = User.Identity.Name; db.Entry(gip).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Overzicht")); } return(View(gip)); }
public ActionResult Toevoegen([Bind(Include = "Id,Naam,Intro")] Gip gip) { if (ModelState.IsValid) { gip.LaatseAanpassing = DateTime.Now; gip.PersoonLaatsteAanpassing = User.Identity.Name; db.Gips.Add(gip); db.SaveChanges(); return(RedirectToAction("Overzicht")); } return(View(gip)); }
// GET: Gips/Edit/5 public ActionResult Aanpassen(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gip gip = db.Gips.Find(id); if (gip == null) { return(HttpNotFound()); } return(View(gip)); }
// GET: Gips/Details/5 public ActionResult Details(int?id = 0) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Gip gip = db.Gips.Find(id); if (gip == null) { return(HttpNotFound()); } return(View("Details", gip)); }