Fix: ahora los remitos guardan bien

This commit is contained in:
fedpo
2024-09-30 17:21:54 +01:00
parent e3fd07a90a
commit c8827a6e2f
4 changed files with 49 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Entidades
{
public class Lote: Detalle<Producto>
public class Lote : Detalle<Producto>, ICloneable
{
public int IdRemito { get; set; }
public DateTime Fecha { get; set; }
@@ -17,6 +17,26 @@ namespace Entidades
return Producto.Nombre;
}
}
public Lote() { }
/// ICLONEABLE IMPLEMENTATION
/// <summary>
/// ICLONEABLE IMPLEMENTATION
private Lote(Lote lote)
{
Id = lote.Id;
Cantidad = lote.Cantidad;
IdRemito = lote.IdRemito;
Fecha = lote.Fecha;
Habilitado = lote.Habilitado;
}
public object Clone()
{
return new Lote(this);
}
}
}