Files
Final_Das/Entidades/Remito.cs
2024-08-27 04:36:00 +01:00

40 lines
1002 B
C#

using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations.Schema;
namespace Entidades
{
public class Remito
{
public int Id { get; set; }
public Proveedor Proveedor { get; set; }
public int IdProveedor { get; set; }
private List<Lote> lotesDeProductosEntregados = new List<Lote>();
public ReadOnlyCollection<Lote> Lotes => lotesDeProductosEntregados.AsReadOnly();
public ReadOnlyCollection<Lote> MostrarLotes()
{
return lotesDeProductosEntregados.AsReadOnly();
}
public void AñadirLote(Lote lote)
{
try
{
lotesDeProductosEntregados.Add(lote);
}
catch (Exception)
{
throw;
}
}
[NotMapped]
public string NombreProveedor
{
get
{
return Proveedor.Nombre;
}
}
}
}