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