public ActionResult DeleteConfirmed(int id) { BenefitRegistration benefitRegistration = db.BenefitRegistrations.Find(id); db.BenefitRegistrations.Remove(benefitRegistration); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,RealtionshipStatus,BenefitType,Dental,Optical,Paramedical")] BenefitRegistration benefitRegistration) { if (ModelState.IsValid) { db.Entry(benefitRegistration).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(benefitRegistration)); }
public ActionResult Create([Bind(Include = "Id,RealtionshipStatus,BenefitType,Dental,Optical,Paramedical")] BenefitRegistration benefitRegistration) { if (ModelState.IsValid) { db.BenefitRegistrations.Add(benefitRegistration); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(benefitRegistration)); }
// GET: BenefitRegistrations/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BenefitRegistration benefitRegistration = db.BenefitRegistrations.Find(id); if (benefitRegistration == null) { return(HttpNotFound()); } return(View(benefitRegistration)); }