agregado procesos y bd clases
This commit is contained in:
106
bdAsegasa/Extensiones/vf_polizasextendidas.cs
Normal file
106
bdAsegasa/Extensiones/vf_polizasextendidas.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
|
||||
namespace bdAsegasa.db
|
||||
{
|
||||
public partial class vf_polizasextendidas
|
||||
{
|
||||
public string NumeroSuplemento_String
|
||||
{
|
||||
get
|
||||
{
|
||||
if(this.NumeroSuplemento == 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return NumeroSuplemento.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Situacion_Web
|
||||
{
|
||||
get
|
||||
{
|
||||
return gestionasegasaEntities.ObtieneSituacionWeb(this.idSituacion, this.idTipoPago);
|
||||
}
|
||||
}
|
||||
public string CiaNumeroPoliza
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Compania + "/" + this.NumeroPoliza;
|
||||
}
|
||||
}
|
||||
|
||||
public int? EdadTomador
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.FechaNacimientoTomador.HasValue)
|
||||
{
|
||||
DateOnly hoy = DateOnly.FromDateTime(DateTime.Now);
|
||||
|
||||
return (int)((hoy.Year - this.FechaNacimientoTomador.Value.Year));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string TelefonoMovilValido
|
||||
{
|
||||
get
|
||||
{
|
||||
if (tsUtilidades.Extensiones.StringExtensions.EsNumeroTelefonoMovilEspañolValido(this.Telefono1Tomador))
|
||||
{
|
||||
return this.Telefono1Tomador;
|
||||
}
|
||||
else if (tsUtilidades.Extensiones.StringExtensions.EsNumeroTelefonoMovilEspañolValido(this.Telefono2Tomador))
|
||||
{
|
||||
return this.Telefono2Tomador;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ListadoReducido AListadoReducido() => new ListadoReducido(this);
|
||||
}
|
||||
|
||||
public class ListadoReducido
|
||||
{
|
||||
public ListadoReducido(vf_polizasextendidas p)
|
||||
{
|
||||
NumeroPropuesta = p.idPoliza;
|
||||
FechaAlta = p.FechaAlta;
|
||||
NumeroPóliza = p.NumeroPoliza;
|
||||
Matrícula = p.Matricula;
|
||||
Compañía = p.Compania;
|
||||
Ramo = p.Ramo;
|
||||
BienesAsegurados = p.BienesAsegurados;
|
||||
TipoPago = p.TipoPago;
|
||||
CIFTomador = p.CIFTomador;
|
||||
Tomador = p.Tomador;
|
||||
Teléfono1 = p.Telefono1Tomador;
|
||||
Teléfono2 = p.Telefono2Tomador;
|
||||
Email = p.EmailTomador;
|
||||
}
|
||||
|
||||
public int NumeroPropuesta { get; set; }
|
||||
public DateTime? FechaAlta { get; set; }
|
||||
public string NumeroPóliza { get; set; }
|
||||
public string Matrícula { get; set; }
|
||||
public string BienesAsegurados { get; set; }
|
||||
public string Compañía { get; set; }
|
||||
public string Ramo { get; set; }
|
||||
public string TipoPago { get; set; }
|
||||
public string CIFTomador { get; set; }
|
||||
public string Tomador { get; set; }
|
||||
public string Teléfono1 { get; set; }
|
||||
public string Teléfono2 { get; set; }
|
||||
public string Email { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user