public ActionResult DeleteConfirmed(short id) { SET_DOCS_TYPES set_docs_types = db.SET_DOCS_TYPES.Single(s => s.DOC_TYPE_NO == id); db.SET_DOCS_TYPES.DeleteObject(set_docs_types); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /DocumentTypes/Delete/5 public ActionResult Delete(short id = 0) { SET_DOCS_TYPES set_docs_types = db.SET_DOCS_TYPES.Single(s => s.DOC_TYPE_NO == id); if (set_docs_types == null) { return(HttpNotFound()); } return(View(set_docs_types)); }
public ActionResult Edit(SET_DOCS_TYPES set_docs_types) { if (ModelState.IsValid) { db.SET_DOCS_TYPES.Attach(set_docs_types); db.ObjectStateManager.ChangeObjectState(set_docs_types, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(set_docs_types)); }
public ActionResult Create(SET_DOCS_TYPES set_docs_types) { if (ModelState.IsValid) { db.SET_DOCS_TYPES.AddObject(set_docs_types); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(set_docs_types)); }