Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AfericaoGlicemia afericaoGlicemia = db.AfericoesGlicemia.Find(id);

            db.AfericoesGlicemia.Remove(afericaoGlicemia);
            db.SaveChanges();
            return(RedirectToAction("ByCliente", new { id = afericaoGlicemia.ClienteId }));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Id,DataHoraAfericao,Valor,Jejum,ClienteId")] AfericaoGlicemia afericaoGlicemia)
 {
     if (ModelState.IsValid)
     {
         db.Entry(afericaoGlicemia).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("ByCliente", new { id = afericaoGlicemia.ClienteId }));
     }
     ViewBag.ClienteId = new SelectList(db.Clientes, "Id", "Nome", afericaoGlicemia.ClienteId);
     return(View(afericaoGlicemia));
 }
Exemple #3
0
        // GET: AfericoesGlicemia/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AfericaoGlicemia afericaoGlicemia = db.AfericoesGlicemia.Find(id);

            if (afericaoGlicemia == null)
            {
                return(HttpNotFound());
            }
            return(View(afericaoGlicemia));
        }
Exemple #4
0
        // GET: AfericoesGlicemia/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AfericaoGlicemia afericaoGlicemia = db.AfericoesGlicemia.Find(id);

            if (afericaoGlicemia == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ClienteId = new SelectList(db.Clientes, "Id", "Nome", afericaoGlicemia.ClienteId);
            return(View(afericaoGlicemia));
        }