public ActionResult DeleteConfirmed(int id) { EMS_Person eMS_Person = db.EMS_Person.Find(id); db.EMS_Person.Remove(eMS_Person); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(EMS_Person eMS_Person) { if (ModelState.IsValid) { db.Entry(eMS_Person).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eMS_Person)); }
public ActionResult Create(EMS_Person eMS_Person) { if (ModelState.IsValid) { db.EMS_Person.Add(eMS_Person); db.SaveChanges(); return(RedirectToAction("Create", "EMS_FullTimeEmployee", eMS_Person)); } return(View(eMS_Person)); }
// GET: EMS_Person/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EMS_Person eMS_Person = db.EMS_Person.Find(id); if (eMS_Person == null) { return(HttpNotFound()); } return(View(eMS_Person)); }