public ActionResult Editar(int id) { llenarCat(); ViewBag.lista = ListaCat; var _producto = new dom.ProductosD().ProductoPorID(id); return(PartialView("Editar", _producto)); }
public ActionResult VerDetsFact(ent.DetsFacturaE DetsFacturaE) { var detalle = new ent.DetsFacturaE(); var producto = new dom.ProductosD().ProductoPorID(DetsFacturaE.id_producto); //Llena el total del detalle DetsFacturaE.precio = (decimal)(producto.precio * DetsFacturaE.cantidad); //Lleno la entidad que se enviará como parametro para crear el detalle detalle.num_factura = DetsFacturaE.FACTURAS.num_factura; detalle.precio = DetsFacturaE.precio; detalle.id_producto = DetsFacturaE.id_producto; detalle.cantidad = DetsFacturaE.cantidad; detalle.id_detFact = DetsFacturaE.id_detFact; new dom.DetsFacturaD().CrearDetsFactura(detalle); return(RedirectToAction("VerDetsFact")); }
public ActionResult Detalle(int id) { var _detalle = new dom.ProductosD().ProductoPorID(id); return(PartialView("Detalle", _detalle)); }
// GET: Productos public ActionResult Index() { var _pedido = new dom.ProductosD().ProductosList(); return(View(_pedido)); }