2639 lines
134 KiB
C#
2639 lines
134 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text.RegularExpressions;
|
|
using System.Globalization;
|
|
using DevExpress.XtraRichEdit;
|
|
// using DevExpress.Xpf.Core; // Assuming this is needed for DXSplashScreen if using WPF version
|
|
using tsUtilidades.Extensiones;
|
|
using bdAsegasa.db;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using DevExpress.Xpf.Core;
|
|
|
|
namespace bdAsegasa.Informes
|
|
{
|
|
public class CombinacionCorrespondenciaRCSociosCaser
|
|
{
|
|
public string Nombre { get; set; }
|
|
public string Situacion { get; set; }
|
|
public string TMunicipal { get; set; }
|
|
public string FProvincia { get; set; }
|
|
public string Descripcion { get; set; }
|
|
public string Equino { get; set; }
|
|
public string VacunoManso { get; set; }
|
|
public string Porcino { get; set; }
|
|
public string OvinoCaprino { get; set; }
|
|
public string Aviar { get; set; }
|
|
public string Cunicula { get; set; }
|
|
public string TotalGanado { get; set; }
|
|
public string VacunoBravo { get; set; }
|
|
public string MenorSinJabalies { get; set; }
|
|
public string MenorConJabalies { get; set; }
|
|
public string MayorSinMalla { get; set; }
|
|
public string MayorConMalla { get; set; }
|
|
public string HasLabor { get; set; }
|
|
public string HasDehesa { get; set; }
|
|
public string TotalSuperficie { get; set; }
|
|
public string OpcionElegida { get; set; }
|
|
public string Total { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string DañosMateriales1 { get; set; }
|
|
public string DañosMateriales2 { get; set; }
|
|
public string DañosMateriales3 { get; set; }
|
|
public string DañosMateriales4 { get; set; }
|
|
public string DañosMateriales5 { get; set; }
|
|
public string DañosMateriales6 { get; set; }
|
|
public string Sublimite1 { get; set; }
|
|
public string Sublimite2 { get; set; }
|
|
public string Sublimite3 { get; set; }
|
|
public string Sublimite4 { get; set; }
|
|
public string Sublimite5 { get; set; }
|
|
public string Sublimite6 { get; set; }
|
|
public string Patronal1 { get; set; }
|
|
public string Patronal2 { get; set; }
|
|
public string Patronal3 { get; set; }
|
|
public string Patronal4 { get; set; }
|
|
public string Patronal5 { get; set; }
|
|
public string Patronal6 { get; set; }
|
|
public string PNetaLabor1 { get; set; }
|
|
public string PNetaLabor2 { get; set; }
|
|
public string PNetaLabor3 { get; set; }
|
|
public string PNetaLabor4 { get; set; }
|
|
public string PNetaLabor5 { get; set; }
|
|
public string PNetaLabor6 { get; set; }
|
|
public string PNetaGanado1 { get; set; }
|
|
public string PNetaGanado2 { get; set; }
|
|
public string PNetaGanado3 { get; set; }
|
|
public string PNetaGanado4 { get; set; }
|
|
public string PNetaGanado5 { get; set; }
|
|
public string PNetaGanado6 { get; set; }
|
|
public string PNetaGanaderia1 { get; set; }
|
|
public string PNetaGanaderia2 { get; set; }
|
|
public string PNetaGanaderia3 { get; set; }
|
|
public string PNetaGanaderia4 { get; set; }
|
|
public string PNetaGanaderia5 { get; set; }
|
|
public string PNetaGanaderia6 { get; set; }
|
|
public string PSubtotal1 { get; set; }
|
|
public string PSubtotal2 { get; set; }
|
|
public string PSubtotal3 { get; set; }
|
|
public string PSubtotal4 { get; set; }
|
|
public string PSubtotal5 { get; set; }
|
|
public string PSubtotal6 { get; set; }
|
|
public string MenorSinJabalies1 { get; set; }
|
|
public string MenorSinJabalies2 { get; set; }
|
|
public string MenorSinJabalies3 { get; set; }
|
|
public string MenorSinJabalies4 { get; set; }
|
|
public string MenorSinJabalies5 { get; set; }
|
|
public string MenorSinJabalies6 { get; set; }
|
|
public string MenorConJabalies1 { get; set; }
|
|
public string MenorConJabalies2 { get; set; }
|
|
public string MenorConJabalies3 { get; set; }
|
|
public string MenorConJabalies4 { get; set; }
|
|
public string MenorConJabalies5 { get; set; }
|
|
public string MenorConJabalies6 { get; set; }
|
|
public string MayorSinMalla1 { get; set; }
|
|
public string MayorSinMalla2 { get; set; }
|
|
public string MayorSinMalla3 { get; set; }
|
|
public string MayorSinMalla4 { get; set; }
|
|
public string MayorSinMalla5 { get; set; }
|
|
public string MayorSinMalla6 { get; set; }
|
|
public string MayorConMalla1 { get; set; }
|
|
public string MayorConMalla2 { get; set; }
|
|
public string MayorConMalla3 { get; set; }
|
|
public string MayorConMalla4 { get; set; }
|
|
public string MayorConMalla5 { get; set; }
|
|
public string MayorConMalla6 { get; set; }
|
|
public string CotosSubtotal1 { get; set; }
|
|
public string CotosSubtotal2 { get; set; }
|
|
public string CotosSubtotal3 { get; set; }
|
|
public string CotosSubtotal4 { get; set; }
|
|
public string CotosSubtotal5 { get; set; }
|
|
public string CotosSubtotal6 { get; set; }
|
|
public string PNeta1 { get; set; }
|
|
public string PNeta2 { get; set; }
|
|
public string PNeta3 { get; set; }
|
|
public string PNeta4 { get; set; }
|
|
public string PNeta5 { get; set; }
|
|
public string PNeta6 { get; set; }
|
|
public string Impuestos1 { get; set; }
|
|
public string Impuestos2 { get; set; }
|
|
public string Impuestos3 { get; set; }
|
|
public string Impuestos4 { get; set; }
|
|
public string Impuestos5 { get; set; }
|
|
public string Impuestos6 { get; set; }
|
|
public string PTotal1 { get; set; }
|
|
public string PTotal2 { get; set; }
|
|
public string PTotal3 { get; set; }
|
|
public string PTotal4 { get; set; }
|
|
public string PTotal5 { get; set; }
|
|
public string PTotal6 { get; set; }
|
|
public string AseguradoCIF { get; set; }
|
|
public string AseguradoNombre { get; set; }
|
|
public string AseguradoApellidos { get; set; }
|
|
public string AseguradoDireccion { get; set; }
|
|
public string AseguradoCodigoPostal { get; set; }
|
|
public string AseguradoTelefono1 { get; set; }
|
|
public string AseguradoTelefono2 { get; set; }
|
|
public string AseguradoCorreo { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaRCMaquinariaAgricola
|
|
{
|
|
public string AseguradoCIF { get; set; }
|
|
public string AseguradoNombre { get; set; }
|
|
public string AseguradoApellidos { get; set; }
|
|
public string AseguradoDireccion { get; set; }
|
|
public string AseguradoCodigoPostal { get; set; }
|
|
public string AseguradoTelefono1 { get; set; }
|
|
public string AseguradoTelefono2 { get; set; }
|
|
public string AseguradoCorreo { get; set; }
|
|
public string aseguradoPoblacion { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
public string Matricula { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string Cobertura { get; set; }
|
|
public string Elegida { get; set; }
|
|
public string PrimaTotal { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaCertificadoTractores
|
|
{
|
|
public string fechaCabecera { get; set; }
|
|
public string NumeroPoliza { get; set; }
|
|
public string Mediador { get; set; }
|
|
public string vehiculoAsegurado { get; set; }
|
|
public string plazasAseguradas { get; set; }
|
|
public string matricula { get; set; }
|
|
public string tomadorDeLaPoliza { get; set; }
|
|
public string propietarioDelVehiculo { get; set; }
|
|
public string conductor { get; set; }
|
|
public string diayHora { get; set; }
|
|
public string lugaryFecha { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaPresupuestoTractores
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
|
|
public string ConductorCIF { get; set; }
|
|
public string ConductorNombre { get; set; }
|
|
public string ConductorApellidos { get; set; }
|
|
public string ConductorFechaPermisoConducir { get; set; }
|
|
|
|
public string Matricula { get; set; }
|
|
public string Marca { get; set; }
|
|
public string Modelo { get; set; }
|
|
public string FechaMatriculacion { get; set; }
|
|
public string Peso { get; set; }
|
|
public string Precio { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaRCCotosCazaCaser
|
|
{
|
|
public string NumeroHectareas { get; set; }
|
|
public string OpcionA { get; set; }
|
|
public string OpcionB { get; set; }
|
|
public string OpcionC { get; set; }
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
public string PropietarioTelefono { get; set; }
|
|
public string PropietarioDomicilio { get; set; }
|
|
public string PropietarioCodigoPostal { get; set; }
|
|
public string PropietarioPoblacion { get; set; }
|
|
public string RiesgoSituacion { get; set; }
|
|
public string RiesgoCodigoPostal { get; set; }
|
|
public string RiesgoPoblacion { get; set; }
|
|
public string RiesgoActividad { get; set; }
|
|
public string RiesgoEpigrafe { get; set; }
|
|
public string RiesgoDescripcion { get; set; }
|
|
public string AclaracionesDeLaActividad { get; set; }
|
|
public string Observaciones { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string CodigoMediador { get; set; }
|
|
public string RamoModalidad { get; set; }
|
|
public string OpcionElegida { get; set; }
|
|
public string TotalOpcionElegida { get; set; }
|
|
public string LimitePorSiniestro { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string PropietarioProvincia { get; set; }
|
|
public string RiesgoProvincia { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
public string Entidad { get; set; }
|
|
public string Oficina { get; set; }
|
|
public string DC { get; set; }
|
|
public string NumCuenta { get; set; }
|
|
public string NombreEntidad { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaTarificadorMaquinaria
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
public string PropietarioTelefono { get; set; }
|
|
public string PropietarioEmail { get; set; }
|
|
public string PropietarioDomicilio { get; set; }
|
|
public string PropietarioCodigoPostal { get; set; }
|
|
public string PropietarioPoblacion { get; set; }
|
|
public string PropietarioProvincia { get; set; }
|
|
public string PropietarioCodigoMunicipio { get; set; }
|
|
|
|
public string Matricula { get; set; }
|
|
public string UsoAlQueSeDestina { get; set; }
|
|
public string AntiguedadMaquinaria { get; set; }
|
|
public string NumeroMaquinasAseguradas { get; set; }
|
|
public string Cosechadoras { get; set; }
|
|
public string CosechadorasRotura { get; set; }
|
|
public string TractoresAgricolas { get; set; }
|
|
public string Empacadoras { get; set; }
|
|
public string Vendimiadoras { get; set; }
|
|
public string NoAutoPropulsados { get; set; }
|
|
public string VibradoresOlivos { get; set; }
|
|
public string CosechadorasCalculado { get; set; }
|
|
public string CosechadorasRoturaCalculado { get; set; }
|
|
public string TractoresAgricolasCalculado { get; set; }
|
|
public string EmpacadorasCalculado { get; set; }
|
|
public string VendimiadorasCalculado { get; set; }
|
|
public string NoAutoPropulsadosCalculado { get; set; }
|
|
public string VibradoresOlivosCalculado { get; set; }
|
|
|
|
public string PrimaNetaMinima { get; set; }
|
|
public string PrimaNeta { get; set; }
|
|
public string Impuestos { get; set; }
|
|
public string PrimaTotal { get; set; }
|
|
public string Condicionantes { get; set; }
|
|
public string Observaciones { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
|
|
public string DaniosLuna { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaRCPerros
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
public string PropietarioTelefono { get; set; }
|
|
public string PropietarioEmail { get; set; }
|
|
public string PropietarioDomicilio { get; set; }
|
|
public string PropietarioCodigoPostal { get; set; }
|
|
public string PropietarioPoblacion { get; set; }
|
|
public string PropietarioProvincia { get; set; }
|
|
public string PropietarioCodigoMunicipio { get; set; }
|
|
|
|
public string CoberturaElegida { get; set; }
|
|
public string PrecioCobertura { get; set; }
|
|
public string NumeroPerrosPeligrosos { get; set; }
|
|
public string NumeroPerrosNoPeligrosos { get; set; }
|
|
public string PrimaPerroPeligrosos { get; set; }
|
|
public string PrimaPerrosNoPeligrosos { get; set; }
|
|
public string PrecioPerrosPeligrosos { get; set; }
|
|
public string PrecioPerrosNoPeligrosos { get; set; }
|
|
|
|
public string PrimeroRaza { get; set; }
|
|
public string PrimeroMicrochip { get; set; }
|
|
public string PrimeroNombre { get; set; }
|
|
public string PrimeroFechaNacimiento { get; set; }
|
|
|
|
public string Observaciones { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
public string TipoPerro { get; set; }
|
|
|
|
public string Op1P { get; set; }
|
|
public string Op2P { get; set; }
|
|
public string Op3P { get; set; }
|
|
public string Op1NP { get; set; }
|
|
public string Op2NP { get; set; }
|
|
public string Op3NP { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaRCCaballos
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string DocumentacionEquina { get; set; }
|
|
public string Observaciones { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaTransportesAXA
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string MatriculaRemolque { get; set; }
|
|
public string CalidadTomador { get; set; }
|
|
public string MedioTransporte { get; set; }
|
|
public string CapitalElegido { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaAccidentesIndividualesAXA
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
public string PropietarioTelefono { get; set; }
|
|
public string PropietarioEmail { get; set; }
|
|
public string PropietarioDomicilio { get; set; }
|
|
public string PropietarioCodigoPostal { get; set; }
|
|
public string PropietarioPoblacion { get; set; }
|
|
public string PropietarioProvincia { get; set; }
|
|
public string PropietarioCodigoMunicipio { get; set; }
|
|
|
|
public string CapitalElegido { get; set; }
|
|
public string Observaciones { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaPatinetes
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorCorreo { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
public string PropietarioTelefono { get; set; }
|
|
public string propietarioCorreo { get; set; }
|
|
public string PropietarioDomicilio { get; set; }
|
|
public string PropietarioCodigoPostal { get; set; }
|
|
public string PropietarioPoblacion { get; set; }
|
|
public string PropietarioProvincia { get; set; }
|
|
public string PropietarioCodigoMunicipio { get; set; }
|
|
|
|
public string Producto { get; set; }
|
|
public string Identificador { get; set; }
|
|
public string FechaCompra { get; set; }
|
|
public string PrimaAnualizada { get; set; }
|
|
public string Observaciones { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaCasetasRiegoAXA
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string casetaUbicacion { get; set; }
|
|
public string casetaLocalidad { get; set; }
|
|
public string casetaCodigoPostal { get; set; }
|
|
public string casetaProvincia { get; set; }
|
|
|
|
public string EdificiosDescripcion { get; set; }
|
|
public string EdificiosCapital { get; set; }
|
|
public string mobiliarioDescripcion { get; set; }
|
|
public string mobiliarioCapital { get; set; }
|
|
public string existenciasDescripcion { get; set; }
|
|
public string existenciasCapital { get; set; }
|
|
|
|
public string capitalElegido { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaSaludMapfre
|
|
{
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
public string TomadorFechaNacimiento { get; set; }
|
|
public string TomadorSexo { get; set; }
|
|
public string TomadorEstadoCivil { get; set; }
|
|
|
|
public string Asegurado1CIF { get; set; }
|
|
public string Asegurado1Nombre { get; set; }
|
|
public string Asegurado1Apellidos { get; set; }
|
|
public string Asegurado1Domicilio { get; set; }
|
|
public string Asegurado1CodigoPostal { get; set; }
|
|
public string Asegurado1Poblacion { get; set; }
|
|
public string Asegurado1Provincia { get; set; }
|
|
public string Asegurado1CodigoMunicipio { get; set; }
|
|
public string Asegurado1Telefono { get; set; }
|
|
public string Asegurado1Email { get; set; }
|
|
public string Asegurado1FechaNacimiento { get; set; }
|
|
public string Asegurado1Sexo { get; set; }
|
|
public string Asegurado1Peso { get; set; }
|
|
public string Asegurado1Estatura { get; set; }
|
|
public string Asegurado1Profesion { get; set; }
|
|
public string Asegurado1Parentesco { get; set; }
|
|
|
|
public string Asegurado2CIF { get; set; }
|
|
public string Asegurado2Nombre { get; set; }
|
|
public string Asegurado2Apellidos { get; set; }
|
|
public string Asegurado2Domicilio { get; set; }
|
|
public string Asegurado2CodigoPostal { get; set; }
|
|
public string Asegurado2Poblacion { get; set; }
|
|
public string Asegurado2Provincia { get; set; }
|
|
public string Asegurado2CodigoMunicipio { get; set; }
|
|
public string Asegurado2Telefono { get; set; }
|
|
public string Asegurado2Email { get; set; }
|
|
public string Asegurado2FechaNacimiento { get; set; }
|
|
public string Asegurado2Sexo { get; set; }
|
|
public string Asegurado2Peso { get; set; }
|
|
public string Asegurado2Estatura { get; set; }
|
|
public string Asegurado2Profesion { get; set; }
|
|
public string Asegurado2Parentesco { get; set; }
|
|
|
|
public string Asegurado3CIF { get; set; }
|
|
public string Asegurado3Nombre { get; set; }
|
|
public string Asegurado3Apellidos { get; set; }
|
|
public string Asegurado3Domicilio { get; set; }
|
|
public string Asegurado3CodigoPostal { get; set; }
|
|
public string Asegurado3Poblacion { get; set; }
|
|
public string Asegurado3Provincia { get; set; }
|
|
public string Asegurado3CodigoMunicipio { get; set; }
|
|
public string Asegurado3Telefono { get; set; }
|
|
public string Asegurado3Email { get; set; }
|
|
public string Asegurado3FechaNacimiento { get; set; }
|
|
public string Asegurado3Sexo { get; set; }
|
|
public string Asegurado3Peso { get; set; }
|
|
public string Asegurado3Estatura { get; set; }
|
|
public string Asegurado3Profesion { get; set; }
|
|
public string Asegurado3Parentesco { get; set; }
|
|
|
|
public string Asegurado4CIF { get; set; }
|
|
public string Asegurado4Nombre { get; set; }
|
|
public string Asegurado4Apellidos { get; set; }
|
|
public string Asegurado4Domicilio { get; set; }
|
|
public string Asegurado4CodigoPostal { get; set; }
|
|
public string Asegurado4Poblacion { get; set; }
|
|
public string Asegurado4Provincia { get; set; }
|
|
public string Asegurado4CodigoMunicipio { get; set; }
|
|
public string Asegurado4Telefono { get; set; }
|
|
public string Asegurado4Email { get; set; }
|
|
public string Asegurado4FechaNacimiento { get; set; }
|
|
public string Asegurado4Sexo { get; set; }
|
|
public string Asegurado4Peso { get; set; }
|
|
public string Asegurado4Estatura { get; set; }
|
|
public string Asegurado4Profesion { get; set; }
|
|
public string Asegurado4Parentesco { get; set; }
|
|
|
|
public string pregunta1Asegurado1 { get; set; }
|
|
public string pregunta2Asegurado1 { get; set; }
|
|
public string pregunta3Asegurado1 { get; set; }
|
|
public string pregunta4Asegurado1 { get; set; }
|
|
public string pregunta5Asegurado1 { get; set; }
|
|
|
|
public string pregunta1Asegurado2 { get; set; }
|
|
public string pregunta2Asegurado2 { get; set; }
|
|
public string pregunta3Asegurado2 { get; set; }
|
|
public string pregunta4Asegurado2 { get; set; }
|
|
public string pregunta5Asegurado2 { get; set; }
|
|
|
|
public string pregunta1Asegurado3 { get; set; }
|
|
public string pregunta2Asegurado3 { get; set; }
|
|
public string pregunta3Asegurado3 { get; set; }
|
|
public string pregunta4Asegurado3 { get; set; }
|
|
public string pregunta5Asegurado3 { get; set; }
|
|
|
|
public string pregunta1Asegurado4 { get; set; }
|
|
public string pregunta2Asegurado4 { get; set; }
|
|
public string pregunta3Asegurado4 { get; set; }
|
|
public string pregunta4Asegurado4 { get; set; }
|
|
public string pregunta5Asegurado4 { get; set; }
|
|
|
|
public string Observaciones { get; set; }
|
|
public string AsistenciaSanitaria { get; set; }
|
|
public string GarantiaBucodental { get; set; }
|
|
public string ReembolsoGastosCompletos { get; set; }
|
|
public string ReembolsoGastosHospitalarios { get; set; }
|
|
public string ReembolsoGranCobertura { get; set; }
|
|
|
|
public string FormaPago { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaFacturaAG
|
|
{
|
|
public string RazonSocial { get; set; }
|
|
public string CIF { get; set; }
|
|
public string Domicilio { get; set; }
|
|
public string CodigoPostal { get; set; }
|
|
public string PoblacionYProvincia { get; set; }
|
|
public string NumeroFactura { get; set; }
|
|
public string FechaFactura { get; set; }
|
|
public string BaseImponible { get; set; }
|
|
public string PorcentajeIVA { get; set; }
|
|
public string IVA { get; set; }
|
|
public string PorcentajeIRPF { get; set; }
|
|
public string IRPF { get; set; }
|
|
public string Total { get; set; }
|
|
public string EnlaceQR { get; set; }
|
|
public bool QRVisible { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaPolizasG
|
|
{
|
|
public string NumeroPresupuesto { get; set; }
|
|
public string Compania { get; set; }
|
|
public string ReferenciaSEPACia { get; set; }
|
|
public string DomicilioCompania { get; set; }
|
|
public string CodigoPostalCompania { get; set; }
|
|
public string PoblacionCompania { get; set; }
|
|
public string ProvinciaCompania { get; set; }
|
|
public string TelefonoCompania { get; set; }
|
|
public string FaxCompania { get; set; }
|
|
|
|
public string RazonSocialTomador { get; set; }
|
|
public string DomicilioTomador { get; set; }
|
|
public string CodigoPostalTomador { get; set; }
|
|
public string PoblacionTomador { get; set; }
|
|
public string ProvinciaTomador { get; set; }
|
|
public string TratamientoTomador { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string TipoPagoSEPA { get; set; }
|
|
|
|
public string FechaHoy { get; set; }
|
|
public string BienesAsegurados { get; set; }
|
|
public string MarcaModelo { get; set; }
|
|
public string Agente { get; set; }
|
|
public string DomicilioAgente { get; set; }
|
|
public string CodigoPostalAgente { get; set; }
|
|
public string PoblacionAgente { get; set; }
|
|
public string ProvinciaAgente { get; set; }
|
|
public string Ramo { get; set; }
|
|
public string NumeroPoliza { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaRecibos
|
|
{
|
|
public string NumeroPresupuesto { get; set; }
|
|
public string Compania { get; set; }
|
|
public string ReferenciaSEPACia { get; set; }
|
|
public string DomicilioCompania { get; set; }
|
|
public string CodigoPostalCompania { get; set; }
|
|
public string PoblacionCompania { get; set; }
|
|
public string ProvinciaCompania { get; set; }
|
|
public string TelefonoCompania { get; set; }
|
|
public string FaxCompania { get; set; }
|
|
|
|
public string RazonSocialTomador { get; set; }
|
|
public string DomicilioTomador { get; set; }
|
|
public string CodigoPostalTomador { get; set; }
|
|
public string PoblacionTomador { get; set; }
|
|
public string ProvinciaTomador { get; set; }
|
|
public string TratamientoTomador { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string IBAN_Parcial { get; set; }
|
|
public string EntidadBancaria { get; set; }
|
|
public string TipoPagoSEPA { get; set; }
|
|
|
|
public string FechaHoy { get; set; }
|
|
public string BienesAsegurados { get; set; }
|
|
public string BienesAseguradosYMatricula { get; set; }
|
|
public string Matricula { get; set; }
|
|
public string Agente { get; set; }
|
|
public string DomicilioAgente { get; set; }
|
|
public string CodigoPostalAgente { get; set; }
|
|
public string PoblacionAgente { get; set; }
|
|
public string ProvinciaAgente { get; set; }
|
|
public string Ramo { get; set; }
|
|
public string NumeroPoliza { get; set; }
|
|
|
|
public string NumeroRecibo { get; set; }
|
|
public string ImporteRecibo { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
|
|
public string EntidadBancariaCartaRemesa { get; set; }
|
|
public string SucursalBancariaCartaRemesa { get; set; }
|
|
public string IBANcartaRemesa { get; set; }
|
|
public string FechaBaja { get; set; }
|
|
public string CausaBaja { get; set; }
|
|
public string FechaExpedicion { get; set; }
|
|
public string Gestor { get; set; }
|
|
public string Cobrador { get; set; }
|
|
public string TipoPago { get; set; }
|
|
public string NIFCIF { get; set; }
|
|
public string Modalidad { get; set; }
|
|
public string Prima { get; set; }
|
|
public string Consorcio { get; set; }
|
|
public string Impuestos { get; set; }
|
|
public string IPS { get; set; }
|
|
public string Bonificacion { get; set; }
|
|
public string RecargoExterno { get; set; }
|
|
public string PrimaNetaMenosBonificacion { get; set; }
|
|
public string CuotaIPS { get; set; }
|
|
public string LeyendaFamiliaAuto0017 { get; set; }
|
|
public string LeyendaCarteraProduccion0017 { get; set; }
|
|
public string FechaEnvioCompania { get; set; }
|
|
public string Suplemento { get; set; }
|
|
public string ReciboAsociado { get; set; }
|
|
public string FechaNacimientoTomador { get; set; }
|
|
public string FechaCarnetTomador { get; set; }
|
|
public string Coberturas { get; set; }
|
|
public string Familia { get; set; }
|
|
public string Duracion { get; set; }
|
|
public string Tipo { get; set; }
|
|
public string FechaPropuesta { get; set; }
|
|
public string Remesa { get; set; }
|
|
public string FechaRemesa { get; set; }
|
|
public string FechaPago { get; set; }
|
|
public string FechaDevolucionBanco { get; set; }
|
|
public string CausaDevolucion { get; set; }
|
|
public string FechaDevolucionCompania { get; set; }
|
|
public string FechaFactura { get; set; }
|
|
public string NumeroLiquidacionCompania { get; set; }
|
|
public string FechaLiquidacionCompania { get; set; }
|
|
public string NumeroLiquidacionAgente { get; set; }
|
|
public string FechaLquidacionAgente { get; set; }
|
|
public string DescripcionRecibo { get; set; }
|
|
public string ImportePrimaNeta { get; set; }
|
|
public string ImporteBonus { get; set; }
|
|
public string ImporteCons { get; set; }
|
|
public string ImporteImp { get; set; }
|
|
public string ImporteRecEx { get; set; }
|
|
public string PorcentajeComisionTotal { get; set; }
|
|
public string TotalCRec { get; set; }
|
|
public string ImporteComisionToRe { get; set; }
|
|
public string porcentajeComisionAgente { get; set; }
|
|
public string ComisionAgente { get; set; }
|
|
public string PorcentajeComisionAgenteS { get; set; }
|
|
public string ComisionAgenteS { get; set; }
|
|
public string ComisionAsegPN { get; set; }
|
|
public string ComisionAsegRe { get; set; }
|
|
public string ComisionAseCo { get; set; }
|
|
public string ComisionAsegTo { get; set; }
|
|
public string FechaContBanco { get; set; }
|
|
public string FechaContCIA { get; set; }
|
|
public string observacion { get; set; }
|
|
public string situacion { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaRCSociosZurich
|
|
{
|
|
public string TipoRC { get; set; }
|
|
public string TomadorCIF { get; set; }
|
|
public string TomadorNombre { get; set; }
|
|
public string TomadorApellidos { get; set; }
|
|
public string TomadorTelefono { get; set; }
|
|
public string TomadorEmail { get; set; }
|
|
public string TomadorDomicilio { get; set; }
|
|
public string TomadorCodigoPostal { get; set; }
|
|
public string tomadorPoblacion { get; set; }
|
|
public string TomadorProvincia { get; set; }
|
|
public string TomadorCodigoMunicipio { get; set; }
|
|
|
|
public string PropietarioCIF { get; set; }
|
|
public string PropietarioNombre { get; set; }
|
|
public string PropietarioApellidos { get; set; }
|
|
public string PropietarioTelefono { get; set; }
|
|
public string propietarioCorreo { get; set; }
|
|
public string PropietarioDomicilio { get; set; }
|
|
public string PropietarioCodigoPostal { get; set; }
|
|
public string PropietarioPoblacion { get; set; }
|
|
public string PropietarioProvincia { get; set; }
|
|
public string PropietarioCodigoMunicipio { get; set; }
|
|
|
|
public string Dehesa { get; set; }
|
|
public string SuperficieCosechable { get; set; }
|
|
public string CotoDeCaza { get; set; }
|
|
public string VidaPrivada { get; set; }
|
|
public string CabezasVacuno { get; set; }
|
|
public string CabezasOvino { get; set; }
|
|
public string CabezasPorcino { get; set; }
|
|
public string CabezasEquino { get; set; }
|
|
public string CabezasGanadoBravo { get; set; }
|
|
|
|
public string NumeroRega { get; set; }
|
|
public string CodigoGanadero { get; set; }
|
|
public string SumaContratar { get; set; }
|
|
public string Observaciones { get; set; }
|
|
public string FormaPago { get; set; }
|
|
|
|
public string OpcionA { get; set; }
|
|
public string OpcionB { get; set; }
|
|
public string OpcionC { get; set; }
|
|
public string PrimaNetaA { get; set; }
|
|
public string PrimaNetaB { get; set; }
|
|
public string PrimaNetaC { get; set; }
|
|
public string ImpuestosA { get; set; }
|
|
public string ImpuestosB { get; set; }
|
|
public string ImpuestosC { get; set; }
|
|
public string PrimaTotalA { get; set; }
|
|
public string PrimaTotalB { get; set; }
|
|
public string PrimaTotalC { get; set; }
|
|
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaTractoresEuropAssistance
|
|
{
|
|
public string Matricula { get; set; }
|
|
public string Marca { get; set; }
|
|
public string Modelo { get; set; }
|
|
public string Version { get; set; }
|
|
public string FechaMatriculacion { get; set; }
|
|
public string CIF { get; set; }
|
|
public string RazonSocial { get; set; }
|
|
public string FechaNacimiento { get; set; }
|
|
public string EstadoCivil { get; set; }
|
|
public string Sexo { get; set; }
|
|
public string Telefono1 { get; set; }
|
|
public string Telefono2 { get; set; }
|
|
public string Email { get; set; }
|
|
public string Direccion { get; set; }
|
|
public string CodigoPostal { get; set; }
|
|
public string CodigoPoblacion { get; set; }
|
|
public string Poblacion { get; set; }
|
|
public string CodigoProvincia { get; set; }
|
|
public string Provincia { get; set; }
|
|
public string IBAN { get; set; }
|
|
public string FechaEfecto { get; set; }
|
|
public string FechaVencimiento { get; set; }
|
|
}
|
|
|
|
public class CombinacionCorrespondenciaSiniestros
|
|
{
|
|
public string DomicilioAsegasa { get; set; }
|
|
public string CodigoPostalAsegasa { get; set; }
|
|
public string PoblacionAsegasa { get; set; }
|
|
public string ProvinciaAsegasa { get; set; }
|
|
public string RazonSocialTomador { get; set; }
|
|
public string ApellidosTomador { get; set; }
|
|
public string NombreTomador { get; set; }
|
|
public string DomicilioTomador { get; set; }
|
|
public string CodigoPostalTomador { get; set; }
|
|
public string PoblacionTomador { get; set; }
|
|
public string ProvinciaTomador { get; set; }
|
|
public string TratamientoTomador { get; set; }
|
|
public string FechaHoy { get; set; }
|
|
public string NumeroSiniestro { get; set; }
|
|
public string FechaAccidente { get; set; }
|
|
public string Matricula { get; set; }
|
|
public string ReferenciaCompania { get; set; }
|
|
public string Agente { get; set; }
|
|
public string DomicilioAgente { get; set; }
|
|
public string CodigoPostalAgente { get; set; }
|
|
public string PoblacionAgente { get; set; }
|
|
public string ProvinciaAgente { get; set; }
|
|
public string Ramo { get; set; }
|
|
public string NumeroPoliza { get; set; }
|
|
public string compania { get; set; }
|
|
public string Domiciliocompania { get; set; }
|
|
public string CodigoPostalcompania { get; set; }
|
|
public string Poblacioncompania { get; set; }
|
|
public string Provinciacompania { get; set; }
|
|
public string Telefonocompania { get; set; }
|
|
public string Faxcompania { get; set; }
|
|
public string Taller { get; set; }
|
|
public string DomicilioTaller { get; set; }
|
|
public string PoblacionTaller { get; set; }
|
|
public string CodigoPostalTaller { get; set; }
|
|
public string ProvinciaTaller { get; set; }
|
|
public string TelefonoTaller { get; set; }
|
|
public string RazonSocialContrario { get; set; }
|
|
public string NombreContrario { get; set; }
|
|
public string ApellidosContrario { get; set; }
|
|
public string DomicilioContrario { get; set; }
|
|
public string PoblacionContrario { get; set; }
|
|
public string CodigoPostalContrario { get; set; }
|
|
public string ProvinciaContrario { get; set; }
|
|
public string TratamientoContrario { get; set; }
|
|
public string MatriculaContrario { get; set; }
|
|
public string OficinaAgente { get; set; }
|
|
}
|
|
|
|
public static class Utilidades
|
|
{
|
|
public static List<CombinacionCorrespondenciaSiniestros> ObtieneCCSiniestros(List<siniestros> ListaSiniestros)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaSiniestros> ListaCCS = new List<CombinacionCorrespondenciaSiniestros>();
|
|
CombinacionCorrespondenciaSiniestros ccs;
|
|
int i = 0;
|
|
int n = ListaSiniestros.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var s in ListaSiniestros)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccs = new CombinacionCorrespondenciaSiniestros();
|
|
|
|
ccs.DomicilioAsegasa = bd.enumeraciones.First(X => X.Codigo == "DATEMP.DOMICILIO").ValorAlfabeticoLargo;
|
|
ccs.CodigoPostalAsegasa = bd.enumeraciones.First(X => X.Codigo == "DATEMP.CPO").ValorAlfabeticoLargo;
|
|
ccs.PoblacionAsegasa = bd.enumeraciones.First(X => X.Codigo == "DATEMP.POBLACION").ValorAlfabeticoLargo;
|
|
ccs.ProvinciaAsegasa = bd.enumeraciones.First(X => X.Codigo == "DATEMP.PROVINCIA").ValorAlfabeticoLargo;
|
|
|
|
ccs.RazonSocialTomador = s.idPolizaNavigation.Tomador.RazonSocial;
|
|
ccs.ApellidosTomador = s.idPolizaNavigation.Tomador.Apellidos;
|
|
ccs.NombreTomador = s.idPolizaNavigation.Tomador.Nombre;
|
|
|
|
if (s.idPolizaNavigation.Tomador.direcciones.Count > 0)
|
|
{
|
|
if (s.idPolizaNavigation.Tomador.direcciones.Count == 1 || s.idPolizaNavigation.Tomador.direcciones.Where(x => x.idTipo.HasValue && x.idTipoNavigation.Codigo == "TIPDIR.CORREO").Count() == 0)
|
|
{
|
|
var dir = s.idPolizaNavigation.Tomador.direcciones.First();
|
|
ccs.DomicilioTomador = dir.Direccion;
|
|
ccs.CodigoPostalTomador = dir.CodigoPostal;
|
|
ccs.PoblacionTomador = dir.CodigoMunicipioNavigation.Nombre;
|
|
ccs.ProvinciaTomador = dir.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
else
|
|
{
|
|
var dir = s.idPolizaNavigation.Tomador.direcciones.First(x => x.idTipo.HasValue && x.idTipoNavigation.Codigo == "TIPDIR.CORREO");
|
|
ccs.DomicilioTomador = dir.Direccion;
|
|
ccs.CodigoPostalTomador = dir.CodigoPostal;
|
|
ccs.PoblacionTomador = dir.CodigoMunicipioNavigation.Nombre;
|
|
ccs.ProvinciaTomador = dir.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
}
|
|
|
|
ccs.TratamientoTomador = "Distinguido Sr.";
|
|
ccs.FechaHoy = DateTime.Today.ToShortDateString(); // Placeholder if FechaEnCastellano not found
|
|
ccs.NumeroSiniestro = s.idSiniestro.ToString();
|
|
ccs.FechaAccidente = s.FechaAccidente?.ToShortDateString();
|
|
ccs.Matricula = s.idPolizaNavigation.Matricula;
|
|
ccs.ReferenciaCompania = s.ReferenciaCompania;
|
|
ccs.Agente = s.idPolizaNavigation.idAgenteNavigation.Nombre;
|
|
ccs.OficinaAgente = s.idPolizaNavigation.idAgenteNavigation.OficinaAgente;
|
|
|
|
if (s.idPolizaNavigation.idAgenteNavigation.idDireccion.HasValue)
|
|
{
|
|
ccs.DomicilioAgente = s.idPolizaNavigation.idAgenteNavigation.idDireccionNavigation.Direccion;
|
|
ccs.CodigoPostalAgente = s.idPolizaNavigation.idAgenteNavigation.idDireccionNavigation.CodigoPostal;
|
|
ccs.PoblacionAgente = s.idPolizaNavigation.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
ccs.ProvinciaAgente = s.idPolizaNavigation.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
|
|
ccs.Ramo = s.idPolizaNavigation.idRamoNavigation.Descripcion;
|
|
ccs.NumeroPoliza = s.idPolizaNavigation.NumeroPoliza;
|
|
ccs.compania = s.idPolizaNavigation.idCompaniaNavigation.Nombre;
|
|
|
|
if (s.idPolizaNavigation.idCompaniaNavigation.idDireccion.HasValue)
|
|
{
|
|
ccs.Domiciliocompania = s.idPolizaNavigation.idCompaniaNavigation.idDireccionNavigation.Direccion;
|
|
ccs.CodigoPostalcompania = s.idPolizaNavigation.idCompaniaNavigation.idDireccionNavigation.CodigoPostal;
|
|
ccs.Poblacioncompania = s.idPolizaNavigation.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
ccs.Provinciacompania = s.idPolizaNavigation.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
|
|
ccs.Telefonocompania = s.idPolizaNavigation.idCompaniaNavigation.Telefono1;
|
|
ccs.Faxcompania = s.idPolizaNavigation.idCompaniaNavigation.Fax;
|
|
|
|
if (s.idEntidadTaller.HasValue)
|
|
{
|
|
ccs.Taller = s.idEntidadTallerNavigation.RazonSocial;
|
|
if (s.idEntidadTallerNavigation.direcciones.Count > 0)
|
|
{
|
|
var dir = s.idEntidadTallerNavigation.direcciones.First();
|
|
if (s.idEntidadTallerNavigation.direcciones.Count > 1)
|
|
{
|
|
dir = s.idEntidadTallerNavigation.direcciones.FirstOrDefault(x => x.idTipo.HasValue && x.idTipoNavigation.Codigo == "TIPDIR.CORREO") ?? dir;
|
|
}
|
|
ccs.DomicilioTaller = dir.Direccion;
|
|
ccs.CodigoPostalTaller = dir.CodigoPostal;
|
|
if (dir.CodigoMunicipioNavigation != null)
|
|
{
|
|
ccs.PoblacionTaller = dir.CodigoMunicipioNavigation.Nombre;
|
|
if (dir.CodigoMunicipioNavigation.CodigoProvinciaNavigation != null)
|
|
ccs.ProvinciaTaller = dir.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
}
|
|
ccs.TelefonoTaller = s.idEntidadTallerNavigation.Telefono1;
|
|
}
|
|
|
|
if (s.idEntidadContrario.HasValue)
|
|
{
|
|
ccs.RazonSocialContrario = s.idEntidadContrarioNavigation.RazonSocial;
|
|
ccs.NombreContrario = s.idEntidadContrarioNavigation.Nombre;
|
|
ccs.ApellidosContrario = s.idEntidadContrarioNavigation.Apellidos;
|
|
if (s.idEntidadContrarioNavigation.direcciones.Count > 0)
|
|
{
|
|
var dir = s.idEntidadContrarioNavigation.direcciones.First();
|
|
if (s.idEntidadContrarioNavigation.direcciones.Count > 1)
|
|
{
|
|
dir = s.idEntidadContrarioNavigation.direcciones.FirstOrDefault(x => x.idTipo.HasValue && x.idTipoNavigation.Codigo == "TIPDIR.CORREO") ?? dir;
|
|
}
|
|
ccs.DomicilioContrario = dir.Direccion;
|
|
ccs.CodigoPostalContrario = dir.CodigoPostal;
|
|
if (dir.CodigoMunicipioNavigation != null)
|
|
{
|
|
ccs.PoblacionContrario = dir.CodigoMunicipioNavigation.Nombre;
|
|
if (dir.CodigoMunicipioNavigation.CodigoProvinciaNavigation != null)
|
|
ccs.ProvinciaContrario = dir.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
}
|
|
ccs.TratamientoContrario = "Distinguido Sr.";
|
|
}
|
|
ccs.MatriculaContrario = s.MatriculaContrario;
|
|
ListaCCS.Add(ccs);
|
|
}
|
|
return ListaCCS;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
public static List<CombinacionCorrespondenciaFacturaAG> ObtieneCCFacturaAG(liquidacionesagentes Liquidacion, bool MostrarProgreso = false)
|
|
{
|
|
try
|
|
{
|
|
if (MostrarProgreso)
|
|
{
|
|
//DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
}
|
|
|
|
List<CombinacionCorrespondenciaFacturaAG> ListaCC = new List<CombinacionCorrespondenciaFacturaAG>();
|
|
CombinacionCorrespondenciaFacturaAG cc = new CombinacionCorrespondenciaFacturaAG();
|
|
|
|
var confsi = enumeraciones.LConfsi.Where(x => x.Fecha1.HasValue &&
|
|
DateOnly.FromDateTime(x.Fecha1.Value) <= Liquidacion.FechaFactura.Value).OrderBy(x => x.Fecha1).FirstOrDefault();
|
|
|
|
cc.NumeroFactura = Liquidacion.NumeroFactura;
|
|
cc.FechaFactura = Liquidacion.FechaFactura.Value.ToString("dd/MM/yyyy");
|
|
cc.CIF = Liquidacion.CIF;
|
|
cc.RazonSocial = Liquidacion.RazonSocial;
|
|
|
|
cc.PoblacionYProvincia = (Liquidacion.idAgenteNavigation.idDireccionNavigation != null && Liquidacion.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation != null)
|
|
? Liquidacion.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation.PoblacionYProvincia
|
|
: "* Desconocida *";
|
|
|
|
cc.CodigoPostal = (Liquidacion.idAgenteNavigation.idDireccionNavigation != null)
|
|
? Liquidacion.idAgenteNavigation.idDireccionNavigation.CodigoPostal
|
|
: "* Desconocido * ";
|
|
|
|
cc.Domicilio = (Liquidacion.idAgenteNavigation.idDireccionNavigation != null)
|
|
? Liquidacion.idAgenteNavigation.idDireccionNavigation.Direccion
|
|
: "* Desconocido *";
|
|
|
|
// Cálculos numéricos y redondeo
|
|
cc.BaseImponible = Math.Round(Liquidacion.BaseImponible, 2, MidpointRounding.AwayFromZero).ToString("N2");
|
|
|
|
cc.PorcentajeIRPF = Liquidacion.PorcentajeIRPF.HasValue
|
|
? Math.Round(Liquidacion.PorcentajeIRPF.Value, 2, MidpointRounding.AwayFromZero).ToString("N2")
|
|
: "0";
|
|
|
|
cc.IRPF = Math.Round(Liquidacion.IRPF, 2, MidpointRounding.AwayFromZero).ToString("N2");
|
|
|
|
cc.PorcentajeIVA = Liquidacion.PorcentajeIVA.HasValue
|
|
? Math.Round(Liquidacion.PorcentajeIVA.Value, 2, MidpointRounding.AwayFromZero).ToString("N2")
|
|
: "0";
|
|
|
|
cc.IVA = Math.Round(Liquidacion.IVA, 2, MidpointRounding.AwayFromZero).ToString("N2");
|
|
|
|
// Formato moneda ("c2")
|
|
cc.Total = Math.Round(Liquidacion.Importe, 2, MidpointRounding.AwayFromZero).ToString("c2");
|
|
|
|
cc.EnlaceQR = Liquidacion.EnlaceQR;
|
|
cc.QRVisible = Liquidacion.QRVisible;
|
|
|
|
ListaCC.Add(cc);
|
|
return ListaCC;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaPolizasG> ObtieneCCPolizasG(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaPolizasG> ListaCCP = new List<CombinacionCorrespondenciaPolizasG>();
|
|
CombinacionCorrespondenciaPolizasG ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaPolizasG();
|
|
var domTomador = p.entidadespolizas.First(x => x.EsTomador == true);
|
|
|
|
ccp.TipoPagoSEPA = "Pago recurrente";
|
|
ccp.IBAN = p.IBAN;
|
|
ccp.RazonSocialTomador = string.IsNullOrEmpty(p.Tomador.RazonSocial) ? p.Tomador.Apellidos + ", " + p.Tomador.Nombre : p.Tomador.RazonSocial;
|
|
|
|
if (domTomador.idDireccionNavigation != null)
|
|
{
|
|
ccp.DomicilioTomador = domTomador.idDireccionNavigation.Direccion;
|
|
ccp.CodigoPostalTomador = domTomador.idDireccionNavigation.CodigoPostal;
|
|
if (domTomador.idDireccionNavigation.CodigoMunicipioNavigation != null)
|
|
{
|
|
ccp.PoblacionTomador = domTomador.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
ccp.ProvinciaTomador = domTomador.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
}
|
|
|
|
ccp.TratamientoTomador = "Distinguido Sr.";
|
|
ccp.FechaHoy = DateTime.Today.ToShortDateString();
|
|
|
|
ccp.Agente = p.idAgenteNavigation.Nombre;
|
|
if (p.idAgenteNavigation.idDireccion.HasValue)
|
|
{
|
|
ccp.DomicilioAgente = p.idAgenteNavigation.idDireccionNavigation.Direccion;
|
|
ccp.CodigoPostalAgente = p.idAgenteNavigation.idDireccionNavigation.CodigoPostal;
|
|
ccp.PoblacionAgente = p.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
ccp.ProvinciaAgente = p.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
ccp.Ramo = p.idRamoNavigation.Descripcion;
|
|
ccp.NumeroPoliza = p.NumeroPoliza;
|
|
ccp.NumeroPresupuesto = p.idPoliza.ToString();
|
|
ccp.Compania = p.idCompaniaNavigation.Nombre;
|
|
if (p.idCompaniaNavigation.idDireccion.HasValue)
|
|
{
|
|
ccp.DomicilioCompania = p.idCompaniaNavigation.idDireccionNavigation.Direccion;
|
|
ccp.CodigoPostalCompania = p.idCompaniaNavigation.idDireccionNavigation.CodigoPostal;
|
|
ccp.PoblacionCompania = p.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
ccp.ProvinciaCompania = p.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
ccp.TelefonoCompania = p.idCompaniaNavigation.Telefono1;
|
|
ccp.FaxCompania = p.idCompaniaNavigation.Fax;
|
|
ccp.ReferenciaSEPACia = p.idPoliza.ToString();
|
|
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaPagosTelematicos> ObtieneCCPagosTelematicos(List<pagostelematicos> ListaPagos)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaPagosTelematicos> ListaCCR = new List<CombinacionCorrespondenciaPagosTelematicos>();
|
|
CombinacionCorrespondenciaPagosTelematicos ccp;
|
|
int i = 0;
|
|
int n = ListaPagos.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPagos)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaPagosTelematicos();
|
|
// VB was empty inside With ccp
|
|
ListaCCR.Add(ccp);
|
|
}
|
|
return ListaCCR;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaRecibos> ObtieneCCRecibos(List<recibos> ListaRecibos)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRecibos> ListaCCR = new List<CombinacionCorrespondenciaRecibos>();
|
|
CombinacionCorrespondenciaRecibos ccr;
|
|
int i = 0;
|
|
int n = ListaRecibos.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
var sIBAN_se = System.Text.RegularExpressions.Regex.Replace(bd.enumeraciones.First(x => x.Codigo == "DATEMP.IBAN-CR-SE").ValorAlfabetico1, ".{4}", "$0 ").Trim();
|
|
var sentb_se = bd.enumeraciones.First(x => x.Codigo == "DATEMP.ENTB-CR-SE").ValorAlfabetico1;
|
|
var ssucb_se = bd.enumeraciones.First(x => x.Codigo == "DATEMP.SUCB-CR-SE").ValorAlfabetico1;
|
|
|
|
var sIBAN_an = System.Text.RegularExpressions.Regex.Replace(bd.enumeraciones.First(x => x.Codigo == "DATEMP.IBAN-CR-AN").ValorAlfabetico1, ".{4}", "$0 ").Trim();
|
|
var sentb_an = bd.enumeraciones.First(x => x.Codigo == "DATEMP.ENTB-CR-AN").ValorAlfabetico1;
|
|
var ssucb_an = bd.enumeraciones.First(x => x.Codigo == "DATEMP.SUCB-CR-AN").ValorAlfabetico1;
|
|
var idFamiliaAuto = bd.enumeraciones.First(x => x.Codigo == "FAMRAM.AU").idEnumeracion;
|
|
|
|
foreach (var r in ListaRecibos)
|
|
{
|
|
var p = r.idPolizaNavigation;
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccr = new CombinacionCorrespondenciaRecibos();
|
|
var domTomador = p.entidadespolizas.First(x => x.EsTomador == true);
|
|
|
|
ccr.TipoPagoSEPA = "Pago recurrente";
|
|
ccr.IBAN = r.IBAN;
|
|
ccr.IBAN_Parcial = r.IBAN_Parcial;
|
|
ccr.EntidadBancaria = r.Banco;
|
|
ccr.RazonSocialTomador = string.IsNullOrEmpty(p.Tomador.RazonSocial) ? p.Tomador.Apellidos + ", " + p.Tomador.Nombre : p.Tomador.RazonSocial;
|
|
|
|
if (p.Tomador.FechaNacimiento.HasValue)
|
|
ccr.FechaNacimientoTomador = p.Tomador.FechaNacimiento.ToString();
|
|
|
|
ccr.FechaCarnetTomador = p.Tomador.FechaExpedicionCarnet.HasValue ? p.Tomador.FechaExpedicionCarnet.Value.ToString("dd/MM/yyyy") : "";
|
|
ccr.Coberturas = p.Coberturas;
|
|
ccr.FechaPropuesta = p.FechaAlta.HasValue ? p.FechaAlta.Value.ToString("dd/MM/yyyy") : "";
|
|
ccr.Remesa = r.idRemesa.HasValue ? r.idRemesa.ToString() : "";
|
|
ccr.FechaRemesa = (r.idRemesa.HasValue && r.idRemesaNavigation.Fecha.HasValue) ? r.idRemesaNavigation.Fecha.Value.ToString("dd/MM/yyyy") : "";
|
|
ccr.FechaPago = r.FechaPago.HasValue ? r.FechaPago.Value.ToString("dd/MM/yyyy") : "";
|
|
|
|
if (r.FechaDevolucionBanco.HasValue)
|
|
ccr.FechaDevolucionBanco = r.FechaDevolucionBanco.ToString();
|
|
|
|
ccr.CausaDevolucion = r.CausaDevolucion;
|
|
ccr.FechaFactura = r.FechaFacturacion.HasValue ? r.FechaFacturacion.Value.ToString("dd/MM/yyyy") : "";
|
|
ccr.ImporteBonus = r.BonificacionORecargo?.ToString("c2");
|
|
ccr.ImporteCons = r.Consorcio?.ToString("c2");
|
|
ccr.ImporteImp = r.Impuesto?.ToString("c2");
|
|
ccr.ImporteRecEx = r.RecargoExterno?.ToString("c2");
|
|
ccr.PorcentajeComisionTotal = r.PorcentajeReciboPrimaNeta?.ToString("c2");
|
|
ccr.TotalCRec = r.ComisionReciboPrimaNeta?.ToString("c2");
|
|
ccr.ImporteComisionToRe = r.TotalComision?.ToString("c2");
|
|
ccr.porcentajeComisionAgente = r.PorcentajeComisionAgente?.ToString("c2");
|
|
ccr.ComisionAgente = r.ComisionAgente?.ToString("c2");
|
|
ccr.ComisionAsegPN = r.ComisionAsegasaPrimaNeta?.ToString("c2");
|
|
ccr.ComisionAsegRe = r.AsegasaRecargoExterno?.ToString("c2");
|
|
ccr.ComisionAseCo = r.AsegasaComisionConsorcio?.ToString("c2");
|
|
ccr.ComisionAsegTo = r.AsegasaComisionTotal?.ToString("c2");
|
|
ccr.observacion = r.Observaciones;
|
|
|
|
if (domTomador.idDireccionNavigation != null)
|
|
{
|
|
ccr.DomicilioTomador = domTomador.idDireccionNavigation.Direccion;
|
|
ccr.CodigoPostalTomador = domTomador.idDireccionNavigation.CodigoPostal;
|
|
ccr.PoblacionTomador = domTomador.idDireccionNavigation.CodigoMunicipioNavigation?.Nombre ?? "";
|
|
ccr.ProvinciaTomador = domTomador.idDireccionNavigation.CodigoMunicipioNavigation?.CodigoProvinciaNavigation?.Nombre ?? "";
|
|
}
|
|
|
|
ccr.TratamientoTomador = "Muy Sr. nuestro";
|
|
if (p.Tomador.Sexo == "MUJER") ccr.TratamientoTomador = "Muy Sra. Nuestra";
|
|
|
|
ccr.FechaHoy = DateTime.Today.ToShortDateString();
|
|
ccr.Agente = r.idAgenteNavigation.Nombre;
|
|
if (r.idAgenteNavigation.idDireccion.HasValue)
|
|
{
|
|
ccr.DomicilioAgente = r.idAgenteNavigation.idDireccionNavigation.Direccion;
|
|
ccr.CodigoPostalAgente = r.idAgenteNavigation.idDireccionNavigation.CodigoPostal;
|
|
ccr.PoblacionAgente = r.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation?.Nombre ?? "";
|
|
ccr.ProvinciaAgente = r.idAgenteNavigation.idDireccionNavigation.CodigoMunicipioNavigation?.CodigoProvinciaNavigation?.Nombre ?? "";
|
|
}
|
|
|
|
ccr.Ramo = p.idRamoNavigation.Descripcion;
|
|
ccr.NumeroPoliza = p.NumeroPoliza;
|
|
ccr.NumeroPresupuesto = p.idPoliza.ToString();
|
|
ccr.Compania = p.idCompaniaNavigation.Nombre;
|
|
ccr.ReferenciaSEPACia = p.idPoliza.ToString();
|
|
|
|
ccr.FechaEnvioCompania = r.FechaRecepcionCia.ToString();
|
|
ccr.Suplemento = r.DescripcionSuplemento;
|
|
|
|
if (p.idRamoNavigation.idFamiliaRamo.HasValue)
|
|
{
|
|
ccr.Familia = bd.enumeraciones.First(x => x.idEnumeracion == p.idRamoNavigation.idFamiliaRamo).Descripcion;
|
|
}
|
|
|
|
if (p.idCompaniaNavigation.idDireccion.HasValue)
|
|
{
|
|
ccr.DomicilioCompania = p.idCompaniaNavigation.idDireccionNavigation.Direccion;
|
|
ccr.CodigoPostalCompania = p.idCompaniaNavigation.idDireccionNavigation.CodigoPostal;
|
|
if (p.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation != null)
|
|
{
|
|
ccr.PoblacionCompania = p.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation.Nombre;
|
|
ccr.ProvinciaCompania = p.idCompaniaNavigation.idDireccionNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre;
|
|
}
|
|
}
|
|
|
|
ccr.TelefonoCompania = p.idCompaniaNavigation.Telefono1;
|
|
ccr.FaxCompania = p.idCompaniaNavigation.Fax;
|
|
ccr.ImporteRecibo = r.TotalRecibo?.ToString("c2");
|
|
ccr.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccr.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
|
|
ccr.LeyendaFamiliaAuto0017 = (p.idRamoNavigation.idFamiliaRamo == idFamiliaAuto) ? "CERTIFICADO INTERNACIONAL VÁLIDO POR EL PERIODO DE COBERTURA DEL RECIBO" : "";
|
|
ccr.LeyendaCarteraProduccion0017 = (r.idTipoNavigation.ValorNumerico1 == 1) ? "Recibo de renovación" : "Recibo de producción";
|
|
ccr.FechaExpedicion = r.FechaExpedicion.ToString();
|
|
|
|
ccr.IBAN = r.IBAN;
|
|
ccr.Consorcio = r.Consorcio.HasValue.ToString();
|
|
ccr.Impuestos = r.Impuesto.HasValue.ToString();
|
|
ccr.Prima = r.PrimaNeta.HasValue.ToString();
|
|
ccr.Modalidad = p.idRamoNavigation.Descripcion;
|
|
ccr.BienesAsegurados = p.BienesAsegurados;
|
|
ccr.BienesAseguradosYMatricula = (p.BienesAsegurados ?? "").Contains(p.Matricula ?? "") ? p.BienesAsegurados : (p.BienesAsegurados + " " + p.Matricula).Trim();
|
|
ccr.NIFCIF = r.idPolizaNavigation.Tomador.CIF;
|
|
ccr.Bonificacion = r.BonificacionORecargo.HasValue.ToString();
|
|
ccr.RecargoExterno = r.RecargoExterno.HasValue.ToString();
|
|
ccr.TipoPago = p.TipoCobro;
|
|
ccr.PrimaNetaMenosBonificacion = (r.PrimaNeta - (r.BonificacionORecargo)).HasValue.ToString();
|
|
ccr.CuotaIPS = (double.Parse(ccr.PrimaNetaMenosBonificacion) * 0.06).ToString();
|
|
|
|
string CompaniaStr = p.idCompaniaNavigation.Codigo;
|
|
switch (CompaniaStr)
|
|
{
|
|
case "0002":
|
|
ccr.Gestor = "X41235";
|
|
ccr.Cobrador = "X41235";
|
|
break;
|
|
case "0017":
|
|
ccr.Gestor = "4100017";
|
|
ccr.Cobrador = "4100";
|
|
break;
|
|
}
|
|
|
|
ccr.EntidadBancariaCartaRemesa = (r.OficinaAgente?.ToLower() == "sevilla") ? sentb_se : sentb_an;
|
|
ccr.SucursalBancariaCartaRemesa = (r.OficinaAgente?.ToLower() == "sevilla") ? ssucb_se : ssucb_an;
|
|
ccr.IBANcartaRemesa = (r.OficinaAgente?.ToLower() == "sevilla") ? sIBAN_se : sIBAN_an;
|
|
ccr.BienesAsegurados = p.BienesAsegurados;
|
|
ccr.Matricula = p.Matricula;
|
|
ccr.NumeroRecibo = r.NumeroRecibo;
|
|
|
|
if (r.FechaBaja.HasValue) ccr.FechaBaja = r.FechaBaja.Value.ToShortDateString();
|
|
ccr.CausaBaja = r.CausaBajaName;
|
|
|
|
ListaCCR.Add(ccr);
|
|
}
|
|
return ListaCCR;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaRCSociosCaser> ObtieneCCRCSociosCaser(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRCSociosCaser> ListaCCP = new List<CombinacionCorrespondenciaRCSociosCaser>();
|
|
CombinacionCorrespondenciaRCSociosCaser ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaRCSociosCaser();
|
|
var r = p.RcSociosCaser;
|
|
if (r != null)
|
|
{
|
|
ccp.Nombre = r.Nombre;
|
|
ccp.Situacion = r.Situacion;
|
|
ccp.TMunicipal = r.TMunicipal;
|
|
ccp.FProvincia = r.FProvincia;
|
|
ccp.Equino = r.Equino.ToString();
|
|
ccp.VacunoManso = r.VacunoManso.ToString();
|
|
ccp.Porcino = r.Porcino.ToString();
|
|
ccp.OvinoCaprino = r.OvinoCaprino.ToString();
|
|
ccp.Aviar = r.Aviar.ToString();
|
|
ccp.Cunicula = r.Cunicula.ToString();
|
|
ccp.TotalGanado = r.TotalGanado.ToString();
|
|
ccp.VacunoBravo = r.VacunoBravo.ToString();
|
|
ccp.MenorSinJabalies = r.MenorSinJabalies.ToString("n2");
|
|
ccp.MenorConJabalies = r.MenorConJabalies.ToString("n2");
|
|
ccp.MayorSinMalla = r.MayorSinMalla.ToString("n2");
|
|
ccp.MayorConMalla = r.MayorConMalla.ToString("n2");
|
|
ccp.HasLabor = r.HasLabor.ToString("n2");
|
|
ccp.HasDehesa = r.HasDehesa.ToString("n2");
|
|
ccp.TotalSuperficie = r.TotalSuperficie.ToString("n2");
|
|
ccp.OpcionElegida = r.OpcionElegida.ToString();
|
|
ccp.Total = r.Total;
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.DañosMateriales1 = r.DañosMateriales1.ToString("n2");
|
|
ccp.DañosMateriales2 = r.DañosMateriales2.ToString("n2");
|
|
ccp.DañosMateriales3 = r.DañosMateriales3.ToString("n2");
|
|
ccp.DañosMateriales4 = r.DañosMateriales4.ToString("n2");
|
|
ccp.DañosMateriales5 = r.DañosMateriales5.ToString("n2");
|
|
ccp.DañosMateriales6 = r.DañosMateriales6.ToString("n2");
|
|
ccp.Sublimite1 = r.Sublimite1.ToString("n2");
|
|
ccp.Sublimite2 = r.Sublimite2.ToString("n2");
|
|
ccp.Sublimite3 = r.Sublimite3.ToString("n2");
|
|
ccp.Sublimite4 = r.Sublimite4.ToString("n2");
|
|
ccp.Sublimite5 = r.Sublimite5.ToString("n2");
|
|
ccp.Sublimite6 = r.Sublimite6.ToString("n2");
|
|
ccp.Patronal1 = r.Patronal1.ToString("n2");
|
|
ccp.Patronal2 = r.Patronal2.ToString("n2");
|
|
ccp.Patronal3 = r.Patronal3.ToString("n2");
|
|
ccp.Patronal4 = r.Patronal4.ToString("n2");
|
|
ccp.Patronal5 = r.Patronal5.ToString("n2");
|
|
ccp.Patronal6 = r.Patronal6.ToString("n2");
|
|
ccp.PNetaLabor1 = r.PNetaLabor1.ToString("n2");
|
|
ccp.PNetaLabor2 = r.PNetaLabor2.ToString("n2");
|
|
ccp.PNetaLabor3 = r.PNetaLabor3.ToString("n2");
|
|
ccp.PNetaLabor4 = r.PNetaLabor4.ToString("n2");
|
|
ccp.PNetaLabor5 = r.PNetaLabor5.ToString("n2");
|
|
ccp.PNetaLabor6 = r.PNetaLabor6.ToString("n2");
|
|
ccp.PNetaGanado1 = r.PNetaGanado1.ToString("n2");
|
|
ccp.PNetaGanado2 = r.PNetaGanado2.ToString("n2");
|
|
ccp.PNetaGanado3 = r.PNetaGanado3.ToString("n2");
|
|
ccp.PNetaGanado4 = r.PNetaGanado4.ToString("n2");
|
|
ccp.PNetaGanado5 = r.PNetaGanado5.ToString("n2");
|
|
ccp.PNetaGanado6 = r.PNetaGanado6.ToString("n2");
|
|
ccp.PNetaGanaderia1 = r.PNetaGanaderia1.ToString("n2");
|
|
ccp.PNetaGanaderia2 = r.PNetaGanaderia2.ToString("n2");
|
|
ccp.PNetaGanaderia3 = r.PNetaGanaderia3.ToString("n2");
|
|
ccp.PNetaGanaderia4 = r.PNetaGanaderia4.ToString("n2");
|
|
ccp.PNetaGanaderia5 = r.PNetaGanaderia5.ToString("n2");
|
|
ccp.PNetaGanaderia6 = r.PNetaGanaderia6.ToString("n2");
|
|
ccp.PSubtotal1 = r.PSubtotal1.ToString("n2");
|
|
ccp.PSubtotal2 = r.PSubtotal2.ToString("n2");
|
|
ccp.PSubtotal3 = r.PSubtotal3.ToString("n2");
|
|
ccp.PSubtotal4 = r.PSubtotal4.ToString("n2");
|
|
ccp.PSubtotal5 = r.PSubtotal5.ToString("n2");
|
|
ccp.PSubtotal6 = r.PSubtotal6.ToString("n2");
|
|
ccp.MenorSinJabalies1 = r.MenorSinJabalies1.ToString("n2");
|
|
ccp.MenorSinJabalies2 = r.MenorSinJabalies2.ToString("n2");
|
|
ccp.MenorSinJabalies3 = r.MenorSinJabalies3.ToString("n2");
|
|
ccp.MenorSinJabalies4 = r.MenorSinJabalies4.ToString("n2");
|
|
ccp.MenorSinJabalies5 = r.MenorSinJabalies5.ToString("n2");
|
|
ccp.MenorSinJabalies6 = r.MenorSinJabalies6.ToString("n2");
|
|
ccp.MenorConJabalies1 = r.MenorConJabalies1.ToString("n2");
|
|
ccp.MenorConJabalies2 = r.MenorConJabalies2.ToString("n2");
|
|
ccp.MenorConJabalies3 = r.MenorConJabalies3.ToString("n2");
|
|
ccp.MenorConJabalies4 = r.MenorConJabalies4.ToString("n2");
|
|
ccp.MenorConJabalies5 = r.MenorConJabalies5.ToString("n2");
|
|
ccp.MenorConJabalies6 = r.MenorConJabalies6.ToString("n2");
|
|
ccp.MayorSinMalla1 = r.MayorSinMalla1.ToString("n2");
|
|
ccp.MayorSinMalla2 = r.MayorSinMalla2.ToString("n2");
|
|
ccp.MayorSinMalla3 = r.MayorSinMalla3.ToString("n2");
|
|
ccp.MayorSinMalla4 = r.MayorSinMalla4.ToString("n2");
|
|
ccp.MayorSinMalla5 = r.MayorSinMalla5.ToString("n2");
|
|
ccp.MayorSinMalla6 = r.MayorSinMalla6.ToString("n2");
|
|
ccp.MayorConMalla1 = r.MayorConMalla1.ToString("n2");
|
|
ccp.MayorConMalla2 = r.MayorConMalla2.ToString("n2");
|
|
ccp.MayorConMalla3 = r.MayorConMalla3.ToString("n2");
|
|
ccp.MayorConMalla4 = r.MayorConMalla4.ToString("n2");
|
|
ccp.MayorConMalla5 = r.MayorConMalla5.ToString("n2");
|
|
ccp.MayorConMalla6 = r.MayorConMalla6.ToString("n2");
|
|
ccp.CotosSubtotal1 = r.CotosSubtotal1.ToString("n2");
|
|
ccp.CotosSubtotal2 = r.CotosSubtotal2.ToString("n2");
|
|
ccp.CotosSubtotal3 = r.CotosSubtotal3.ToString("n2");
|
|
ccp.CotosSubtotal4 = r.CotosSubtotal4.ToString("n2");
|
|
ccp.CotosSubtotal5 = r.CotosSubtotal5.ToString("n2");
|
|
ccp.CotosSubtotal6 = r.CotosSubtotal6.ToString("n2");
|
|
ccp.PNeta1 = r.PNeta1.ToString("n2");
|
|
ccp.PNeta2 = r.PNeta2.ToString("n2");
|
|
ccp.PNeta3 = r.PNeta3.ToString("n2");
|
|
ccp.PNeta4 = r.PNeta4.ToString("n2");
|
|
ccp.PNeta5 = r.PNeta5.ToString("n2");
|
|
ccp.PNeta6 = r.PNeta6.ToString("n2");
|
|
ccp.Impuestos1 = r.Impuestos1.ToString("n2");
|
|
ccp.Impuestos2 = r.Impuestos2.ToString("n2");
|
|
ccp.Impuestos3 = r.Impuestos3.ToString("n2");
|
|
ccp.Impuestos4 = r.Impuestos4.ToString("n2");
|
|
ccp.Impuestos5 = r.Impuestos5.ToString("n2");
|
|
ccp.Impuestos6 = r.Impuestos6.ToString("n2");
|
|
ccp.PTotal1 = r.PTotal1.ToString("n2");
|
|
ccp.PTotal2 = r.PTotal2.ToString("n2");
|
|
ccp.PTotal3 = r.PTotal3.ToString("n2");
|
|
ccp.PTotal4 = r.PTotal4.ToString("n2");
|
|
ccp.PTotal5 = r.PTotal5.ToString("n2");
|
|
ccp.PTotal6 = r.PTotal6.ToString("n2");
|
|
ccp.AseguradoCIF = r.AseguradoCIF;
|
|
ccp.AseguradoNombre = r.AseguradoNombre;
|
|
ccp.AseguradoApellidos = r.AseguradoApellidos;
|
|
ccp.AseguradoDireccion = r.AseguradoDireccion;
|
|
ccp.AseguradoCodigoPostal = r.AseguradoCodigoPostal;
|
|
ccp.AseguradoTelefono1 = r.AseguradoTelefono1;
|
|
ccp.AseguradoTelefono2 = r.AseguradoTelefono2;
|
|
ccp.AseguradoCorreo = r.AseguradoCorreo;
|
|
ccp.Descripcion = r.Descripcion;
|
|
ccp.FechaEfecto = p.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = p.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
public static List<CombinacionCorrespondenciaRCMaquinariaAgricola> ObtieneCCRCMaquinariaAgricola(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRCMaquinariaAgricola> ListaCCP = new List<CombinacionCorrespondenciaRCMaquinariaAgricola>();
|
|
CombinacionCorrespondenciaRCMaquinariaAgricola ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaRCMaquinariaAgricola();
|
|
var r = p.RCMaquinariaAgricola;
|
|
if (r != null)
|
|
{
|
|
ccp.AseguradoCIF = r.AseguradoCIF;
|
|
ccp.AseguradoNombre = r.AseguradoNombre;
|
|
ccp.AseguradoApellidos = r.AseguradoApellidos;
|
|
ccp.AseguradoDireccion = r.AseguradoDireccion;
|
|
ccp.AseguradoCodigoPostal = r.AseguradoCodigoPostal;
|
|
ccp.AseguradoTelefono1 = r.AseguradoTelefono1;
|
|
ccp.AseguradoTelefono2 = r.AseguradoTelefono2;
|
|
ccp.AseguradoCorreo = r.AseguradoCorreo;
|
|
ccp.aseguradoPoblacion = r.AseguradoPoblacion;
|
|
ccp.FechaEfecto = p.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = p.FechaVencimiento.ToShortDateString();
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.Cobertura = r.Cobertura;
|
|
ccp.Elegida = r.Elegida;
|
|
ccp.PrimaTotal = r.PrimaTotal;
|
|
ccp.Matricula = r.Matricula;
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaCertificadoTractores> ObtieneCCCertificadoTractores(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaCertificadoTractores> ListaCCP = new List<CombinacionCorrespondenciaCertificadoTractores>();
|
|
CombinacionCorrespondenciaCertificadoTractores ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
DateOnly hoy = DateOnly.FromDateTime(DateTime.Now);
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaCertificadoTractores();
|
|
string fechaHoraEfecto = "";
|
|
if (p.FechaEfecto == hoy)
|
|
{
|
|
fechaHoraEfecto = p.FechaEfecto.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
|
|
}
|
|
else
|
|
{
|
|
fechaHoraEfecto = p.FechaEfecto.ToShortDateString() + " 00:00";
|
|
}
|
|
|
|
var myTI = new System.Globalization.CultureInfo("es-ES", false).TextInfo;
|
|
ccp.fechaCabecera = myTI.ToTitleCase(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(DateTime.Today.Month)) + " " + DateTime.Today.Year;
|
|
ccp.NumeroPoliza = p.NumeroPoliza;
|
|
ccp.Mediador = p.idAgenteNavigation.Nombre;
|
|
ccp.vehiculoAsegurado = (p.Tractores.Marca + " " + p.Tractores.Modelo + " " + p.Tractores.Version).Trim();
|
|
ccp.plazasAseguradas = "2";
|
|
ccp.matricula = p.Matricula;
|
|
ccp.tomadorDeLaPoliza = p.Tomador.RazonSocial;
|
|
ccp.propietarioDelVehiculo = p.Propietario.RazonSocial;
|
|
ccp.conductor = p.Conductor.RazonSocial;
|
|
ccp.diayHora = fechaHoraEfecto;
|
|
ccp.lugaryFecha = "Sevilla, " + DateTime.Today.ToLongDateString() + " " + DateTime.Now.ToLongTimeString();
|
|
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaCertificadoTractores> ObtieneCCCertificadoRemolques(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaCertificadoTractores> ListaCCP = new List<CombinacionCorrespondenciaCertificadoTractores>();
|
|
CombinacionCorrespondenciaCertificadoTractores ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaCertificadoTractores();
|
|
string fechaHoraEfecto = "";
|
|
DateOnly hoy = DateOnly.FromDateTime(DateTime.Now);
|
|
|
|
if (p.FechaEfecto == hoy)
|
|
{
|
|
fechaHoraEfecto = p.FechaEfecto.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
|
|
}
|
|
else
|
|
{
|
|
fechaHoraEfecto = p.FechaEfecto.ToShortDateString() + " 00:00";
|
|
}
|
|
|
|
var myTI = new System.Globalization.CultureInfo("es-ES", false).TextInfo;
|
|
ccp.fechaCabecera = myTI.ToTitleCase(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(DateTime.Today.Month)) + " " + DateTime.Today.Year;
|
|
ccp.NumeroPoliza = p.NumeroPoliza;
|
|
ccp.Mediador = p.idAgenteNavigation.Nombre;
|
|
ccp.vehiculoAsegurado = (p.Tractores.Marca + " " + p.Tractores.Modelo + " " + p.Tractores.Version).Trim();
|
|
ccp.plazasAseguradas = "0";
|
|
ccp.matricula = p.Matricula;
|
|
ccp.tomadorDeLaPoliza = p.Tomador.RazonSocial;
|
|
ccp.propietarioDelVehiculo = p.Propietario.RazonSocial;
|
|
ccp.conductor = p.Conductor.RazonSocial;
|
|
ccp.diayHora = fechaHoraEfecto;
|
|
ccp.lugaryFecha = "Sevilla, " + DateTime.Today.ToLongDateString() + " " + DateTime.Now.ToLongTimeString();
|
|
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaPresupuestoTractores> ObtieneCCPresupuestoTractores(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaPresupuestoTractores> ListaCCP = new List<CombinacionCorrespondenciaPresupuestoTractores>();
|
|
CombinacionCorrespondenciaPresupuestoTractores ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaPresupuestoTractores();
|
|
var r = p.Tractores;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorDocumento;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = (r.TomadorApellido1 + " " + r.TomadorApellido2).Trim();
|
|
ccp.TomadorTelefono = r.Telefono2;
|
|
ccp.TomadorDomicilio = (r.TomadorVia + " " + r.TomadorNombreVia + " " + r.TomadorNumeroVia + " " + r.TomadorRestoVia).Trim();
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.PropietarioCIF = r.PropietarioDocumento;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = (r.PropietarioApellido1 + " " + r.PropietarioApellido2).Trim();
|
|
ccp.ConductorCIF = r.ConductorDocumento;
|
|
ccp.ConductorNombre = r.ConductorNombre;
|
|
ccp.ConductorApellidos = (r.ConductorApellido1 + " " + r.ConductorApellido2).Trim();
|
|
ccp.ConductorFechaPermisoConducir = r.FechaPermisoConduccion.ToString();
|
|
|
|
ccp.Matricula = p.Matricula;
|
|
ccp.Marca = r.Marca;
|
|
ccp.Modelo = r.Modelo + " " + r.Version;
|
|
ccp.FechaMatriculacion = r.FechaPrimeraMatriculacion.ToString();
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.Peso = r.Peso.ToString();
|
|
ccp.FechaEfecto = r.FechaEfecto;
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaRCCotosCazaCaser> ObtieneCCRCCotosCazaCaser(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRCCotosCazaCaser> ListaCCP = new List<CombinacionCorrespondenciaRCCotosCazaCaser>();
|
|
CombinacionCorrespondenciaRCCotosCazaCaser ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaRCCotosCazaCaser();
|
|
var r = p.RCCotosCazaCaser;
|
|
if (r != null)
|
|
{
|
|
ccp.NumeroHectareas = r.NumeroHectareas.ToString();
|
|
ccp.OpcionA = r.OpcionA.ToString();
|
|
ccp.OpcionB = r.OpcionB.ToString();
|
|
ccp.OpcionC = r.OpcionC.ToString();
|
|
ccp.LimitePorSiniestro = r.LimitePorSiniestro;
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.PropietarioCIF = r.PropietarioCIF;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = r.PropietarioApellidos;
|
|
ccp.PropietarioTelefono = r.PropietarioTelefono;
|
|
ccp.PropietarioDomicilio = r.PropietarioDomicilio;
|
|
ccp.PropietarioCodigoPostal = r.PropietarioCodigoPostal;
|
|
ccp.PropietarioPoblacion = r.PropietarioPoblacion;
|
|
ccp.PropietarioProvincia = r.PropietarioProvincia;
|
|
ccp.RiesgoSituacion = r.RiesgoSituacion;
|
|
ccp.RiesgoCodigoPostal = r.RiesgoCodigoPostal;
|
|
ccp.RiesgoPoblacion = r.RiesgoPoblacion;
|
|
ccp.RiesgoProvincia = r.RiesgoProvincia;
|
|
ccp.RiesgoActividad = r.RiesgoActividad;
|
|
ccp.RiesgoEpigrafe = r.RiesgoEpigrafe;
|
|
ccp.RiesgoDescripcion = r.RiesgoDescripcion;
|
|
ccp.AclaracionesDeLaActividad = r.AclaracionesDeLaActividad;
|
|
ccp.Observaciones = r.Observaciones;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.OpcionElegida = r.OpcionElegida;
|
|
ccp.TotalOpcionElegida = r.TotalOpcionElegida;
|
|
if (!string.IsNullOrEmpty(r.IBAN) && r.IBAN.Length >= 22)
|
|
{
|
|
ccp.NumCuenta = r.IBAN.Substring(12, 10);
|
|
ccp.Entidad = r.IBAN.Substring(4, 4);
|
|
ccp.Oficina = r.IBAN.Substring(8, 4);
|
|
ccp.DC = r.IBAN.Substring(10, 2);
|
|
ccp.NombreEntidad = bd.bancos.FirstOrDefault(x => x.Codigo == r.IBAN.Substring(4, 4))?.Nombre;
|
|
}
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaTarificadorMaquinaria> ObtieneCCTarificadorMaquinaria(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaTarificadorMaquinaria> ListaCCP = new List<CombinacionCorrespondenciaTarificadorMaquinaria>();
|
|
CombinacionCorrespondenciaTarificadorMaquinaria ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaTarificadorMaquinaria();
|
|
var r = p.TarificadorMaquinaria;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.PropietarioCIF = r.PropietarioCIF;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = r.PropietarioApellidos;
|
|
ccp.PropietarioTelefono = r.PropietarioTelefono;
|
|
ccp.PropietarioEmail = r.PropietarioEmail;
|
|
ccp.PropietarioDomicilio = r.PropietarioDomicilio;
|
|
ccp.PropietarioCodigoPostal = r.PropietarioCodigoPostal;
|
|
ccp.PropietarioPoblacion = r.PropietarioPoblacion;
|
|
ccp.PropietarioProvincia = r.PropietarioProvincia;
|
|
ccp.PropietarioCodigoMunicipio = r.PropietarioCodigoMunicipio;
|
|
|
|
ccp.Matricula = r.Matricula;
|
|
ccp.UsoAlQueSeDestina = r.UsoAlQueSeDestina;
|
|
ccp.AntiguedadMaquinaria = r.AntiguedadMaquinaria.ToString();
|
|
ccp.NumeroMaquinasAseguradas = r.NumeroMaquinasAseguradas.ToString();
|
|
ccp.Cosechadoras = r.Cosechadoras.ToString();
|
|
ccp.CosechadorasRotura = r.CosechadorasRotura.ToString();
|
|
ccp.TractoresAgricolas = r.TractoresAgricolas.ToString();
|
|
ccp.Empacadoras = r.Empacadoras.ToString();
|
|
ccp.Vendimiadoras = r.Vendimiadoras.ToString();
|
|
ccp.NoAutoPropulsados = r.NoAutoPropulsados.ToString();
|
|
ccp.VibradoresOlivos = r.VibradoresOlivos.ToString();
|
|
ccp.CosechadorasCalculado = r.CosechadorasCalculado.ToString();
|
|
ccp.CosechadorasRoturaCalculado = r.CosechadorasRoturaCalculado.ToString();
|
|
ccp.TractoresAgricolasCalculado = r.TractoresAgricolasCalculado.ToString();
|
|
ccp.EmpacadorasCalculado = r.EmpacadorasCalculado.ToString();
|
|
ccp.VendimiadorasCalculado = r.VendimiadorasCalculado.ToString();
|
|
ccp.NoAutoPropulsadosCalculado = r.NoAutoPropulsadosCalculado.ToString();
|
|
ccp.VibradoresOlivosCalculado = r.VibradoresOlivosCalculado.ToString();
|
|
|
|
ccp.PrimaNetaMinima = r.PrimaNetaMinima.ToString();
|
|
ccp.PrimaNeta = r.PrimaNeta.ToString();
|
|
ccp.Impuestos = r.Impuestos.ToString();
|
|
ccp.PrimaTotal = r.PrimaTotal.ToString();
|
|
ccp.Condicionantes = r.Condicionantes;
|
|
ccp.Observaciones = r.Observaciones;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
ccp.DaniosLuna = r.DaniosLuna;
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
public static List<CombinacionCorrespondenciaRCPerros> ObtieneCCRCPerros(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRCPerros> ListaCCP = new List<CombinacionCorrespondenciaRCPerros>();
|
|
CombinacionCorrespondenciaRCPerros ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaRCPerros();
|
|
var r = p.RCPerros;
|
|
if (r != null)
|
|
{
|
|
var myTI = new System.Globalization.CultureInfo("es-ES", false).TextInfo;
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.PropietarioCIF = r.PropietarioCIF;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = r.PropietarioApellidos;
|
|
ccp.PropietarioTelefono = r.PropietarioTelefono;
|
|
ccp.PropietarioEmail = r.PropietarioEmail;
|
|
ccp.PropietarioDomicilio = r.PropietarioDomicilio;
|
|
ccp.PropietarioCodigoPostal = r.PropietarioCodigoPostal;
|
|
ccp.PropietarioPoblacion = r.PropietarioPoblacion;
|
|
ccp.PropietarioProvincia = r.PropietarioProvincia;
|
|
ccp.PropietarioCodigoMunicipio = r.PropietarioCodigoMunicipio;
|
|
|
|
ccp.CoberturaElegida = r.CoberturaElegida;
|
|
ccp.PrecioCobertura = r.PrecioCobertura;
|
|
ccp.NumeroPerrosPeligrosos = r.NumeroPerrosPeligrosos.ToString();
|
|
ccp.NumeroPerrosNoPeligrosos = r.NumeroPerrosNoPeligrosos.ToString();
|
|
ccp.PrimaPerroPeligrosos = r.PrimaPerrosPeligrosos.ToString("c2");
|
|
ccp.PrimaPerrosNoPeligrosos = r.PrimaPerrosNoPeligrosos.ToString("c2");
|
|
ccp.PrecioPerrosPeligrosos = r.PrecioPerrosPeligrosos.ToString("c2");
|
|
ccp.PrecioPerrosNoPeligrosos = r.PrecioPerrosNoPeligrosos.ToString("c2");
|
|
|
|
ccp.PrimeroRaza = r.PrimeroRaza;
|
|
ccp.PrimeroMicrochip = r.PrimeroMicrochip;
|
|
ccp.PrimeroNombre = r.PrimeroNombre;
|
|
ccp.PrimeroFechaNacimiento = (r.PrimeroFechaNacimiento.Year == 1) ? "" : r.PrimeroFechaNacimiento.ToShortDateString();
|
|
ccp.TipoPerro = r.TipoPerro;
|
|
|
|
if (r.TipoPerro == "Peligroso")
|
|
{
|
|
if (r.CoberturaElegida == "150000") ccp.Op1P = "x";
|
|
else if (r.CoberturaElegida == "180000") ccp.Op2P = "x";
|
|
else if (r.CoberturaElegida == "300000") ccp.Op3P = "x";
|
|
}
|
|
if (r.TipoPerro == "No Peligroso")
|
|
{
|
|
if (r.CoberturaElegida == "150000") ccp.Op1NP = "x";
|
|
else if (r.CoberturaElegida == "180000") ccp.Op2NP = "x";
|
|
else if (r.CoberturaElegida == "300000") ccp.Op3NP = "x";
|
|
}
|
|
|
|
ccp.Observaciones = r.Observaciones;
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaRCCaballos> ObtieneCCRCCaballos(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRCCaballos> ListaCCP = new List<CombinacionCorrespondenciaRCCaballos>();
|
|
CombinacionCorrespondenciaRCCaballos ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaRCCaballos();
|
|
var r = p.RCCaballos;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.DocumentacionEquina = r.DocumentacionEquina;
|
|
ccp.Observaciones = r.Observaciones;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaTransportesAXA> ObtieneCCTransportesAXA(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaTransportesAXA> ListaCCP = new List<CombinacionCorrespondenciaTransportesAXA>();
|
|
CombinacionCorrespondenciaTransportesAXA ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaTransportesAXA();
|
|
var r = p.TransportesAXA;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.MatriculaRemolque = r.MatriculaRemolque;
|
|
ccp.CalidadTomador = r.CalidadTomador;
|
|
ccp.MedioTransporte = r.MedioTransporte;
|
|
ccp.CapitalElegido = r.CapitalElegido;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaAccidentesIndividualesAXA> ObtieneCCAccidentesIndividualesAXA(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaAccidentesIndividualesAXA> ListaCCP = new List<CombinacionCorrespondenciaAccidentesIndividualesAXA>();
|
|
CombinacionCorrespondenciaAccidentesIndividualesAXA ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaAccidentesIndividualesAXA();
|
|
var r = p.AccidentesIndividualesAXA;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.PropietarioCIF = r.PropietarioCIF;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = r.PropietarioApellidos;
|
|
ccp.PropietarioTelefono = r.PropietarioTelefono;
|
|
ccp.PropietarioEmail = r.PropietarioEmail;
|
|
ccp.PropietarioDomicilio = r.PropietarioDomicilio;
|
|
ccp.PropietarioCodigoPostal = r.PropietarioCodigoPostal;
|
|
ccp.PropietarioPoblacion = r.PropietarioPoblacion;
|
|
ccp.PropietarioProvincia = r.PropietarioProvincia;
|
|
ccp.PropietarioCodigoMunicipio = r.PropietarioCodigoMunicipio;
|
|
|
|
ccp.Observaciones = r.Observaciones;
|
|
ccp.CapitalElegido = r.CapitalElegido;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaSaludMapfre> ObtieneCCSaludMapfre(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaSaludMapfre> ListaCCP = new List<CombinacionCorrespondenciaSaludMapfre>();
|
|
CombinacionCorrespondenciaSaludMapfre ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaSaludMapfre();
|
|
var r = p.SaludMapfre;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
ccp.TomadorFechaNacimiento = r.TomadorFechaNacimiento.ToString();
|
|
ccp.TomadorSexo = r.TomadorSexo;
|
|
ccp.TomadorEstadoCivil = r.TomadorEstadoCivil;
|
|
|
|
ccp.Asegurado1CIF = r.Asegurado1CIF;
|
|
ccp.Asegurado1Nombre = r.Asegurado1Nombre;
|
|
ccp.Asegurado1Apellidos = r.Asegurado1Apellidos;
|
|
ccp.Asegurado1Domicilio = r.Asegurado1Domicilio;
|
|
ccp.Asegurado1CodigoPostal = r.Asegurado1CodigoPostal;
|
|
ccp.Asegurado1Poblacion = r.Asegurado1Poblacion;
|
|
ccp.Asegurado1Provincia = r.Asegurado1Provincia;
|
|
ccp.Asegurado1CodigoMunicipio = r.Asegurado1CodigoMunicipio;
|
|
ccp.Asegurado1Telefono = r.Asegurado1Telefono;
|
|
ccp.Asegurado1Email = r.Asegurado1Email;
|
|
ccp.Asegurado1FechaNacimiento = r.Asegurado1FechaNacimiento.ToString();
|
|
ccp.Asegurado1Sexo = r.Asegurado1Sexo;
|
|
ccp.Asegurado1Peso = r.Asegurado1Peso.ToString();
|
|
ccp.Asegurado1Estatura = r.Asegurado1Estatura.ToString();
|
|
ccp.Asegurado1Profesion = r.Asegurado1Profesion;
|
|
ccp.Asegurado1Parentesco = r.Asegurado1Parentesco;
|
|
|
|
ccp.pregunta1Asegurado1 = r.Pregunta1Asegurado1 ? "SI" : "NO";
|
|
ccp.pregunta2Asegurado1 = r.Pregunta2Asegurado1 ? "SI" : "NO";
|
|
ccp.pregunta3Asegurado1 = r.Pregunta3Asegurado1 ? "SI" : "NO";
|
|
ccp.pregunta4Asegurado1 = r.Pregunta4Asegurado1 ? "SI" : "NO";
|
|
ccp.pregunta5Asegurado1 = r.Pregunta5Asegurado1 ? "SI" : "NO";
|
|
|
|
if (!string.IsNullOrEmpty(r.Asegurado2CIF))
|
|
{
|
|
ccp.Asegurado2CIF = r.Asegurado2CIF;
|
|
ccp.Asegurado2Nombre = r.Asegurado2Nombre;
|
|
ccp.Asegurado2Apellidos = r.Asegurado2Apellidos;
|
|
ccp.Asegurado2Domicilio = r.Asegurado2Domicilio;
|
|
ccp.Asegurado2CodigoPostal = r.Asegurado2CodigoPostal;
|
|
ccp.Asegurado2Poblacion = r.Asegurado2Poblacion;
|
|
ccp.Asegurado2Provincia = r.Asegurado2Provincia;
|
|
ccp.Asegurado2CodigoMunicipio = r.Asegurado2CodigoMunicipio;
|
|
ccp.Asegurado2Telefono = r.Asegurado2Telefono;
|
|
ccp.Asegurado2Email = r.Asegurado2Email;
|
|
ccp.Asegurado2FechaNacimiento = r.Asegurado2FechaNacimiento.ToString();
|
|
ccp.Asegurado2Sexo = r.Asegurado2Sexo;
|
|
ccp.Asegurado2Peso = r.Asegurado2Peso.ToString();
|
|
ccp.Asegurado2Estatura = r.Asegurado2Estatura.ToString();
|
|
ccp.Asegurado2Profesion = r.Asegurado2Profesion;
|
|
ccp.Asegurado2Parentesco = r.Asegurado2Parentesco;
|
|
|
|
ccp.pregunta1Asegurado2 = r.Pregunta1Asegurado2 ? "SI" : "NO";
|
|
ccp.pregunta2Asegurado2 = r.Pregunta2Asegurado2 ? "SI" : "NO";
|
|
ccp.pregunta3Asegurado2 = r.Pregunta3Asegurado2 ? "SI" : "NO";
|
|
ccp.pregunta4Asegurado2 = r.Pregunta4Asegurado2 ? "SI" : "NO";
|
|
ccp.pregunta5Asegurado2 = r.Pregunta5Asegurado2 ? "SI" : "NO";
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(r.Asegurado3CIF))
|
|
{
|
|
ccp.Asegurado3CIF = r.Asegurado3CIF;
|
|
ccp.Asegurado3Nombre = r.Asegurado3Nombre;
|
|
ccp.Asegurado3Apellidos = r.Asegurado3Apellidos;
|
|
ccp.Asegurado3Domicilio = r.Asegurado3Domicilio;
|
|
ccp.Asegurado3CodigoPostal = r.Asegurado3CodigoPostal;
|
|
ccp.Asegurado3Poblacion = r.Asegurado3Poblacion;
|
|
ccp.Asegurado3Provincia = r.Asegurado3Provincia;
|
|
ccp.Asegurado3CodigoMunicipio = r.Asegurado3CodigoMunicipio;
|
|
ccp.Asegurado3Telefono = r.Asegurado3Telefono;
|
|
ccp.Asegurado3Email = r.Asegurado3Email;
|
|
ccp.Asegurado3FechaNacimiento = r.Asegurado3FechaNacimiento.ToString();
|
|
ccp.Asegurado3Sexo = r.Asegurado3Sexo;
|
|
ccp.Asegurado3Peso = r.Asegurado3Peso.ToString();
|
|
ccp.Asegurado3Estatura = r.Asegurado3Estatura.ToString();
|
|
ccp.Asegurado3Profesion = r.Asegurado3Profesion;
|
|
ccp.Asegurado3Parentesco = r.Asegurado3Parentesco;
|
|
|
|
ccp.pregunta1Asegurado3 = r.Pregunta1Asegurado3 ? "SI" : "NO";
|
|
ccp.pregunta2Asegurado3 = r.Pregunta2Asegurado3 ? "SI" : "NO";
|
|
ccp.pregunta3Asegurado3 = r.Pregunta3Asegurado3 ? "SI" : "NO";
|
|
ccp.pregunta4Asegurado3 = r.Pregunta4Asegurado3 ? "SI" : "NO";
|
|
ccp.pregunta5Asegurado3 = r.Pregunta5Asegurado3 ? "SI" : "NO";
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(r.Asegurado4CIF))
|
|
{
|
|
ccp.Asegurado4CIF = r.Asegurado4CIF;
|
|
ccp.Asegurado4Nombre = r.Asegurado4Nombre;
|
|
ccp.Asegurado4Apellidos = r.Asegurado4Apellidos;
|
|
ccp.Asegurado4Domicilio = r.Asegurado4Domicilio;
|
|
ccp.Asegurado4CodigoPostal = r.Asegurado4CodigoPostal;
|
|
ccp.Asegurado4Poblacion = r.Asegurado4Poblacion;
|
|
ccp.Asegurado4Provincia = r.Asegurado4Provincia;
|
|
ccp.Asegurado4CodigoMunicipio = r.Asegurado4CodigoMunicipio;
|
|
ccp.Asegurado4Telefono = r.Asegurado4Telefono;
|
|
ccp.Asegurado4Email = r.Asegurado4Email;
|
|
ccp.Asegurado4FechaNacimiento = r.Asegurado4FechaNacimiento.ToString();
|
|
ccp.Asegurado4Sexo = r.Asegurado4Sexo.ToString();
|
|
ccp.Asegurado4Peso = r.Asegurado4Peso.ToString();
|
|
ccp.Asegurado4Estatura = r.Asegurado4Estatura;
|
|
ccp.Asegurado4Profesion = r.Asegurado4Profesion;
|
|
ccp.Asegurado4Parentesco = r.Asegurado4Parentesco;
|
|
|
|
ccp.pregunta1Asegurado4 = r.Pregunta1Asegurado4 ? "SI" : "NO";
|
|
ccp.pregunta2Asegurado4 = r.Pregunta2Asegurado4 ? "SI" : "NO";
|
|
ccp.pregunta3Asegurado4 = r.Pregunta3Asegurado4 ? "SI" : "NO";
|
|
ccp.pregunta4Asegurado4 = r.Pregunta4Asegurado4 ? "SI" : "NO";
|
|
ccp.pregunta5Asegurado4 = r.Pregunta5Asegurado4 ? "SI" : "NO";
|
|
}
|
|
|
|
ccp.Observaciones = r.Observaciones;
|
|
ccp.AsistenciaSanitaria = r.AsistenciaSanitaria ? "X" : "";
|
|
ccp.GarantiaBucodental = r.GarantiaBucodental ? "X" : "";
|
|
ccp.ReembolsoGastosCompletos = r.ReembolsoGastosCompletos ? "X" : "";
|
|
ccp.ReembolsoGastosHospitalarios = r.ReembolsoGastosHospitalarios ? "X" : "";
|
|
ccp.ReembolsoGranCobertura = r.ReembolsoGranCobertura ? "X" : "";
|
|
|
|
ccp.FormaPago = r.FormaPago;
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaCasetasRiegoAXA> ObtieneCCCasetasRiegoAxa(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaCasetasRiegoAXA> ListaCCP = new List<CombinacionCorrespondenciaCasetasRiegoAXA>();
|
|
CombinacionCorrespondenciaCasetasRiegoAXA ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaCasetasRiegoAXA();
|
|
var r = p.CasetasRiegoAXA;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorEmail = r.TomadorEmail;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.casetaUbicacion = r.CasetaUbicacion;
|
|
ccp.casetaLocalidad = r.CasetaLocalidad;
|
|
ccp.casetaCodigoPostal = r.CasetaCodigoPostal;
|
|
ccp.casetaProvincia = r.CasetaProvincia;
|
|
|
|
ccp.EdificiosDescripcion = r.EdificiosDescripcion;
|
|
ccp.EdificiosCapital = r.EdificiosCapital;
|
|
ccp.mobiliarioDescripcion = r.MobiliarioDescripcion;
|
|
ccp.mobiliarioCapital = r.MobiliarioCapital;
|
|
ccp.existenciasDescripcion = r.ExistenciasDescripcion;
|
|
ccp.existenciasCapital = r.ExistenciasCapital;
|
|
|
|
ccp.capitalElegido = r.CapitalElegido;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaRCSociosZurich> ObtieneCCPresupuestoRCSociosZurich(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaRCSociosZurich> ListaCCP = new List<CombinacionCorrespondenciaRCSociosZurich>();
|
|
CombinacionCorrespondenciaRCSociosZurich ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
DateOnly hoy = DateOnly.FromDateTime(DateTime.Now);
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaRCSociosZurich();
|
|
string fechaHoraEfecto = "";
|
|
if (p.FechaEfecto == hoy)
|
|
{
|
|
fechaHoraEfecto = p.FechaEfecto.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
|
|
}
|
|
else
|
|
{
|
|
fechaHoraEfecto = p.FechaEfecto.ToShortDateString() + " 00:00";
|
|
}
|
|
|
|
var r = p.RCSociosZurich;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = (r.TomadorApellidos ?? "").Trim();
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorDomicilio = (r.TomadorDomicilio ?? "").Trim();
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
|
|
ccp.TipoRC = r.TipoRC;
|
|
ccp.PrimaNetaA = r.PrimaNetaA.ToString();
|
|
ccp.PrimaNetaB = r.PrimaNetaB.ToString();
|
|
ccp.PrimaNetaC = r.PrimaNetaC.ToString();
|
|
ccp.ImpuestosA = r.ImpuestosA.ToString();
|
|
ccp.ImpuestosB = r.ImpuestosB.ToString();
|
|
ccp.ImpuestosC = r.ImpuestosC;
|
|
ccp.PrimaTotalA = r.PrimaTotalA.ToString();
|
|
ccp.PrimaTotalB = r.PrimaTotalB.ToString();
|
|
ccp.PrimaTotalC = r.PrimaTotalC.ToString();
|
|
|
|
ccp.PropietarioCIF = r.PropietarioCIF;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = r.PropietarioApellidos;
|
|
ccp.PropietarioTelefono = r.PropietarioTelefono;
|
|
ccp.propietarioCorreo = r.PropietarioEmail;
|
|
ccp.PropietarioDomicilio = r.PropietarioDomicilio;
|
|
ccp.PropietarioCodigoPostal = r.PropietarioCodigoPostal;
|
|
ccp.PropietarioPoblacion = r.PropietarioPoblacion;
|
|
ccp.PropietarioProvincia = r.PropietarioProvincia;
|
|
ccp.PropietarioCodigoMunicipio = r.PropietarioCodigoMunicipio;
|
|
|
|
ccp.Dehesa = r.Dehesa.ToString();
|
|
ccp.SuperficieCosechable = r.SuperficieCosechable.ToString();
|
|
ccp.CotoDeCaza = r.CotoDeCaza.ToString();
|
|
ccp.VidaPrivada = r.VidaPrivada.ToString();
|
|
ccp.CabezasVacuno = r.CabezasVacuno.ToString();
|
|
ccp.CabezasOvino = r.CabezasOvino.ToString();
|
|
ccp.CabezasPorcino = r.CabezasPorcino.ToString();
|
|
ccp.CabezasEquino = r.CabezasEquino.ToString();
|
|
ccp.CabezasGanadoBravo = r.CabezasGanadoBravo.ToString();
|
|
|
|
ccp.Observaciones = r.Observaciones;
|
|
ccp.NumeroRega = r.NumeroRega;
|
|
ccp.CodigoGanadero = r.CodigoGanadero;
|
|
ccp.SumaContratar = r.SumaContratar;
|
|
ccp.FormaPago = r.FormaPago;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaTractoresEuropAssistance> ObtieneCCTractoresEuropAssistance(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaTractoresEuropAssistance> ListaCCP = new List<CombinacionCorrespondenciaTractoresEuropAssistance>();
|
|
CombinacionCorrespondenciaTractoresEuropAssistance ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaTractoresEuropAssistance();
|
|
var r = p.TractoresEuropAssistance;
|
|
if (r != null)
|
|
{
|
|
ccp.Matricula = r.Matricula;
|
|
ccp.Marca = r.Marca;
|
|
ccp.Modelo = r.Modelo;
|
|
ccp.Version = r.Version;
|
|
ccp.FechaMatriculacion = r.FechaMatriculacion.ToString();
|
|
|
|
ccp.CIF = r.CIF;
|
|
ccp.RazonSocial = r.RazonSocial;
|
|
ccp.FechaNacimiento = r.FechaNacimiento.ToString();
|
|
ccp.EstadoCivil = r.EstadoCivil;
|
|
ccp.Sexo = r.Sexo;
|
|
ccp.Telefono1 = r.Telefono1;
|
|
ccp.Telefono2 = r.Telefono2;
|
|
ccp.Email = r.Email;
|
|
|
|
ccp.Direccion = r.Direccion;
|
|
ccp.CodigoPostal = r.CodigoPostal;
|
|
ccp.CodigoPoblacion = r.CodigoPoblacion;
|
|
ccp.Poblacion = r.Poblacion;
|
|
ccp.CodigoProvincia = r.CodigoProvincia;
|
|
ccp.Provincia = r.Provincia;
|
|
ccp.IBAN = r.IBAN;
|
|
|
|
ccp.FechaEfecto = r.FechaEfecto;
|
|
ccp.FechaVencimiento = r.FechaVencimiento;
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static List<CombinacionCorrespondenciaPatinetes> ObtieneCCPatinetes(List<polizassg> ListaPolizasG)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
List<CombinacionCorrespondenciaPatinetes> ListaCCP = new List<CombinacionCorrespondenciaPatinetes>();
|
|
CombinacionCorrespondenciaPatinetes ccp;
|
|
int i = 0;
|
|
int n = ListaPolizasG.Count;
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
|
|
foreach (var p in ListaPolizasG)
|
|
{
|
|
i++;
|
|
// DXSplashScreen.SetState($"Preparando informe ({i} de {n} registros)");
|
|
ccp = new CombinacionCorrespondenciaPatinetes();
|
|
var r = p.Patinetes;
|
|
if (r != null)
|
|
{
|
|
ccp.TomadorCIF = r.TomadorCIF;
|
|
ccp.TomadorNombre = r.TomadorNombre;
|
|
ccp.TomadorApellidos = r.TomadorApellidos;
|
|
ccp.TomadorTelefono = r.TomadorTelefono;
|
|
ccp.TomadorCorreo = r.TomadorCorreo;
|
|
ccp.TomadorDomicilio = r.TomadorDomicilio;
|
|
ccp.TomadorCodigoPostal = r.TomadorCodigoPostal;
|
|
ccp.tomadorPoblacion = r.TomadorPoblacion;
|
|
ccp.TomadorProvincia = r.TomadorProvincia;
|
|
ccp.TomadorCodigoMunicipio = r.TomadorCodigoMunicipio;
|
|
|
|
ccp.PropietarioCIF = r.PropietarioCIF;
|
|
ccp.PropietarioNombre = r.PropietarioNombre;
|
|
ccp.PropietarioApellidos = r.PropietarioApellidos;
|
|
ccp.PropietarioTelefono = r.PropietarioTelefono;
|
|
ccp.propietarioCorreo = r.PropietarioCorreo;
|
|
ccp.PropietarioDomicilio = r.PropietarioDomicilio;
|
|
ccp.PropietarioCodigoPostal = r.PropietarioCodigoPostal;
|
|
ccp.PropietarioPoblacion = r.PropietarioPoblacion;
|
|
ccp.PropietarioProvincia = r.PropietarioProvincia;
|
|
ccp.PropietarioCodigoMunicipio = r.PropietarioCodigoMunicipio;
|
|
|
|
ccp.Producto = r.Producto;
|
|
ccp.Identificador = r.Identificador;
|
|
ccp.FechaCompra = r.FechaCompra.ToString();
|
|
ccp.PrimaAnualizada = r.PrimaAnualizada.ToString();
|
|
ccp.Observaciones = r.Observaciones;
|
|
|
|
ccp.IBAN = r.IBAN;
|
|
ccp.FechaEfecto = r.FechaEfecto.ToShortDateString();
|
|
ccp.FechaVencimiento = r.FechaVencimiento.ToShortDateString();
|
|
}
|
|
ListaCCP.Add(ccp);
|
|
}
|
|
return ListaCCP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static System.IO.MemoryStream FusionaPlantillaConDatos(byte[] Plantilla, object Datos)
|
|
{
|
|
try
|
|
{
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
// DXSplashScreen.SetState("Fusionando datos ...");
|
|
using (RichEditDocumentServer rec = new RichEditDocumentServer())
|
|
{
|
|
rec.LoadDocument(new System.IO.MemoryStream(Plantilla), DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
|
|
DevExpress.XtraRichEdit.API.Native.MailMergeOptions mmo = rec.CreateMailMergeOptions();
|
|
mmo.DataSource = Datos;
|
|
mmo.MergeMode = DevExpress.XtraRichEdit.API.Native.MergeMode.NewSection;
|
|
rec.Options.MailMerge.DataSource = Datos;
|
|
System.IO.MemoryStream ms = new System.IO.MemoryStream();
|
|
rec.MailMerge(mmo, ms, DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
|
|
return ms;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static void ImprimePlantillaFusionada(byte[] Plantilla, object Datos, bool ImpresoraPredeterminada)
|
|
{
|
|
try
|
|
{
|
|
System.IO.MemoryStream ms = FusionaPlantillaConDatos(Plantilla, Datos);
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
// DXSplashScreen.SetState("Imprimiendo ...");
|
|
|
|
ms.Seek(0, System.IO.SeekOrigin.Begin);
|
|
|
|
DevExpress.XtraRichEdit.RichEditDocumentServer rec = new DevExpress.XtraRichEdit.RichEditDocumentServer();
|
|
rec.LoadDocument(ms, DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
|
|
// DXSplashScreen.Close();
|
|
|
|
if (ImpresoraPredeterminada)
|
|
{
|
|
rec.Print();
|
|
}
|
|
else
|
|
{
|
|
// rec.ShowPrintDialog(); // No soportado directamente en RichEditDocumentServer en .NET 8 sin dependencias de UI
|
|
throw new NotSupportedException("ShowPrintDialog no está disponible en bdAsegasa .NET 8.");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
|
|
public static byte[] FusionaPlantillaENPDF(byte[] Plantilla, object Datos)
|
|
{
|
|
try
|
|
{
|
|
System.IO.MemoryStream ms = FusionaPlantillaConDatos(Plantilla, Datos);
|
|
// DXSplashScreen.Show<tsWPF.SplashScreenTecnosis>();
|
|
// DXSplashScreen.SetState("Generando PDF ...");
|
|
ms.Seek(0, System.IO.SeekOrigin.Begin);
|
|
using (RichEditDocumentServer rec = new RichEditDocumentServer())
|
|
{
|
|
rec.LoadDocument(ms, DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
|
|
// DXSplashScreen.Close();
|
|
using (System.IO.MemoryStream mspdf = new System.IO.MemoryStream())
|
|
{
|
|
rec.ExportToPdf(mspdf);
|
|
return mspdf.ToArray();
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message, ex);
|
|
}
|
|
}
|
|
public static void ImprimePlantillaFusionada(tscgestionasegasa bd, string Plantilla, object Datos, bool ImpresoraPredeterminada)
|
|
{
|
|
var pl = bd.plantillas.Where(x => x.Codigo == Plantilla).FirstOrDefault();
|
|
if (pl != null)
|
|
{
|
|
ImprimePlantillaFusionada(pl.Plantilla, Datos, ImpresoraPredeterminada);
|
|
}
|
|
}
|
|
}
|
|
}
|