termine lo que corresponde a logear los contratos

This commit is contained in:
2025-01-13 17:59:21 -03:00
parent 062b97515f
commit a19d2b2a42
5 changed files with 51 additions and 6 deletions

View File

@@ -127,8 +127,8 @@ public class RepositorioContratos: RepositorioBase<RepositorioContratos> {
Monto = cont.IdpropiedadNavigation.Monto,
Pagado = 0,
};
can.Id = (con.Canons.Any()? con.Canons.Max(x=>x.Id) :0)+1;
can.Idcontratos.Add(cont);
can.Id = (con.Canons.Any()? con.Canons.Count() :0)+1+i;
con.Canons.Add(can);
cont.Idcanons.Add(can);

View File

@@ -4,6 +4,7 @@ using Entidades.Dto;
using Entidades;
using Microsoft.EntityFrameworkCore;
using System.Collections.Concurrent;
using Org.BouncyCastle.Math.EC.Rfc7748;
namespace Modelo;
@@ -35,4 +36,10 @@ public class RepositorioNotificaciones : RepositorioBase<RepositorioNotificacion
.Where(x => x.Dnicliente == dni);
return notis;
}
public bool HayNotis(long dni) {
var con = Context;
bool hay = con.Notificaciones.Where(x=>x.Leido == false).Any();
return hay;
}
}