public RedirectToRouteResult AgregarAlPedido(int productoId, int cantidad, int ordenVentaId, string returnUrl) { Producto producto = _productosRepo.ObtenerPorId(productoId); if (producto != null) { _ordenVentaRepo.AgregarProductoLinea(_productosRepo.ObtenerPorId(productoId), cantidad, ordenVentaId); } return(RedirectToAction("Index", new { returnUrl })); }
public ActionResult Detalle(string id) { Producto prod = _productosRepo.ObtenerPorId(int.Parse(id)); ViewBag.tipo = _tiposRepo.ObtenerPorId(prod.TipoId).Descripcion; return(View(prod)); }