public JsonResult DeleteImmunization() { try { ImmunizationRepository immunizationRepo = new ImmunizationRepository(); immunizationRepo.Remove(immunizationRepo.Get(int.Parse(Request.Form["Immunization"]))); return(Json(new { error = "false" })); } catch { return(Json(new { error = "true" })); } }
public JsonResult EditImmunization() { try { ImmunizationRepository immunizationRepo = new ImmunizationRepository(); Immunization immunization = immunizationRepo.Get(int.Parse(Request.Form["Immunization"])); immunization.VaccineType = Request.Form["EditImmunization"]; return(Json(new { error = "false" })); } catch { return(Json(new { error = "true" })); } }