Está
This commit is contained in:
@@ -27,7 +27,13 @@ public class RepositorioCanons: RepositorioBase<RepositorioCanons> {
|
||||
return cc;
|
||||
}
|
||||
|
||||
public bool SetRecibo(Canon c, Recibo re, long dni) {
|
||||
public Canon? ObtenerCanonPorId(long id){
|
||||
var con = Context;
|
||||
var cnn = con.Canons.FirstOrDefault(x=>x.Id == id);
|
||||
return cnn;
|
||||
}
|
||||
|
||||
public bool SetRecibo(Canon c, Recibo re, long dni, string mensaje= "Set Recibo") {
|
||||
var con = Context;
|
||||
var cc = con.Canons
|
||||
.Include(x=>x.Idcontratos)
|
||||
@@ -51,7 +57,7 @@ public class RepositorioCanons: RepositorioBase<RepositorioCanons> {
|
||||
ccc.IdpropiedadNavigation.Idestado = 3;
|
||||
}
|
||||
|
||||
GenerarLog(con, dni, $"Set Recibo");
|
||||
GenerarLog(con, dni, mensaje);
|
||||
|
||||
return Guardar(con);
|
||||
}
|
||||
|
||||
@@ -242,4 +242,17 @@ public class RepositorioContratos: RepositorioBase<RepositorioContratos> {
|
||||
|
||||
return Guardar(con);
|
||||
}
|
||||
|
||||
public IQueryable<Contrato> ObtenerContratosInpagos() {
|
||||
var con = Context;
|
||||
DateTime d = DateTime.Now;
|
||||
var l = con.Contratos
|
||||
.Include(x=>x.DniinquilinoNavigation)
|
||||
.Include(x=>x.DnipropietarioNavigation)
|
||||
.Include(x=>x.IdpropiedadNavigation)
|
||||
.ThenInclude(x=>x.IdtipropiedadNavigation)
|
||||
.Include(x=>x.Idcanons)
|
||||
.Where(x=>x.Idcanons.Any(x=>x.Pagado ==0 && d > x.Fecha));
|
||||
return l;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,13 @@ public class RepositorioNotificaciones : RepositorioBase<RepositorioNotificacion
|
||||
return Guardar(con);
|
||||
}
|
||||
|
||||
public bool AltaNotificacion(Notificacione n) {
|
||||
public bool AltaNotificacion(Notificacione n, long dni=0) {
|
||||
var con = Context;
|
||||
|
||||
con.Notificaciones.Add(n);
|
||||
if (dni !=0){
|
||||
GenerarLog(con, dni, "Se envio un informe");
|
||||
}
|
||||
return Guardar(con);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user