Exemplo n.º 1
0
 void Vender(int cantidad)
 {
     this.producto.Stock -= cantidad;
     this.fecha           = DateTime.Now;
     this.precioFinal     = Venta.CalcularPrecioFinal(this.producto.Precio, cantidad);
 }
Exemplo n.º 2
0
 internal static int OrdenarPorFecha(Venta v1, Venta v2)
 {
     return(DateTime.Compare(v1.Fecha, v2.Fecha));
 }
Exemplo n.º 3
0
 private void Vender(int cantidad)
 {
     this.producto.Stock = this.producto.Stock - cantidad;
     this.fecha          = DateTime.Now;
     this.precioFinal    = Venta.CalcularPrecioFinal(producto.Precio, producto.Stock);
 }
Exemplo n.º 4
0
        public void Vender(Producto producto, int cantidad)
        {
            Venta venta = new Venta(producto, cantidad);

            this.ventas.Add(venta);
        }