public ActionResult Edit([Bind(Include = "Id,MonthNumber,Description")] ChildVaccine childVaccine) { if (vaccineChildService.UpdateVaccine(childVaccine)) { return(RedirectToAction("Index")); } return(View()); }
// GET: VaccineChild/Details/5 public ActionResult Details(int id) { ChildVaccine vaccine = vaccineChildService.GetById(id); if (vaccine != null) { return(View(vaccine)); } return(View()); }
public bool UpdateVaccine(ChildVaccine childVaccine) { try { var APIResponse = httpClient.PutAsJsonAsync <ChildVaccine>(Statics.baseAddress + "medical/updateVaccineChild", childVaccine).ContinueWith(postTask => postTask.Result.EnsureSuccessStatusCode()); System.Diagnostics.Debug.WriteLine(APIResponse.Result); return(true); } catch { return(false); } }