public ActionResult DeleteConfirmed(int id) { DocumentMat documentmat = db.DocumentMats.Find(id); db.DocumentMats.Remove(documentmat); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /DocumentMat/Delete/5 public ActionResult Delete(int id = 0) { DocumentMat documentmat = db.DocumentMats.Find(id); if (documentmat == null) { return(HttpNotFound()); } return(View(documentmat)); }
public ActionResult Edit(DocumentMat documentmat) { if (ModelState.IsValid) { db.Entry(documentmat).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(documentmat)); }
public ActionResult Create(DocumentMat documentmat) { if (ModelState.IsValid) { db.DocumentMats.Add(documentmat); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(documentmat)); }