// GET: api/MedicalFolderAPI/5 public medicalfolder Get(int id) { gm = new GestionMedicalFolder(); medicalfolder f = gm.findFolderById(id); return(f); }
// [ValidateAntiForgeryToken] public ActionResult Delete(int id) { medicalfolder f = gm.FindById(id); refugee refu = gr.FindByCondition(r => r.medicalfolder.id == id).Single(); refu.medicalfolder = null; refu.fiche_ID = null; gr.Update(refu); gm.remove(f); gr.Commit(); gm.Commit(); return(RedirectToAction("Index")); }
public ActionResult Create(medicalfolder f, int id) { if (ModelState.IsValid) { gm.Create(f); gm.Commit(); refugee r = gr.FindById(id); r.fiche_ID = f.id; gr.Update(r); gr.Commit(); return(RedirectToAction("Index")); } else { return(View(f)); } }
public ActionResult Update(int id, FormCollection collection) { if (ModelState.IsValid) { medicalfolder m = gm.findFolderById(id); m.apparences = collection["apparences"]; m.bloodpressure = float.Parse(collection["bloodpressure"]); m.bloodtype = collection["bloodtype"]; m.description = collection["description"]; m.doctorname = collection["doctorname"]; m.height = float.Parse(collection["height"]); m.mentalstate = collection["mentalstate"]; m.weight = float.Parse(collection["weight"]); gm.Update(m); gm.Commit(); return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Update(int id) { medicalfolder mfCurrent = gm.findFolderById(id); return(View(mfCurrent)); }
public ActionResult Details(int id) { medicalfolder f = gm.FindById(id); return(View(f)); }