public ActionResult DeleteConfirmed(int id) { tblCollection tblCollection = db.tblCollections.Find(id); db.tblCollections.Remove(tblCollection); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit2([Bind(Include = "CollectionID,CollectionName,CollectionDiscription,Status,StatusBeschrijving")] tblCollection tblCollection) { if (ModelState.IsValid) { db.Entry(tblCollection).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblCollection)); }
public ActionResult Edit([Bind(Include = "CollectionID,CollectionName,CollectionDiscription")] tblCollection tblCollection) { tblCollection.Status = "Te Accorderen wijziging"; if (ModelState.IsValid) { db.Entry(tblCollection).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblCollection)); }
public ActionResult Create([Bind(Include = "CollectionID,CollectionName,CollectionDiscription")] tblCollection tblCollection) { tblCollection.Status = "Te Accorderen creatie"; if (ModelState.IsValid) { db.tblCollections.Add(tblCollection); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblCollection)); }
public ActionResult Edit2(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblCollection tblCollection = db.tblCollections.Find(id); if (tblCollection == null) { return(HttpNotFound()); } return(View(tblCollection)); }