public void ModificarDetalle(ent.DetalleE _DetalleModificar) { var _modificarDetalle = AutoMapper.Mapper.Map <ent.DetalleE, bd.DETALLE>(_DetalleModificar); _repositorio.Modificar(_modificarDetalle); _repositorio.Grabar(); }
public void EliminarDetalle(ent.DetalleE _DetalleEliminar) { var _eliminarDetalle = AutoMapper.Mapper.Map <ent.DetalleE, bd.DETALLE>(_DetalleEliminar); _repositorio.Adicionar(_eliminarDetalle); _repositorio.Grabar(); }
public ActionResult VerDetsFact(int id) { var DetallesDeFactura = new ent.DetalleE(); DetallesDeFactura.Facturas = new dom.FacturaD().FacturasPorId(id); return(View(DetallesDeFactura)); }
public ActionResult VerDetsFact(ent.DetalleE DetsFacturaE) { var detalle = new ent.DetalleE(); var producto = new dom.ProductosD().ProductoPorID(DetsFacturaE.id_producto); //Llena el total del detalle DetsFacturaE.precio = producto.precio * DetsFacturaE.cantidad; //Lleno la entidad que se enviará como parametro para crear el detalle detalle.id_factura = DetsFacturaE.Facturas.num_factura; detalle.precio = DetsFacturaE.precio; detalle.id_producto = DetsFacturaE.id_producto; detalle.cantidad = DetsFacturaE.cantidad; detalle.num_detalle = DetsFacturaE.num_detalle; new dom.DetalleD().CrearDetalle(detalle); return(RedirectToAction("VerDetsFact")); }
public ActionResult Editar(ent.DetalleE FacturaEditado) { new dom.DetalleD().ModificarDetalle(FacturaEditado); return(RedirectToAction("Index")); }
public ActionResult Crear(ent.DetalleE factura) { new dom.DetalleD().CrearDetalle(factura); return(RedirectToAction("Index")); }
public ActionResult Crear() { var _detalles = new ent.DetalleE(); return(PartialView("Crear", _detalles)); }