public ActionResult DeleteConfirmed(int id) { Grant_GrantType grant_granttype = db.Grant_GrantType.Single(g => g.GrantTypeID == id); db.Grant_GrantType.DeleteObject(grant_granttype); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /GrantType/Delete/5 public ActionResult Delete(int id = 0) { Grant_GrantType grant_granttype = db.Grant_GrantType.Single(g => g.GrantTypeID == id); if (grant_granttype == null) { return(HttpNotFound()); } return(View(grant_granttype)); }
public ActionResult Edit(Grant_GrantType grant_granttype) { if (ModelState.IsValid) { db.Grant_GrantType.Attach(grant_granttype); db.ObjectStateManager.ChangeObjectState(grant_granttype, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(grant_granttype)); }
public ActionResult Create(Grant_GrantType grant_granttype) { if (ModelState.IsValid) { db.Grant_GrantType.AddObject(grant_granttype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(grant_granttype)); }