Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            alerta_mantencion alerta_mantencion = db.alerta_mantencion.Find(id);

            db.alerta_mantencion.Remove(alerta_mantencion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id,fecha,lecheria_id")] alerta_mantencion alerta_mantencion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(alerta_mantencion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.lecheria_id = new SelectList(db.lecheria, "id", "id", alerta_mantencion.lecheria_id);
     return(View(alerta_mantencion));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "id,fecha,lecheria_id")] alerta_mantencion alerta_mantencion)
        {
            if (ModelState.IsValid)
            {
                db.alerta_mantencion.Add(alerta_mantencion);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.lecheria_id = new SelectList(db.lecheria, "id", "id", alerta_mantencion.lecheria_id);
            return(View(alerta_mantencion));
        }
Beispiel #4
0
        // GET: Alerta_mantencion/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            alerta_mantencion alerta_mantencion = db.alerta_mantencion.Find(id);

            if (alerta_mantencion == null)
            {
                return(HttpNotFound());
            }
            return(View(alerta_mantencion));
        }
Beispiel #5
0
        // GET: Alerta_mantencion/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            alerta_mantencion alerta_mantencion = db.alerta_mantencion.Find(id);

            if (alerta_mantencion == null)
            {
                return(HttpNotFound());
            }
            ViewBag.lecheria_id = new SelectList(db.lecheria, "id", "id", alerta_mantencion.lecheria_id);
            return(View(alerta_mantencion));
        }