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")); } }
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)); } }
// 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)); } }
// 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)); } }