public ActionResult DeleteConfirmed(int id)
        {
            turno_chofer turno_chofer = db.turno_chofer.Find(id);

            db.turno_chofer.Remove(turno_chofer);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id_turno_chofer,id_turno,id_chofer,fecha")] turno_chofer turno_chofer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(turno_chofer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_chofer = new SelectList(db.Choferes, "Id_chofer", "Rut_chofer", turno_chofer.id_chofer);
     ViewBag.id_turno  = new SelectList(db.turno, "id_turno", "nombre_turno", turno_chofer.id_turno);
     return(View(turno_chofer));
 }
        // GET: turno_chofer/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            turno_chofer turno_chofer = db.turno_chofer.Find(id);

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

            if (turno_chofer == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_chofer = new SelectList(db.Choferes, "Id_chofer", "Rut_chofer", turno_chofer.id_chofer);
            ViewBag.id_turno  = new SelectList(db.turno, "id_turno", "nombre_turno", turno_chofer.id_turno);
            return(View(turno_chofer));
        }