Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ControlVacuna controlVacuna = db.ControlVacuna.Find(id);

            db.ControlVacuna.Remove(controlVacuna);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Temperatura,Fecha,ProximaFecha,Hora,Dosis,ViaAdministracion,Vacuna,IdMascota,Microchip")] ControlVacuna controlVacuna)
 {
     if (ModelState.IsValid)
     {
         db.Entry(controlVacuna).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IdMascota = new SelectList(db.Mascota, "Id", "Nombre", controlVacuna.IdMascota);
     return(View(controlVacuna));
 }
Пример #3
0
        // GET: ControlVacunas/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ControlVacuna controlVacuna = db.ControlVacuna.Find(id);

            if (controlVacuna == null)
            {
                return(HttpNotFound());
            }
            return(View(controlVacuna));
        }
Пример #4
0
        // GET: ControlVacunas/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ControlVacuna controlVacuna = db.ControlVacuna.Find(id);

            if (controlVacuna == null)
            {
                return(HttpNotFound());
            }
            ViewBag.IdMascota = new SelectList(db.Mascota, "Id", "Nombre", controlVacuna.IdMascota);
            ViewBag.Microchip = new SelectList(db.Mascota, "Microchip", "Microchip", controlVacuna.Microchip);
            return(View(controlVacuna));
        }