.
This commit is contained in:
@@ -130,5 +130,54 @@ namespace bdAntifraude.db
|
||||
}
|
||||
}
|
||||
|
||||
public string NombrePoblacionNotificaciones
|
||||
{
|
||||
get
|
||||
{
|
||||
var municipio = this.CODIGOMUNICIPIONOTIFICACIONNavigation;
|
||||
if (municipio == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.CODIGOPOSTALNOTIFICACIONES != null &&
|
||||
municipio.CODIGOSPOSTALES.Any(x => x.CODIGOPOSTAL == this.CODIGOPOSTALNOTIFICACIONES))
|
||||
{
|
||||
var cp = municipio.CODIGOSPOSTALES
|
||||
.First(x => x.CODIGOPOSTAL == this.CODIGOPOSTALNOTIFICACIONES);
|
||||
|
||||
if (cp.DESCRIPCIONADICIONAL != null)
|
||||
{
|
||||
return municipio.NOMBRE + " (" + cp.DESCRIPCIONADICIONAL + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
return municipio.NOMBRE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public string NombreProvinciaNotificaciones
|
||||
{
|
||||
get
|
||||
{
|
||||
var municipio = this.CODIGOMUNICIPIONOTIFICACIONNavigation;
|
||||
|
||||
if (municipio == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return municipio.CODIGOPROVINCIANavigation.NOMBRE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user