Exemple #1
0
 public ActionResult DeleteConfirmed(int id)
 {
     if (Session["Login"] == null)
     {
         return(RedirectToAction("Login", "Home"));
     }
     else
     {
         hojaRutaDetalle hojaRutaDetalle = db.hojaRutaDetalle.Find(id);
         db.hojaRutaDetalle.Remove(hojaRutaDetalle);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
 }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "idHojaRutaDetalle,idHojaRuta,fechaSalida,fechaLlegada,observaciones")] hojaRutaDetalle hojaRutaDetalle)
 {
     if (Session["Login"] == null)
     {
         return(RedirectToAction("Login", "Home"));
     }
     else
     {
         if (ModelState.IsValid)
         {
             db.Entry(hojaRutaDetalle).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         ViewBag.idHojaRuta = new SelectList(db.hojaRuta, "idHojaRuta", "patente", hojaRutaDetalle.idHojaRuta);
         return(View(hojaRutaDetalle));
     }
 }
Exemple #3
0
 // GET: hojaRutaDetalles/Details/5
 public ActionResult Details(int?id)
 {
     if (Session["Login"] == null)
     {
         return(RedirectToAction("Login", "Home"));
     }
     else
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         hojaRutaDetalle hojaRutaDetalle = db.hojaRutaDetalle.Find(id);
         if (hojaRutaDetalle == null)
         {
             return(HttpNotFound());
         }
         return(View(hojaRutaDetalle));
     }
 }
Exemple #4
0
 // GET: hojaRutaDetalles/Edit/5
 public ActionResult Edit(int?id)
 {
     if (Session["Login"] == null)
     {
         return(RedirectToAction("Login", "Home"));
     }
     else
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         hojaRutaDetalle hojaRutaDetalle = db.hojaRutaDetalle.Find(id);
         if (hojaRutaDetalle == null)
         {
             return(HttpNotFound());
         }
         ViewBag.idHojaRuta = new SelectList(db.hojaRuta, "idHojaRuta", "patente", hojaRutaDetalle.idHojaRuta);
         return(View(hojaRutaDetalle));
     }
 }