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

            db.transportador.Remove(transportador);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id,cedula,vehiculo,estado")] transportador transportador)
 {
     if (ModelState.IsValid)
     {
         db.Entry(transportador).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.cedula   = new SelectList(db.persona, "cedula", "nombre", transportador.cedula);
     ViewBag.vehiculo = new SelectList(db.vehiculo, "Placa", "numeroChasis", transportador.vehiculo);
     return(View(transportador));
 }
        // GET: transportadors/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            transportador transportador = db.transportador.Find(id);

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

            if (transportador == null)
            {
                return(HttpNotFound());
            }
            ViewBag.cedula   = new SelectList(db.persona, "cedula", "nombre", transportador.cedula);
            ViewBag.vehiculo = new SelectList(db.vehiculo, "Placa", "numeroChasis", transportador.vehiculo);
            return(View(transportador));
        }