示例#1
0
        public ActionResult ActualizarVenta(int id, VentasViewModel ventas)
        {
            try
            {
                var idVentas = _ventasDAO.BuscarPorId(id);

                idVentas.Producto_Vendido             = ventas.ProductoVendido;
                idVentas.Talle                        = ventas.Talle;
                idVentas.Codigo_Articulo              = ventas.CodigoArticulo;
                idVentas.Precio_Real_Del_Producto     = (decimal)ventas.PrecioRealDelProducto;
                idVentas.Precio_De_Venta_Del_Producto = (decimal)ventas.PrecioDeVentaDelProducto;
                idVentas.Fecha_De_Venta               = ventas.FechaDeVenta;

                _ventasDAO.Actualizar(idVentas);
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }