agregado procesos y bd clases

This commit is contained in:
2026-04-28 11:52:16 +02:00
parent 59a774c397
commit cd2e8b8530
251 changed files with 56881 additions and 49 deletions

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using bdAsegasa.dbcontext;
namespace bdAsegasa.db
{
public partial class subagentes
{
private static List<subagentes> _ListaSubagentes;
public bool AMarcarComoBaja { get; set; }
[NotMapped]
public List<polizassg> PolizasConDocumentosPendientes
{
get
{
return this.polizassg.Where(x => x.documentospolizassg.Any(y => y.Obligatorio && y.FechaComprobacion == null && y.idFichero == null)).ToList();
}
}
[NotMapped]
public List<polizassg> PolizasConDocumentosPendientes7Dias
{
get
{
DateTime FechaInicio = DateTime.Today.AddDays(-7);
return this.polizassg.Where(x => x.FechaAlta >= FechaInicio).ToList().Where(x => x.documentospolizassg.Any(y => y.Obligatorio && y.FechaComprobacion == null && y.idFichero == null)).ToList();
}
}
public static List<subagentes> ListaSubAgentes()
{
if (_ListaSubagentes == null)
{
using (var bd = tscgestionasegasa.NuevoContexto())
{
_ListaSubagentes = bd.subagentes.OrderBy(x => x.Nombre).ToList();
}
}
return _ListaSubagentes;
}
public string CodigoYNombre
{
get
{
return Codigo + " - " + Nombre;
}
}
}
}