35 lines
900 B
C#
35 lines
900 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace compabetov2.database.modelos
|
|
{
|
|
public class DetalleVentaModel
|
|
{
|
|
public int idVenta;
|
|
public int cantidad;
|
|
public Variante producto;
|
|
public decimal total;
|
|
|
|
public DetalleVentaModel(int cantidad, Variante producto, int id = -1, decimal total = 0)
|
|
{
|
|
this.cantidad = cantidad;
|
|
this.producto = producto;
|
|
this.idVenta = id;
|
|
this.total = total;
|
|
}
|
|
|
|
public DetalleEnvioModel convertirADetalleEnvio()
|
|
{
|
|
return new DetalleEnvioModel(-1,this.producto,this.cantidad);
|
|
}
|
|
|
|
public DetalleCuentaModel convertirADetalleCuenta()
|
|
{
|
|
return new DetalleCuentaModel(this.producto, this.cantidad, -1);
|
|
}
|
|
}
|
|
}
|