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

            db.DerechoLinea.Remove(derechoLinea);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "idDerechoLinea,Descripcion,Estado,idDueño")] DerechoLinea derechoLinea)
 {
     if (ModelState.IsValid)
     {
         db.Entry(derechoLinea).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.idDueño = new SelectList(db.Personal, "Login", "Password", derechoLinea.idDueño);
     return(View(derechoLinea));
 }
        // GET: DerechoLinea/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DerechoLinea derechoLinea = db.DerechoLinea.Find(id);

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

            if (derechoLinea == null)
            {
                return(HttpNotFound());
            }
            ViewBag.idDueño = new SelectList(db.Personal, "Login", "Password", derechoLinea.idDueño);
            return(View(derechoLinea));
        }