// GET: api/MedicalFolderAPI/5
        public medicalfolder Get(int id)
        {
            gm = new GestionMedicalFolder();
            medicalfolder f = gm.findFolderById(id);

            return(f);
        }
Example #2
0
        // [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"));
        }
Example #3
0
        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));
            }
        }
Example #4
0
 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());
     }
 }
Example #5
0
        public ActionResult Update(int id)
        {
            medicalfolder mfCurrent = gm.findFolderById(id);

            return(View(mfCurrent));
        }
Example #6
0
        public ActionResult Details(int id)
        {
            medicalfolder f = gm.FindById(id);

            return(View(f));
        }