37 lines
1.6 KiB
C#
37 lines
1.6 KiB
C#
namespace bdAsegasa.db
|
|
{
|
|
public partial class entidadespolizas
|
|
{
|
|
public bool AEliminar_tmp { get; set; }
|
|
|
|
public string Domicilio
|
|
{
|
|
get
|
|
{
|
|
if (this.idDireccion.HasValue)
|
|
{
|
|
if (this.idDireccionNavigation?.CodigoMunicipioNavigation == null || string.IsNullOrEmpty(this.idDireccionNavigation?.Direccion) || string.IsNullOrEmpty(this.idDireccionNavigation?.CodigoPostal))
|
|
{
|
|
return "** DOMICILIO INCORRECTO **";
|
|
}
|
|
else
|
|
{
|
|
if (this.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation?.Nombre == this.idDireccionNavigation.CodigoMunicipioNavigation.Nombre)
|
|
{
|
|
return this.idDireccionNavigation.Direccion + " - " + this.idDireccionNavigation.CodigoPostal + " " + this.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
}
|
|
else
|
|
{
|
|
return this.idDireccionNavigation.Direccion + " - " + this.idDireccionNavigation.CodigoPostal + " " + this.idDireccionNavigation.CodigoMunicipioNavigation.Nombre + " (" + this.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation?.Nombre + ")";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return "** DOMICILIO INCORRECTO **";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|