public ActionResult DeleteConfirmed(int id) { CSDocType cSDocType = db.CSDocTypes.Find(id); db.CSDocTypes.Remove(cSDocType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DocType,Name")] CSDocType cSDocType) { if (ModelState.IsValid) { db.Entry(cSDocType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cSDocType)); }
public ActionResult Create([Bind(Include = "DocType,Name")] CSDocType cSDocType) { if (ModelState.IsValid) { db.CSDocTypes.Add(cSDocType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cSDocType)); }
// GET: CSDocTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CSDocType cSDocType = db.CSDocTypes.Find(id); if (cSDocType == null) { return(HttpNotFound()); } return(View(cSDocType)); }