public ActionResult DeleteConfirmed(string id)
        {
            VENT_CompraDetalle vENT_CompraDetalle = db.VENT_CompraDetalle.Find(id);

            db.VENT_CompraDetalle.Remove(vENT_CompraDetalle);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "NumeroFactura,IdProducto,cantidad,precioU")] VENT_CompraDetalle vENT_CompraDetalle)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vENT_CompraDetalle).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IdProducto    = new SelectList(db.BODE_PRODUCTO, "IdProducto", "Nombre", vENT_CompraDetalle.IdProducto);
     ViewBag.NumeroFactura = new SelectList(db.VENT_CompraEncabezado, "NumeroFactura", "UserSystem", vENT_CompraDetalle.NumeroFactura);
     return(View(vENT_CompraDetalle));
 }
        // GET: VENT_CompraDetalle/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VENT_CompraDetalle vENT_CompraDetalle = db.VENT_CompraDetalle.Find(id);

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

            if (vENT_CompraDetalle == null)
            {
                return(HttpNotFound());
            }
            ViewBag.IdProducto    = new SelectList(db.BODE_PRODUCTO, "IdProducto", "Nombre", vENT_CompraDetalle.IdProducto);
            ViewBag.NumeroFactura = new SelectList(db.VENT_CompraEncabezado, "NumeroFactura", "UserSystem", vENT_CompraDetalle.NumeroFactura);
            return(View(vENT_CompraDetalle));
        }