private void EstablecerConfiguracionModulo(AdscripcionBO adscripcion)
        {
            try
            {
                ConfiguracionModuloBO configuracion = null;
                int?ModuloIDEmpresas = this.vista.ModuloID;

                //RQM 14078, se añade el modulo en cero para que en la consulta pueda recuperar la información del identificador del modulo.
                if (lstAdscripciones != null)
                {
                    if (lstAdscripciones.Any())
                    {
                        ModuloIDEmpresas = 0;
                    }
                }


                if (this.vista.ModuloID == null)
                {
                    throw new Exception("No se encontró el identificador del módulo en la configuración del sistema");
                }

                if (adscripcion != null && adscripcion.UnidadOperativa != null && adscripcion.UnidadOperativa.Id != null)
                {
                    List <ModuloBO> lst = new ModuloBR().ConsultarCompleto(dataContext, new ModuloBO()
                    {
                        ModuloID = ModuloIDEmpresas
                    }, adscripcion.UnidadOperativa.Id.Value);
                    if (lst != null && lst.Count > 0)
                    {
                        configuracion       = lst[0].ObtenerConfiguracion(adscripcion.UnidadOperativa.Id.Value);
                        this.vista.ModuloID = lst[0].ModuloID;
                    }
                }

                this.vista.EstablecerConfiguracionModulo(configuracion);
            }
            catch (Exception ex)
            {
                throw new Exception("ConfiguracionAccesoPRE.EstablecerConfiguracionModulo: " + ex.Message);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Genera el reporte para el check list
        /// </summary>
        /// <param name="datos">Datos del check list</param>
        private void ImprimirReporte(Dictionary <string, object> datos)
        {
            try {
                #region Parte Generica
                #region Cabecera

                #region Logo
                var modulo            = (ModuloBO)datos["Modulo"];
                int?unidadOperativaID = (int)datos["UnidadOperativaID"];
                if (unidadOperativaID != null && modulo.ObtenerConfiguracion(unidadOperativaID.Value) != null)
                {
                    ConfiguracionModuloBO configuracion = modulo.ObtenerConfiguracion(unidadOperativaID.Value);
                    if (!string.IsNullOrEmpty(configuracion.URLLogoEmpresa) && !string.IsNullOrWhiteSpace(configuracion.URLLogoEmpresa))
                    {
                        this.picLogoEmpresa.ImageUrl = configuracion.URLLogoEmpresa;
                    }
                }
                #endregion

                #region Folio
                string folio = (string)datos["Folio"];
                lblNumeroContrato.Text = folio;
                #endregion

                #region Contrato
                var contrato = (ContratoPSLBO)datos["Contrato"];
                if (contrato != null)
                {
                    if (contrato.Sucursal != null)
                    {
                        if (contrato.Sucursal.DireccionesSucursal != null && contrato.Sucursal.DireccionesSucursal.Count > 0)
                        {
                            xrlDireccionEmpresa.Text = string.Format("{0} {1} {2} {3} CP. {4}", contrato.Sucursal.DireccionesSucursal[0].Calle, contrato.Sucursal.DireccionesSucursal[0].Colonia, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Municipio.Codigo, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Estado.Codigo, contrato.Sucursal.DireccionesSucursal[0].CodigoPostal);
                        }
                    }
                    lblUbicacion.Text = !string.IsNullOrEmpty(contrato.DestinoAreaOperacion) ? contrato.DestinoAreaOperacion : string.Empty;
                }
                #endregion

                #region Fecha
                lblFechaCreacion.Text = DateTime.Now.ToShortDateString();
                #endregion

                #region Unidad

                var unidad = (UnidadBO)datos["Unidad"];
                this.lblNumeroSerie.Text = unidad.NumeroSerie.ToString();
                this.lblModelo.Text      = unidad.Modelo.Nombre;
                this.lblAnio.Text        = unidad.Anio.ToString();
                this.lblItemEcode.Text   = unidad.NumeroEconomico.ToString();
                if (unidad.Modelo != null)
                {
                    if (unidad.Modelo.Marca != null)
                    {
                        this.lblMarca.Text = unidad.Modelo.Marca.Nombre.ToString();
                    }
                }

                var descripcion = string.Empty;
                if (unidad.TipoEquipoServicio != null)
                {
                    descripcion = unidad.TipoEquipoServicio.Nombre + " ";
                }
                if (unidad.Modelo != null)
                {
                    descripcion += unidad.Modelo.Nombre;
                }
                this.lblTipoUnidadModelo.Text = descripcion;


                #endregion

                #endregion

                #region Estatus contrato

                EEstatusContrato?estatus = null;
                if (datos.ContainsKey("EstatusContrato") && datos["EstatusContrato"] != null)
                {
                    estatus = (EEstatusContrato)datos["EstatusContrato"];
                }

                #endregion

                #region Cliente

                var cliente = (CuentaClienteIdealeaseBO)datos["Cliente"];
                this.lblClienteFacturacion.Text = cliente.Id.ToString();
                this.lblDireccion.Text          = cliente.Direccion;
                if (cliente.Cliente != null)
                {
                    this.lblCorreoClienteFacturacion.Text = cliente.Correo;
                    this.lblEmailEmpresaEntrega.Text      = cliente.Correo;
                    this.lblNombreCliente.Text            = cliente.Nombre.ToUpper();

                    if (cliente.Telefonos != null && cliente.Telefonos.Count > 0)
                    {
                        lblTelfonoClienteFacturacion.Text = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                        lblTelefonoEmpresaEntrega.Text    = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                    }
                }

                #endregion

                #region Datos entrega

                var entrega = (ListadoVerificacionVibroCompactadorBO)datos["Entrega"] ?? new ListadoVerificacionVibroCompactadorBO();

                #endregion

                #region Linea
                var linea = (LineaContratoPSLBO)datos["Linea"];
                if (linea != null)
                {
                    lblFolio.Text = !string.IsNullOrEmpty(linea.FolioCheckList) ? linea.FolioCheckList : string.Empty;
                }
                #endregion

                #region Kilómetros y horas
                this.lblKilometrajeEntrega.Text = entrega.Horometro.HasValue
                                                      ? entrega.Horometro.Value.ToString("#,##0")
                                                      : string.Empty;

                #endregion

                #region Capacidad
                this.lblTanqueCombustible.Text    = unidad == null || unidad.CombustibleConsumidoTotal == null ? "N/A" : unidad.CombustibleConsumidoTotal.ToString() + " L"; this.lblTanqueHidraulico.Text = "N/A";
                this.lblCarterMotor.Text          = "N/A";
                this.lblDepositoRefrigerante.Text = "N/A";
                #endregion

                #region Cuestionario Entrega

                #region Observaciones
                this.lblObservaciones.Text = !string.IsNullOrEmpty(entrega.Observaciones) ? entrega.Observaciones : string.Empty;
                #endregion


                #endregion

                #region Combustible

                this.lblCombustibleSalida.Text = entrega.Combustible.HasValue ? Convert.ToInt32(entrega.Combustible.Value).ToString("#,##0") + " L" : "N/A";

                #endregion

                #region Datos Recepción
                var recepcion = (ListadoVerificacionVibroCompactadorBO)datos["Recepcion"] ?? new ListadoVerificacionVibroCompactadorBO();

                #region Fecha recepción
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : string.Empty;
                #endregion

                #region Horómetro
                this.lblHorometroRetorno.Text = recepcion.Horometro.HasValue
                                                ? recepcion.Horometro.Value.ToString("#,##0")
                                                : string.Empty;
                #endregion



                #region Observaciones recepción
                this.xrObservacionesRecepcion.Text = !string.IsNullOrEmpty(recepcion.Observaciones) ? recepcion.Observaciones : string.Empty;
                #endregion

                #region Combustible
                this.lblCombustibleRetorno.Text = recepcion.Combustible.HasValue ? Convert.ToInt32(recepcion.Combustible.Value).ToString("#,##0") + " L" : string.Empty;

                #endregion
                #endregion

                #region Fecha y Hora salida
                this.lblFechaEntrega.Text   = contrato.FechaInicioArrendamiento.HasValue ? contrato.FechaInicioArrendamiento.Value.ToShortDateString() : string.Empty;
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : (contrato.FechaPromesaActual.HasValue ? contrato.FechaPromesaActual.Value.ToShortDateString() : string.Empty);
                #endregion
                #endregion

                #region Cuestionarios
                #region Cuestionario Entrega
                if (entrega.TieneAceiteHidraulico.HasValue)
                {
                    if (entrega.TieneAceiteHidraulico.Value)
                    {
                        chbxAceiteHidraulico.Checked = true;
                    }
                    else
                    {
                        chbxAceiteHidraulico.Checked = false;
                    }
                }

                if (entrega.TieneAceiteMotor.HasValue)
                {
                    if (entrega.TieneAceiteMotor.Value)
                    {
                        chbxAceiteMotor.Checked = true;
                    }
                    else
                    {
                        chbxAceiteMotor.Checked = false;
                    }
                }

                if (entrega.TieneAlarmaReversa.HasValue)
                {
                    if (entrega.TieneAlarmaReversa.Value)
                    {
                        chbxAlarmasReversa.Checked = true;
                    }
                    else
                    {
                        chbxAlarmasReversa.Checked = false;
                    }
                }

                if (entrega.TieneAntenaMonitoreo.HasValue)
                {
                    if (entrega.TieneAntenaMonitoreo.Value)
                    {
                        chbxAntenasMonitoreoSatelital.Checked = true;
                    }
                    else
                    {
                        chbxAntenasMonitoreoSatelital.Checked = false;
                    }
                }

                if (entrega.TieneBandaVentilador.HasValue)
                {
                    if (entrega.TieneBandaVentilador.Value)
                    {
                        chbxBandaVentilador.Checked = true;
                    }
                    else
                    {
                        chbxBandaVentilador.Checked = false;
                    }
                }

                if (entrega.TieneBateria.HasValue)
                {
                    if (entrega.TieneBateria.Value)
                    {
                        chbxBateria.Checked = true;
                    }
                    else
                    {
                        chbxBateria.Checked = false;
                    }
                }

                if (entrega.TieneCabinaOperador.HasValue)
                {
                    if (entrega.TieneCabinaOperador.Value)
                    {
                        chbxCabinaOperador.Checked = true;
                    }
                    else
                    {
                        chbxCabinaOperador.Checked = false;
                    }
                }

                if (entrega.TieneCajaReduccionEngranes.HasValue)
                {
                    if (entrega.TieneCajaReduccionEngranes.Value)
                    {
                        chbxCajaReduccionEngranes.Checked = true;
                    }
                    else
                    {
                        chbxCajaReduccionEngranes.Checked = false;
                    }
                }

                if (entrega.TieneCartuchoFiltroAire.HasValue)
                {
                    if (entrega.TieneCartuchoFiltroAire.Value)
                    {
                        chbxCartuchoFiltroAire.Checked = true;
                    }
                    else
                    {
                        chbxCartuchoFiltroAire.Checked = false;
                    }
                }

                if (entrega.TieneCinturonSeguridad.HasValue)
                {
                    if (entrega.TieneCinturonSeguridad.Value)
                    {
                        chbxCinturonSeguridad.Checked = true;
                    }
                    else
                    {
                        chbxCinturonSeguridad.Checked = false;
                    }
                }

                if (entrega.TieneCofreMotor.HasValue)
                {
                    if (entrega.TieneCofreMotor.Value)
                    {
                        chbxCofreMotor.Checked = true;
                    }
                    else
                    {
                        chbxCofreMotor.Checked = false;
                    }
                }

                if (entrega.TieneCombustible.HasValue)
                {
                    if (entrega.TieneCombustible.Value)
                    {
                        chbxCombustible.Checked = true;
                    }
                    else
                    {
                        chbxCombustible.Checked = false;
                    }
                }


                if (entrega.TieneCondicionAsiento.HasValue)
                {
                    if (entrega.TieneCondicionAsiento.Value)
                    {
                        chbxCondicionAsiento.Checked = true;
                    }
                    else
                    {
                        chbxCondicionAsiento.Checked = false;
                    }
                }

                if (entrega.TieneCondicionCalcas.HasValue)
                {
                    if (entrega.TieneCondicionCalcas.Value)
                    {
                        chbxCondicionCalcas.Checked = true;
                    }
                    else
                    {
                        chbxCondicionCalcas.Checked = false;
                    }
                }

                if (entrega.TieneCondicionLlantas.HasValue)
                {
                    if (entrega.TieneCondicionLlantas.Value)
                    {
                        chbxCondicionLlantas.Checked = true;
                    }
                    else
                    {
                        chbxCondicionLlantas.Checked = false;
                    }
                }
                if (entrega.TieneCondicionPintura.HasValue)
                {
                    if (entrega.TieneCondicionPintura.Value)
                    {
                        chbxCondicionPintura.Checked = true;
                    }
                    else
                    {
                        chbxCondicionPintura.Checked = false;
                    }
                }

                if (entrega.TieneEstructuraChasis.HasValue)
                {
                    if (entrega.TieneEstructuraChasis.Value)
                    {
                        chbxEstructuraChasis.Checked = true;
                    }
                    else
                    {
                        chbxEstructuraChasis.Checked = false;
                    }
                }

                if (entrega.TieneFrenoEstacionamiento.HasValue)
                {
                    if (entrega.TieneFrenoEstacionamiento.Value)
                    {
                        chbxFrenoEstacionamiento.Checked = true;
                    }
                    else
                    {
                        chbxFrenoEstacionamiento.Checked = false;
                    }
                }

                if (entrega.TieneIndicadores.HasValue)
                {
                    if (entrega.TieneIndicadores.Value)
                    {
                        chbxIndicadores.Checked = true;
                    }
                    else
                    {
                        chbxIndicadores.Checked = false;
                    }
                }

                if (entrega.TieneInterruptorDesconexion.HasValue)
                {
                    if (entrega.TieneInterruptorDesconexion.Value)
                    {
                        chbxInterruptorDesconexion.Checked = true;
                    }
                    else
                    {
                        chbxInterruptorDesconexion.Checked = false;
                    }
                }

                if (entrega.TieneLamparaTablero.HasValue)
                {
                    if (entrega.TieneLamparaTablero.Value)
                    {
                        chbxLamparasTablero.Checked = true;
                    }
                    else
                    {
                        chbxLamparasTablero.Checked = false;
                    }
                }

                if (entrega.TieneLiquidoRefrigerante.HasValue)
                {
                    if (entrega.TieneLiquidoRefrigerante.Value)
                    {
                        chbxLiquidoRefrigerante.Checked = true;
                    }
                    else
                    {
                        chbxLiquidoRefrigerante.Checked = false;
                    }
                }

                if (entrega.TieneLucesAdvertencia.HasValue)
                {
                    if (entrega.TieneLucesAdvertencia.Value)
                    {
                        chbxLucesAdvertencia.Checked = true;
                    }
                    else
                    {
                        chbxLucesAdvertencia.Checked = false;
                    }
                }

                if (entrega.TieneLucesTrabajoDelantera.HasValue)
                {
                    if (entrega.TieneLucesTrabajoDelantera.Value)
                    {
                        chbxLucesTrabajoDelantera.Checked = true;
                    }
                    else
                    {
                        chbxLucesTrabajoDelantera.Checked = false;
                    }
                }

                if (entrega.TieneLucesTrabajoTraseras.HasValue)
                {
                    if (entrega.TieneLucesTrabajoTraseras.Value)
                    {
                        chbxLucesTrabajoTraseras.Checked = true;
                    }
                    else
                    {
                        chbxLucesTrabajoTraseras.Checked = false;
                    }
                }

                if (entrega.TieneManguerasAbrazaderas.HasValue)
                {
                    if (entrega.TieneManguerasAbrazaderas.Value)
                    {
                        chbxManguerasAbrazaderasAdmisionAire.Checked = true;
                    }
                    else
                    {
                        chbxManguerasAbrazaderasAdmisionAire.Checked = false;
                    }
                }

                if (entrega.TienePalanca.HasValue)
                {
                    if (entrega.TienePalanca.Value)
                    {
                        chbxPalanca.Checked = true;
                    }
                    else
                    {
                        chbxPalanca.Checked = false;
                    }
                }

                if (entrega.TienePivoteArticulacionDireccion.HasValue)
                {
                    if (entrega.TienePivoteArticulacionDireccion.Value)
                    {
                        chbxPivotesArticulacionDireccion.Checked = true;
                    }
                    else
                    {
                        chbxPivotesArticulacionDireccion.Checked = false;
                    }
                }

                if (entrega.TienePresionLLantas.HasValue)
                {
                    if (entrega.TienePresionLLantas.Value)
                    {
                        chbxPresionLlantas.Checked = true;
                    }
                    else
                    {
                        chbxPresionLlantas.Checked = false;
                    }
                }

                if (entrega.TieneRascadoresTambor.HasValue)
                {
                    if (entrega.TieneRascadoresTambor.Value)
                    {
                        chbxRascadoresTambor.Checked = true;
                    }
                    else
                    {
                        chbxRascadoresTambor.Checked = false;
                    }
                }

                if (entrega.TieneReductorEngranes.HasValue)
                {
                    if (entrega.TieneReductorEngranes.Value)
                    {
                        chbxReductorEngranes.Checked = true;
                    }
                    else
                    {
                        chbxReductorEngranes.Checked = false;
                    }
                }

                if (entrega.TieneSimbolosSeguridad.HasValue)
                {
                    if (entrega.TieneSimbolosSeguridad.Value)
                    {
                        chbxSimbolosSeguridadMaquina.Checked = true;
                    }
                    else
                    {
                        chbxSimbolosSeguridadMaquina.Checked = false;
                    }
                }

                if (entrega.TieneSistemaVibracion.HasValue)
                {
                    if (entrega.TieneSistemaVibracion.Value)
                    {
                        chbxSistemaVibracion.Checked = true;
                    }
                    else
                    {
                        chbxSistemaVibracion.Checked = false;
                    }
                }

                if (entrega.TieneTacometro.HasValue)
                {
                    if (entrega.TieneTacometro.Value)
                    {
                        chbxTacometro.Checked = true;
                    }
                    else
                    {
                        chbxTacometro.Checked = false;
                    }
                }

                if (entrega.TieneTapaCombustible.HasValue)
                {
                    if (entrega.TieneTapaCombustible.Value)
                    {
                        chbxTapaCombustible.Checked = true;
                    }
                    else
                    {
                        chbxTapaCombustible.Checked = false;
                    }
                }

                if (entrega.TieneTapaHidraulico.HasValue)
                {
                    if (entrega.TieneTapaHidraulico.Value)
                    {
                        chbxTapaHidraulico.Checked = true;
                    }
                    else
                    {
                        chbxTapaHidraulico.Checked = false;
                    }
                }

                if (entrega.TieneVelocidadMaxima.HasValue)
                {
                    if (entrega.TieneVelocidadMaxima.Value)
                    {
                        chbxVelocidadMaximaMotor.Checked = true;
                    }
                    else
                    {
                        chbxVelocidadMaximaMotor.Checked = false;
                    }
                }

                if (entrega.TieneVelocidadMinima.HasValue)
                {
                    if (entrega.TieneVelocidadMinima.Value)
                    {
                        chbxVelocidadMinimaMotor.Checked = true;
                    }
                    else
                    {
                        chbxVelocidadMinimaMotor.Checked = false;
                    }
                }

                if (entrega.TieneVibrador.HasValue)
                {
                    if (entrega.TieneVibrador.Value)
                    {
                        chbxVibrador.Checked = true;
                    }
                    else
                    {
                        chbxVibrador.Checked = false;
                    }
                }
                #endregion
                #region Cuestionario Recepción
                if (recepcion.TieneAceiteHidraulico.HasValue)
                {
                    if (recepcion.TieneAceiteHidraulico.Value)
                    {
                        chbxAceiteHidraulicoRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxAceiteHidraulicoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAceiteMotor.HasValue)
                {
                    if (recepcion.TieneAceiteMotor.Value)
                    {
                        chbxAceiteMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxAceiteMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAlarmaReversa.HasValue)
                {
                    if (recepcion.TieneAlarmaReversa.Value)
                    {
                        chbxAlarmasReversaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxAlarmasReversaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAntenaMonitoreo.HasValue)
                {
                    if (recepcion.TieneAntenaMonitoreo.Value)
                    {
                        chbxAntenasMonitoreoSatelitalRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxAntenasMonitoreoSatelitalRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneBandaVentilador.HasValue)
                {
                    if (recepcion.TieneBandaVentilador.Value)
                    {
                        chbxBandaVentiladorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxBandaVentiladorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneBateria.HasValue)
                {
                    if (recepcion.TieneBateria.Value)
                    {
                        chbxBateriaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxBateriaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCabinaOperador.HasValue)
                {
                    if (recepcion.TieneCabinaOperador.Value)
                    {
                        chbxCabinaOperadorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCabinaOperadorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCajaReduccionEngranes.HasValue)
                {
                    if (recepcion.TieneCajaReduccionEngranes.Value)
                    {
                        chbxCajaReduccionEngranesRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCajaReduccionEngranesRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCartuchoFiltroAire.HasValue)
                {
                    if (recepcion.TieneCartuchoFiltroAire.Value)
                    {
                        chbxCartuchoFiltroAireRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCartuchoFiltroAireRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCinturonSeguridad.HasValue)
                {
                    if (recepcion.TieneCinturonSeguridad.Value)
                    {
                        chbxCinturonSeguridadRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCinturonSeguridadRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCofreMotor.HasValue)
                {
                    if (recepcion.TieneCofreMotor.Value)
                    {
                        chbxCofreMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCofreMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCombustible.HasValue)
                {
                    if (recepcion.TieneCombustible.Value)
                    {
                        chbxCombustibleRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCombustibleRecepcion.Checked = false;
                    }
                }


                if (recepcion.TieneCondicionAsiento.HasValue)
                {
                    if (recepcion.TieneCondicionAsiento.Value)
                    {
                        chbxCondicionAsientoRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionAsientoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionCalcas.HasValue)
                {
                    if (recepcion.TieneCondicionCalcas.Value)
                    {
                        chbxCondicionCalcasRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionCalcasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionLlantas.HasValue)
                {
                    if (recepcion.TieneCondicionLlantas.Value)
                    {
                        chbxCondicionLlantasRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionLlantasRecepcion.Checked = false;
                    }
                }
                if (recepcion.TieneCondicionPintura.HasValue)
                {
                    if (recepcion.TieneCondicionPintura.Value)
                    {
                        chbxCondicionPinturaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionPinturaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneEstructuraChasis.HasValue)
                {
                    if (recepcion.TieneEstructuraChasis.Value)
                    {
                        chbxEstructuraChasisRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxEstructuraChasisRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneFrenoEstacionamiento.HasValue)
                {
                    if (recepcion.TieneFrenoEstacionamiento.Value)
                    {
                        chbxFrenoEstacionamientoRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxFrenoEstacionamientoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneIndicadores.HasValue)
                {
                    if (recepcion.TieneIndicadores.Value)
                    {
                        chbxIndicadoresRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxIndicadoresRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneInterruptorDesconexion.HasValue)
                {
                    if (recepcion.TieneInterruptorDesconexion.Value)
                    {
                        chbxInterruptorDesconexionRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxInterruptorDesconexionRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLamparaTablero.HasValue)
                {
                    if (recepcion.TieneLamparaTablero.Value)
                    {
                        chbxLamparasTableroRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxLamparasTableroRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLiquidoRefrigerante.HasValue)
                {
                    if (recepcion.TieneLiquidoRefrigerante.Value)
                    {
                        chbxLiquidoRefrigeranteRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxLiquidoRefrigeranteRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLucesAdvertencia.HasValue)
                {
                    if (recepcion.TieneLucesAdvertencia.Value)
                    {
                        chbxLucesAdvertenciaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxLucesAdvertenciaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLucesTrabajoDelantera.HasValue)
                {
                    if (recepcion.TieneLucesTrabajoDelantera.Value)
                    {
                        chbxLucesTrabajoDelanteraRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxLucesTrabajoDelanteraRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLucesTrabajoTraseras.HasValue)
                {
                    if (recepcion.TieneLucesTrabajoTraseras.Value)
                    {
                        chbxLucesTrabajoTraserasRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxLucesTrabajoTraserasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneManguerasAbrazaderas.HasValue)
                {
                    if (recepcion.TieneManguerasAbrazaderas.Value)
                    {
                        chbxManguerasAbrazaderasAdmisionAireRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxManguerasAbrazaderasAdmisionAireRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePalanca.HasValue)
                {
                    if (recepcion.TienePalanca.Value)
                    {
                        chbxPalancaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxPalancaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePivoteArticulacionDireccion.HasValue)
                {
                    if (recepcion.TienePivoteArticulacionDireccion.Value)
                    {
                        chbxPivotesArticulacionDireccionRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxPivotesArticulacionDireccionRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePresionLLantas.HasValue)
                {
                    if (recepcion.TienePresionLLantas.Value)
                    {
                        chbxPresionLlantasRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxPresionLlantasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneRascadoresTambor.HasValue)
                {
                    if (recepcion.TieneRascadoresTambor.Value)
                    {
                        chbxRascadoresTamborRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxRascadoresTamborRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneReductorEngranes.HasValue)
                {
                    if (recepcion.TieneReductorEngranes.Value)
                    {
                        chbxReductorEngranesRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxReductorEngranesRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneSimbolosSeguridad.HasValue)
                {
                    if (recepcion.TieneSimbolosSeguridad.Value)
                    {
                        chbxSimbolosSeguridadMaquinaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxSimbolosSeguridadMaquinaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneSistemaVibracion.HasValue)
                {
                    if (recepcion.TieneSistemaVibracion.Value)
                    {
                        chbxSistemaVibracionRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxSistemaVibracionRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneTacometro.HasValue)
                {
                    if (recepcion.TieneTacometro.Value)
                    {
                        chbxTacometroRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxTacometroRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneTapaCombustible.HasValue)
                {
                    if (recepcion.TieneTapaCombustible.Value)
                    {
                        chbxTapaCombustibleRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxTapaCombustibleRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneTapaHidraulico.HasValue)
                {
                    if (recepcion.TieneTapaHidraulico.Value)
                    {
                        chbxTapaHidraulicoRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxTapaHidraulicoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneVelocidadMaxima.HasValue)
                {
                    if (recepcion.TieneVelocidadMaxima.Value)
                    {
                        chbxVelocidadMaximaMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxVelocidadMaximaMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneVelocidadMinima.HasValue)
                {
                    if (recepcion.TieneVelocidadMinima.Value)
                    {
                        chbxVelocidadMinimaMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxVelocidadMinimaMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneVibrador.HasValue)
                {
                    if (recepcion.TieneVibrador.Value)
                    {
                        chbxVibradorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxVibradorRecepcion.Checked = false;
                    }
                }
                #endregion
                #endregion
            } catch (Exception ex) {
                throw new Exception(".ImprimirReporte: Error al imprimir el reporte. " + ex.Message);
            }
        }
Exemplo n.º 3
0
        private void ImprimirReporte(Dictionary <string, object> datos)
        {
            try {
                #region Parte Generica
                #region Cabecera

                #region Logo
                var modulo            = (ModuloBO)datos["Modulo"];
                int?unidadOperativaID = (int)datos["UnidadOperativaID"];
                if (unidadOperativaID != null && modulo.ObtenerConfiguracion(unidadOperativaID.Value) != null)
                {
                    ConfiguracionModuloBO configuracion = modulo.ObtenerConfiguracion(unidadOperativaID.Value);
                    if (!string.IsNullOrEmpty(configuracion.URLLogoEmpresa) && !string.IsNullOrWhiteSpace(configuracion.URLLogoEmpresa))
                    {
                        this.picLogoEmpresa.ImageUrl = configuracion.URLLogoEmpresa;
                    }
                }
                #endregion

                #region Folio
                string folio = (string)datos["Folio"];
                lblNumeroContrato.Text = folio;
                #endregion

                #region Contrato
                var contrato = (ContratoPSLBO)datos["Contrato"];
                if (contrato != null)
                {
                    if (contrato.Sucursal != null)
                    {
                        if (contrato.Sucursal.DireccionesSucursal != null && contrato.Sucursal.DireccionesSucursal.Count > 0)
                        {
                            xrlDireccionEmpresa.Text = string.Format("{0} {1} {2} {3} CP. {4}", contrato.Sucursal.DireccionesSucursal[0].Calle, contrato.Sucursal.DireccionesSucursal[0].Colonia, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Municipio.Codigo, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Estado.Codigo, contrato.Sucursal.DireccionesSucursal[0].CodigoPostal);
                        }
                    }
                    lblUbicacion.Text = !string.IsNullOrEmpty(contrato.DestinoAreaOperacion) ? contrato.DestinoAreaOperacion : string.Empty;
                }
                #endregion

                #region Fecha
                lblFechaCreacion.Text = DateTime.Now.ToShortDateString();
                #endregion

                #region Unidad

                var unidad = (UnidadBO)datos["Unidad"];
                this.lblNumeroSerie.Text = unidad.NumeroSerie.ToString();
                this.lblModelo.Text      = unidad.Modelo.Nombre;
                this.lblAnio.Text        = unidad.Anio.ToString();
                this.lblItemEcode.Text   = unidad.NumeroEconomico.ToString();
                if (unidad.Modelo != null)
                {
                    if (unidad.Modelo.Marca != null)
                    {
                        this.lblMarca.Text = unidad.Modelo.Marca.Nombre.ToString();
                    }
                }

                var descripcion = string.Empty;
                if (unidad.TipoEquipoServicio != null)
                {
                    descripcion = unidad.TipoEquipoServicio.Nombre + " ";
                }
                if (unidad.Modelo != null)
                {
                    descripcion += unidad.Modelo.Nombre;
                }
                this.lblTipoUnidadModelo.Text = descripcion;


                #endregion

                #endregion

                #region Estatus contrato

                EEstatusContrato?estatus = null;
                if (datos.ContainsKey("EstatusContrato") && datos["EstatusContrato"] != null)
                {
                    estatus = (EEstatusContrato)datos["EstatusContrato"];
                }


                #endregion

                #region Cliente

                var cliente = (CuentaClienteIdealeaseBO)datos["Cliente"];
                this.lblClienteFacturacion.Text = cliente.Id.ToString();
                this.lblDireccion.Text          = cliente.Direccion;
                if (cliente.Cliente != null)
                {
                    this.lblCorreoClienteFacturacion.Text = cliente.Correo;
                    this.lblEmailEmpresaEntrega.Text      = cliente.Correo;
                    this.lblNombreCliente.Text            = cliente.Nombre.ToUpper();

                    if (cliente.Telefonos != null && cliente.Telefonos.Count > 0)
                    {
                        lblTelfonoClienteFacturacion.Text = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                        lblTelefonoEmpresaEntrega.Text    = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                    }
                }

                #endregion

                #region Datos entrega

                var entrega = (ListadoVerificacionSubArrendadoBO)datos["Entrega"] ?? new ListadoVerificacionSubArrendadoBO();

                #endregion

                #region Linea
                var linea = (LineaContratoPSLBO)datos["Linea"];
                if (linea != null)
                {
                    lblFolio.Text = !string.IsNullOrEmpty(linea.FolioCheckList) ? linea.FolioCheckList : string.Empty;
                }
                #endregion

                #region Kilómetros y horas
                this.lblKilometrajeEntrega.Text = entrega.Horometro.HasValue
                                                      ? entrega.Horometro.Value.ToString("#,##0")
                                                      : string.Empty;

                #endregion

                #region Capacidad
                this.lblTanqueCombustible.Text    = unidad == null || unidad.CombustibleConsumidoTotal == null ? "N/A" : unidad.CombustibleConsumidoTotal.ToString() + " L"; this.lblTanqueHidraulico.Text = "N/A";
                this.lblCarterMotor.Text          = "N/A";
                this.lblDepositoRefrigerante.Text = "N/A";
                #endregion

                #region Cuestionario Entrega

                #region Observaciones
                this.lblObservaciones.Text = !string.IsNullOrEmpty(entrega.Observaciones) ? entrega.Observaciones : string.Empty;
                #endregion


                #endregion

                #region Combustible

                this.lblCombustibleSalida.Text = entrega.Combustible.HasValue ? Convert.ToInt32(entrega.Combustible.Value).ToString("#,##0") + " L" : "N/A";

                #endregion

                #region Datos Recepción
                var recepcion = (ListadoVerificacionSubArrendadoBO)datos["Recepcion"] ?? new ListadoVerificacionSubArrendadoBO();

                #region Fecha recepción
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : string.Empty;
                #endregion

                #region Horómetro
                this.lblHorometroRetorno.Text = recepcion.Horometro.HasValue
                                                ? recepcion.Horometro.Value.ToString("#,##0")
                                                : string.Empty;
                #endregion



                #region Observaciones recepción
                this.xrObservacionesRecepcion.Text = !string.IsNullOrEmpty(recepcion.Observaciones) ? recepcion.Observaciones : string.Empty;
                #endregion

                #region Combustible
                this.lblCombustibleRetorno.Text = recepcion.Combustible.HasValue ? Convert.ToInt32(recepcion.Combustible.Value).ToString("#,##0") + " L" : string.Empty;

                #endregion
                #endregion

                #region Fecha y Hora salida
                this.lblFechaEntrega.Text   = contrato.FechaInicioArrendamiento.HasValue ? contrato.FechaInicioArrendamiento.Value.ToShortDateString() : string.Empty;
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : (contrato.FechaPromesaActual.HasValue ? contrato.FechaPromesaActual.Value.ToShortDateString() : string.Empty);
                #endregion
                #endregion

                #region Cuestionario entrega
                xrlNivelesFluidoE.Text       = entrega.TieneNivelesFluido.HasValue ? (entrega.TieneNivelesFluido.Value ? "OK" : "NO") : string.Empty;
                xrlTapaFluidosE.Text         = entrega.TieneTapaFluidos.HasValue ? (entrega.TieneTapaFluidos.Value ? "OK" : "NO") : string.Empty;
                xrlSistemaElectricoE.Text    = entrega.TieneSistemaElectrico.HasValue ? (entrega.TieneSistemaElectrico.Value ? "OK" : "NO") : string.Empty;
                xrlFarosTraserosE.Text       = entrega.TieneFarosTraseros.HasValue ? (entrega.TieneFarosTraseros.Value ? "OK" : "NO") : string.Empty;
                xrlFarosDelanterosE.Text     = entrega.TieneFarosDelanteros.HasValue ? (entrega.TieneFarosDelanteros.Value ? "OK" : "NO") : string.Empty;
                xrCuartosDireccionalesE.Text = entrega.TieneCuartosDireccionales.HasValue ? (entrega.TieneCuartosDireccionales.Value ? "OK" : "NO") : string.Empty;
                xrLimpiaparabrisasE.Text     = entrega.TieneLimpiaparabrisas.HasValue ? (entrega.TieneLimpiaparabrisas.Value ? "OK" : "NO") : string.Empty;
                xrBateriaE.Text                    = entrega.TieneBateria.HasValue ? (entrega.TieneBateria.Value ? "OK" : "NO") : string.Empty;
                xrChasisE.Text                     = entrega.TieneChasis.HasValue ? (entrega.TieneChasis.Value ? "OK" : "NO") : string.Empty;
                xrEstabilizadoresE.Text            = entrega.TieneEstabilizadores.HasValue ? (entrega.TieneEstabilizadores.Value ? "OK" : "NO") : string.Empty;
                xrZapataE.Text                     = entrega.TieneZapata.HasValue ? (entrega.TieneZapata.Value ? "OK" : "NO") : string.Empty;
                xrBoteTraseroE.Text                = entrega.TieneBoteTrasero.HasValue ? (entrega.TieneBoteTrasero.Value ? "OK" : "NO") : string.Empty;
                xrBoteDelanteroE.Text              = entrega.TieneBoteDelantero.HasValue ? (entrega.TieneBoteDelantero.Value ? "OK" : "NO") : string.Empty;
                xrBrazoPlumaE.Text                 = entrega.TieneBrazoPluma.HasValue ? (entrega.TieneBrazoPluma.Value ? "OK" : "NO") : string.Empty;
                xrContrapesoE.Text                 = entrega.TieneContrapeso.HasValue ? (entrega.TieneContrapeso.Value ? "OK" : "NO") : string.Empty;
                xrVastagosE.Text                   = entrega.TieneVastagos.HasValue ? (entrega.TieneVastagos.Value ? "OK" : "NO") : string.Empty;
                xrTensionCadenaE.Text              = entrega.TieneTensionCadena.HasValue ? (entrega.TieneTensionCadena.Value ? "OK" : "NO") : string.Empty;
                xrlNivelesFluidosE.Text            = entrega.TieneNivelesFluidos.HasValue ? (entrega.TieneNivelesFluidos.Value ? "OK" : "NO") : string.Empty;
                xrlSistemaRemolqueE.Text           = entrega.TieneSistemaRemolque.HasValue ? (entrega.TieneSistemaRemolque.Value ? "OK" : "NO") : string.Empty;
                xrlEnsambleRuedaE.Text             = entrega.TieneEnsamblajeRueda.HasValue ? (entrega.TieneEnsamblajeRueda.Value ? "OK" : "NO") : string.Empty;
                xrlEstructuraChasisE.Text          = entrega.TieneEstructuraChasis.HasValue ? (entrega.TieneEstructuraChasis.Value ? "OK" : "NO") : string.Empty;
                xrlPinturaE.Text                   = entrega.TienePintura.HasValue ? (entrega.TienePintura.Value ? "OK" : "NO") : string.Empty;
                xrlLlantasE.Text                   = entrega.TieneLlantas.HasValue ? (entrega.TieneLlantas.Value ? "OK" : "NO") : string.Empty;
                xrlSistemaVibratorioE.Text         = entrega.TieneSistemaVibratorio.HasValue ? (entrega.TieneSistemaVibratorio.Value ? "OK" : "NO") : string.Empty;
                xrlZapataRodilloE.Text             = entrega.TieneZapataRodillo.HasValue ? (entrega.TieneZapataRodillo.Value ? "OK" : "NO") : string.Empty;
                xrlAsientoOperadorE.Text           = entrega.TieneAsientoOperador.HasValue ? (entrega.TieneAsientoOperador.Value ? "OK" : "NO") : string.Empty;
                xrlEsperoRetrovisorE.Text          = entrega.TieneEspejoRetrovisor.HasValue ? (entrega.TieneEspejoRetrovisor.Value ? "OK" : "NO") : string.Empty;
                xrlPalancaControlE.Text            = entrega.TienePalancaControl.HasValue ? (entrega.TienePalancaControl.Value ? "OK" : "NO") : string.Empty;
                xrlTableroInstruentosE.Text        = entrega.TieneTableroInstrumentos.HasValue ? (entrega.TieneTableroInstrumentos.Value ? "OK" : "NO") : string.Empty;
                xrlMoldurasTolvasE.Text            = entrega.TieneMoldurasTolvas.HasValue ? (entrega.TieneMoldurasTolvas.Value ? "OK" : "NO") : string.Empty;
                xrlAireAcondicionadoE.Text         = entrega.TieneAireAcondicionado.HasValue ? (entrega.TieneAireAcondicionado.Value ? "OK" : "NO") : string.Empty;
                xrlCristalesLateralesE.Text        = entrega.TieneCristalesLaterales.HasValue ? (entrega.TieneCristalesLaterales.Value ? "OK" : "NO") : string.Empty;
                xrlPanoramicoE.Text                = entrega.TienePanoramico.HasValue ? (entrega.TienePanoramico.Value ? "OK" : "NO") : string.Empty;
                xrlPuertasCerradurasE.Text         = entrega.TienePuertasCerraduras.HasValue ? (entrega.TienePuertasCerraduras.Value ? "OK" : "NO") : string.Empty;
                xrlCofreMotorE.Text                = entrega.TieneCofreMotor.HasValue ? (entrega.TieneCofreMotor.Value ? "OK" : "NO") : string.Empty;
                xrlParrillaRadiadorE.Text          = entrega.TieneParrillaRadiador.HasValue ? (entrega.TieneParrillaRadiador.Value ? "OK" : "NO") : string.Empty;
                xrlAlarmaMovimientoE.Text          = entrega.TieneAlarmaMovimiento.HasValue ? (entrega.TieneAlarmaMovimiento.Value ? "OK" : "NO") : string.Empty;
                xrlEstereoE.Text                   = entrega.TieneEstereo.HasValue ? (entrega.TieneEstereo.Value ? "OK" : "NO") : string.Empty;
                xrlVentiladorElectricoE.Text       = entrega.TieneVentiladorElectrico.HasValue ? (entrega.TieneVentiladorElectrico.Value ? "OK" : "NO") : string.Empty;
                xrlIndicadoresInterruptoresE.Text  = entrega.TieneIndicadoresInterruptores.HasValue ? (entrega.TieneIndicadoresInterruptores.Value ? "OK" : "NO") : string.Empty;
                xrlPinturaEPE.Text                 = entrega.TienePinturaEP.HasValue ? (entrega.TienePinturaEP.Value ? "OK" : "NO") : string.Empty;
                xrlKitMartilloE.Text               = entrega.TieneKitMartillo.HasValue ? (entrega.TieneKitMartillo.Value ? "OK" : "NO") : string.Empty;
                xrlCentralEngraneE.Text            = entrega.TieneCentralEngrane.HasValue ? (entrega.TieneCentralEngrane.Value ? "OK" : "NO") : string.Empty;
                xrlAmperimetroE.Text               = entrega.TieneAmperimetro.HasValue ? (entrega.TieneAmperimetro.Value ? "OK" : "NO") : string.Empty;
                xrlVoltimetroE.Text                = entrega.TieneVoltimetro.HasValue ? (entrega.TieneVoltimetro.Value ? "OK" : "NO") : string.Empty;
                xrlHorometroE.Text                 = entrega.TieneHorometro.HasValue ? (entrega.TieneHorometro.Value ? "OK" : "NO") : string.Empty;
                xrlFrecuentometroE.Text            = entrega.TieneFrecuentometro.HasValue ? (entrega.TieneFrecuentometro.Value ? "OK" : "NO") : string.Empty;
                xrlInterruptorTermomagneticoE.Text = entrega.TieneInterruptorTermomagnetico.HasValue ? (entrega.TieneInterruptorTermomagnetico.Value ? "OK" : "NO") : string.Empty;
                xrlManometroPresionE.Text          = entrega.TieneManometroPresion.HasValue ? (entrega.TieneManometroPresion.Value ? "OK" : "NO") : string.Empty;
                xrlTipoVoltajeE.Text               = entrega.TieneTipoVoltaje.HasValue ? (entrega.TieneTipoVoltaje.Value ? "OK" : "NO") : string.Empty;
                xrlLamparasE.Text                  = entrega.TieneLamparas.HasValue ? (entrega.TieneLamparas.Value ? "OK" : "NO") : string.Empty;
                xrlFuncionamientoE.Text            = entrega.TieneFuncionamiento.HasValue ? (entrega.TieneFuncionamiento.Value ? "OK" : "NO") : string.Empty;
                #endregion

                #region Cuestionario recepción
                xrlNivelesFluidoR.Text       = recepcion.TieneNivelesFluido.HasValue ? (recepcion.TieneNivelesFluido.Value ? "OK" : "NO") : string.Empty;
                xrlTapaFluidosR.Text         = recepcion.TieneTapaFluidos.HasValue ? (recepcion.TieneTapaFluidos.Value ? "OK" : "NO") : string.Empty;
                xrlSistemaElectricoR.Text    = recepcion.TieneSistemaElectrico.HasValue ? (recepcion.TieneSistemaElectrico.Value ? "OK" : "NO") : string.Empty;
                xrlFarosTraserosR.Text       = recepcion.TieneFarosTraseros.HasValue ? (recepcion.TieneFarosTraseros.Value ? "OK" : "NO") : string.Empty;
                xrlFarosDelanterosR.Text     = recepcion.TieneFarosDelanteros.HasValue ? (recepcion.TieneFarosDelanteros.Value ? "OK" : "NO") : string.Empty;
                xrCuartosDireccionalesR.Text = recepcion.TieneCuartosDireccionales.HasValue ? (recepcion.TieneCuartosDireccionales.Value ? "OK" : "NO") : string.Empty;
                xrLimpiaparabrisasR.Text     = recepcion.TieneLimpiaparabrisas.HasValue ? (recepcion.TieneLimpiaparabrisas.Value ? "OK" : "NO") : string.Empty;
                xrBateriaR.Text                    = recepcion.TieneBateria.HasValue ? (recepcion.TieneBateria.Value ? "OK" : "NO") : string.Empty;
                xrChasisR.Text                     = recepcion.TieneChasis.HasValue ? (recepcion.TieneChasis.Value ? "OK" : "NO") : string.Empty;
                xrEstabilizadoresR.Text            = recepcion.TieneEstabilizadores.HasValue ? (recepcion.TieneEstabilizadores.Value ? "OK" : "NO") : string.Empty;
                xrZapataR.Text                     = recepcion.TieneZapata.HasValue ? (recepcion.TieneZapata.Value ? "OK" : "NO") : string.Empty;
                xrBoteTraseroR.Text                = recepcion.TieneBoteTrasero.HasValue ? (recepcion.TieneBoteTrasero.Value ? "OK" : "NO") : string.Empty;
                xrBoteDelanteroR.Text              = recepcion.TieneBoteDelantero.HasValue ? (recepcion.TieneBoteDelantero.Value ? "OK" : "NO") : string.Empty;
                xrBrazoPlumaR.Text                 = recepcion.TieneBrazoPluma.HasValue ? (recepcion.TieneBrazoPluma.Value ? "OK" : "NO") : string.Empty;
                xrContrapesoR.Text                 = recepcion.TieneContrapeso.HasValue ? (recepcion.TieneContrapeso.Value ? "OK" : "NO") : string.Empty;
                xrVastagosR.Text                   = recepcion.TieneVastagos.HasValue ? (recepcion.TieneVastagos.Value ? "OK" : "NO") : string.Empty;
                xrTensionCadenaR.Text              = recepcion.TieneTensionCadena.HasValue ? (recepcion.TieneTensionCadena.Value ? "OK" : "NO") : string.Empty;
                xrlNivelesFluidosR.Text            = recepcion.TieneNivelesFluidos.HasValue ? (recepcion.TieneNivelesFluidos.Value ? "OK" : "NO") : string.Empty;
                xrlSistemaRemolqueR.Text           = recepcion.TieneSistemaRemolque.HasValue ? (recepcion.TieneSistemaRemolque.Value ? "OK" : "NO") : string.Empty;
                xrlEnsambleRuedaR.Text             = recepcion.TieneEnsamblajeRueda.HasValue ? (recepcion.TieneEnsamblajeRueda.Value ? "OK" : "NO") : string.Empty;
                xrlEstructuraChasisR.Text          = recepcion.TieneEstructuraChasis.HasValue ? (recepcion.TieneEstructuraChasis.Value ? "OK" : "NO") : string.Empty;
                xrlPinturaR.Text                   = recepcion.TienePintura.HasValue ? (recepcion.TienePintura.Value ? "OK" : "NO") : string.Empty;
                xrlLlantasR.Text                   = recepcion.TieneLlantas.HasValue ? (recepcion.TieneLlantas.Value ? "OK" : "NO") : string.Empty;
                xrlSistemaVibratorioR.Text         = recepcion.TieneSistemaVibratorio.HasValue ? (recepcion.TieneSistemaVibratorio.Value ? "OK" : "NO") : string.Empty;
                xrlZapataRodilloR.Text             = recepcion.TieneZapataRodillo.HasValue ? (recepcion.TieneZapataRodillo.Value ? "OK" : "NO") : string.Empty;
                xrlAsientoOperadorR.Text           = recepcion.TieneAsientoOperador.HasValue ? (recepcion.TieneAsientoOperador.Value ? "OK" : "NO") : string.Empty;
                xrlEsperoRetrovisorR.Text          = recepcion.TieneEspejoRetrovisor.HasValue ? (recepcion.TieneEspejoRetrovisor.Value ? "OK" : "NO") : string.Empty;
                xrlPalancaControlR.Text            = recepcion.TienePalancaControl.HasValue ? (recepcion.TienePalancaControl.Value ? "OK" : "NO") : string.Empty;
                xrlTableroInstruentosR.Text        = recepcion.TieneTableroInstrumentos.HasValue ? (recepcion.TieneTableroInstrumentos.Value ? "OK" : "NO") : string.Empty;
                xrlMoldurasTolvasR.Text            = recepcion.TieneMoldurasTolvas.HasValue ? (recepcion.TieneMoldurasTolvas.Value ? "OK" : "NO") : string.Empty;
                xrlAireAcondicionadoR.Text         = recepcion.TieneAireAcondicionado.HasValue ? (recepcion.TieneAireAcondicionado.Value ? "OK" : "NO") : string.Empty;
                xrlCristalesLateralesR.Text        = recepcion.TieneCristalesLaterales.HasValue ? (recepcion.TieneCristalesLaterales.Value ? "OK" : "NO") : string.Empty;
                xrlPanoramicoR.Text                = recepcion.TienePanoramico.HasValue ? (recepcion.TienePanoramico.Value ? "OK" : "NO") : string.Empty;
                xrlPuertasCerradurasR.Text         = recepcion.TienePuertasCerraduras.HasValue ? (recepcion.TienePuertasCerraduras.Value ? "OK" : "NO") : string.Empty;
                xrlCofreMotorR.Text                = recepcion.TieneCofreMotor.HasValue ? (recepcion.TieneCofreMotor.Value ? "OK" : "NO") : string.Empty;
                xrlParrillaRadiadorR.Text          = recepcion.TieneParrillaRadiador.HasValue ? (recepcion.TieneParrillaRadiador.Value ? "OK" : "NO") : string.Empty;
                xrlAlarmaMovimientoR.Text          = recepcion.TieneAlarmaMovimiento.HasValue ? (recepcion.TieneAlarmaMovimiento.Value ? "OK" : "NO") : string.Empty;
                xrlEstereoR.Text                   = recepcion.TieneEstereo.HasValue ? (recepcion.TieneEstereo.Value ? "OK" : "NO") : string.Empty;
                xrlVentiladorElectricoR.Text       = recepcion.TieneVentiladorElectrico.HasValue ? (recepcion.TieneVentiladorElectrico.Value ? "OK" : "NO") : string.Empty;
                xrlIndicadoresInterruptoresR.Text  = recepcion.TieneIndicadoresInterruptores.HasValue ? (recepcion.TieneIndicadoresInterruptores.Value ? "OK" : "NO") : string.Empty;
                xrlPinturaEPR.Text                 = recepcion.TienePinturaEP.HasValue ? (recepcion.TienePinturaEP.Value ? "OK" : "NO") : string.Empty;
                xrlKitMartilloR.Text               = recepcion.TieneKitMartillo.HasValue ? (recepcion.TieneKitMartillo.Value ? "OK" : "NO") : string.Empty;
                xrlCentralEngraneR.Text            = recepcion.TieneCentralEngrane.HasValue ? (recepcion.TieneCentralEngrane.Value ? "OK" : "NO") : string.Empty;
                xrlAmperimetroR.Text               = recepcion.TieneAmperimetro.HasValue ? (recepcion.TieneAmperimetro.Value ? "OK" : "NO") : string.Empty;
                xrlVoltimetroR.Text                = recepcion.TieneVoltimetro.HasValue ? (recepcion.TieneVoltimetro.Value ? "OK" : "NO") : string.Empty;
                xrlHorometroR.Text                 = recepcion.TieneHorometro.HasValue ? (recepcion.TieneHorometro.Value ? "OK" : "NO") : string.Empty;
                xrlFrecuentometroR.Text            = recepcion.TieneFrecuentometro.HasValue ? (recepcion.TieneFrecuentometro.Value ? "OK" : "NO") : string.Empty;
                xrlInterruptorTermomagneticoR.Text = recepcion.TieneInterruptorTermomagnetico.HasValue ? (recepcion.TieneInterruptorTermomagnetico.Value ? "OK" : "NO") : string.Empty;
                xrlManometroPresionR.Text          = recepcion.TieneManometroPresion.HasValue ? (recepcion.TieneManometroPresion.Value ? "OK" : "NO") : string.Empty;
                xrlTipoVoltajeR.Text               = recepcion.TieneTipoVoltaje.HasValue ? (recepcion.TieneTipoVoltaje.Value ? "OK" : "NO") : string.Empty;
                xrlLamparasR.Text                  = recepcion.TieneLamparas.HasValue ? (recepcion.TieneLamparas.Value ? "OK" : "NO") : string.Empty;
                xrlFuncionamientoR.Text            = recepcion.TieneFuncionamiento.HasValue ? (recepcion.TieneFuncionamiento.Value ? "OK" : "NO") : string.Empty;
                #endregion

                xrlComentariosGenerales.Text  = !string.IsNullOrEmpty(entrega.ComentariosGenerales) ? entrega.ComentariosGenerales : string.Empty;
                xrlComentariosGeneralesR.Text = !string.IsNullOrEmpty(recepcion.ComentariosGenerales) ? recepcion.ComentariosGenerales : string.Empty;
            } catch (Exception ex) {
                throw new Exception(".ImprimirReporte: Error al imprimir el reporte. " + ex.Message);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Genera el reporte para el check list
        /// </summary>
        /// <param name="datos">Datos del check list</param>
        private void ImprimirReporte(Dictionary <string, object> datos)
        {
            try {
                #region Parte Generica
                #region Cabecera

                #region Logo
                var modulo            = (ModuloBO)datos["Modulo"];
                int?unidadOperativaID = (int)datos["UnidadOperativaID"];
                if (unidadOperativaID != null && modulo.ObtenerConfiguracion(unidadOperativaID.Value) != null)
                {
                    ConfiguracionModuloBO configuracion = modulo.ObtenerConfiguracion(unidadOperativaID.Value);
                    if (!string.IsNullOrEmpty(configuracion.URLLogoEmpresa) && !string.IsNullOrWhiteSpace(configuracion.URLLogoEmpresa))
                    {
                        this.picLogoEmpresa.ImageUrl = configuracion.URLLogoEmpresa;
                    }
                }
                #endregion

                #region Folio
                string folio = (string)datos["Folio"];
                lblNumeroContrato.Text = folio;
                #endregion

                #region Contrato
                var contrato = (ContratoPSLBO)datos["Contrato"];
                if (contrato != null)
                {
                    if (contrato.Sucursal != null)
                    {
                        if (contrato.Sucursal.DireccionesSucursal != null && contrato.Sucursal.DireccionesSucursal.Count > 0)
                        {
                            xrlDireccionEmpresa.Text = string.Format("{0} {1} {2} {3} CP. {4}", contrato.Sucursal.DireccionesSucursal[0].Calle, contrato.Sucursal.DireccionesSucursal[0].Colonia, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Municipio.Codigo, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Estado.Codigo, contrato.Sucursal.DireccionesSucursal[0].CodigoPostal);
                        }
                    }
                    lblUbicacion.Text = !string.IsNullOrEmpty(contrato.DestinoAreaOperacion) ? contrato.DestinoAreaOperacion : string.Empty;
                }
                #endregion

                #region Fecha
                lblFechaCreacion.Text = DateTime.Now.ToShortDateString();
                #endregion

                #region Unidad

                var unidad = (UnidadBO)datos["Unidad"];
                this.lblNumeroSerie.Text = unidad.NumeroSerie.ToString();
                this.lblModelo.Text      = unidad.Modelo.Nombre;
                this.lblAnio.Text        = unidad.Anio.ToString();
                this.lblItemEcode.Text   = unidad.NumeroEconomico.ToString();
                if (unidad.Modelo != null)
                {
                    if (unidad.Modelo.Marca != null)
                    {
                        this.lblMarca.Text = unidad.Modelo.Marca.Nombre.ToString();
                    }
                }

                var descripcion = string.Empty;
                if (unidad.TipoEquipoServicio != null)
                {
                    descripcion = unidad.TipoEquipoServicio.Nombre + " ";
                }
                if (unidad.Modelo != null)
                {
                    descripcion += unidad.Modelo.Nombre;
                }
                this.lblTipoUnidadModelo.Text = descripcion;


                #endregion

                #endregion

                #region Estatus contrato

                EEstatusContrato?estatus = null;
                if (datos.ContainsKey("EstatusContrato") && datos["EstatusContrato"] != null)
                {
                    estatus = (EEstatusContrato)datos["EstatusContrato"];
                }


                #endregion

                #region Cliente

                var cliente = (CuentaClienteIdealeaseBO)datos["Cliente"];
                this.lblClienteFacturacion.Text = cliente.Id.ToString();
                this.lblDireccion.Text          = cliente.Direccion;
                if (cliente.Cliente != null)
                {
                    this.lblCorreoClienteFacturacion.Text = cliente.Correo;
                    this.lblEmailEmpresaEntrega.Text      = cliente.Correo;
                    this.lblNombreCliente.Text            = cliente.Nombre.ToUpper();

                    if (cliente.Telefonos != null && cliente.Telefonos.Count > 0)
                    {
                        lblTelfonoClienteFacturacion.Text = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                        lblTelefonoEmpresaEntrega.Text    = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                    }
                }

                #endregion

                #region Datos entrega

                var entrega = (ListadoVerificacionPistolaNeumaticaBO)datos["Entrega"] ?? new ListadoVerificacionPistolaNeumaticaBO();

                #endregion

                #region Linea
                var linea = (LineaContratoPSLBO)datos["Linea"];
                if (linea != null)
                {
                    lblFolio.Text = !string.IsNullOrEmpty(linea.FolioCheckList) ? linea.FolioCheckList : string.Empty;
                }
                #endregion

                #region Kilómetros y horas
                this.lblKilometrajeEntrega.Text = entrega.Horometro.HasValue
                                                      ? entrega.Horometro.Value.ToString("#,##0")
                                                      : string.Empty;

                #endregion

                #region Capacidad
                this.lblTanqueCombustible.Text    = unidad == null || unidad.CombustibleConsumidoTotal == null ? "N/A" : unidad.CombustibleConsumidoTotal.ToString() + " L"; this.lblTanqueHidraulico.Text = "N/A";
                this.lblCarterMotor.Text          = "N/A";
                this.lblDepositoRefrigerante.Text = "N/A";
                #endregion

                #region Cuestionario Entrega

                #region Observaciones
                this.lblObservaciones.Text = !string.IsNullOrEmpty(entrega.Observaciones) ? entrega.Observaciones : string.Empty;
                #endregion


                #endregion

                #region Combustible

                this.lblCombustibleSalida.Text = entrega.Combustible.HasValue ? Convert.ToInt32(entrega.Combustible.Value).ToString("#,##0") + " L" : "N/A";

                #endregion

                #region Datos Recepción
                var recepcion = (ListadoVerificacionPistolaNeumaticaBO)datos["Recepcion"] ?? new ListadoVerificacionPistolaNeumaticaBO();

                #region Fecha recepción
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : string.Empty;
                #endregion

                #region Horómetro
                this.lblHorometroRetorno.Text = recepcion.Horometro.HasValue
                                                ? recepcion.Horometro.Value.ToString("#,##0")
                                                : string.Empty;
                #endregion



                #region Observaciones recepción
                this.xrObservacionesRecepcion.Text = !string.IsNullOrEmpty(recepcion.Observaciones) ? recepcion.Observaciones : string.Empty;
                #endregion

                #region Combustible
                this.lblCombustibleRetorno.Text = recepcion.Combustible.HasValue ? Convert.ToInt32(recepcion.Combustible.Value).ToString("#,##0") + " L" : string.Empty;

                #endregion
                #endregion

                #region Fecha y Hora salida
                this.lblFechaEntrega.Text   = contrato.FechaInicioArrendamiento.HasValue ? contrato.FechaInicioArrendamiento.Value.ToShortDateString() : string.Empty;
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : (contrato.FechaPromesaActual.HasValue ? contrato.FechaPromesaActual.Value.ToShortDateString() : string.Empty);
                #endregion
                #endregion
                #region Cuestionarios
                #region Cuestionario Entrada

                if (entrega.TieneCondicionBujes.HasValue)
                {
                    if (entrega.TieneCondicionBujes.Value)
                    {
                        chbxCondicionBujes.Checked = true;
                    }
                    else
                    {
                        chbxCondicionBujes.Checked = false;
                    }
                }

                if (entrega.TieneCondicionLubricador.HasValue)
                {
                    if (entrega.TieneCondicionLubricador.Value)
                    {
                        chbxCondicionLubricador.Checked = true;
                    }
                    else
                    {
                        chbxCondicionLubricador.Checked = false;
                    }
                }

                if (entrega.TieneCondicionMangueras.HasValue)
                {
                    if (entrega.TieneCondicionMangueras.Value)
                    {
                        chbxCondicionMangueras.Checked = true;
                    }
                    else
                    {
                        chbxCondicionMangueras.Checked = false;
                    }
                }

                if (entrega.TieneCondicionPica.HasValue)
                {
                    if (entrega.TieneCondicionPica.Value)
                    {
                        chbxCondicionPica.Checked = true;
                    }
                    else
                    {
                        chbxCondicionPica.Checked = false;
                    }
                }

                if (entrega.TieneCondicionPintura.HasValue)
                {
                    if (entrega.TieneCondicionPintura.Value)
                    {
                        chbxCondicionPintura.Checked = true;
                    }
                    else
                    {
                        chbxCondicionPintura.Checked = false;
                    }
                }

                if (entrega.TieneEstructura.HasValue)
                {
                    if (entrega.TieneEstructura.Value)
                    {
                        chbxEstructura.Checked = true;
                    }
                    else
                    {
                        chbxEstructura.Checked = false;
                    }
                }

                if (entrega.TieneAjustePresionCompresor.HasValue)
                {
                    if (entrega.TieneAjustePresionCompresor.Value)
                    {
                        chbxAjustePresionCompresor.Checked = true;
                    }
                    else
                    {
                        chbxAjustePresionCompresor.Checked = false;
                    }
                }

                if (entrega.TieneNivelAceiteLubricador.HasValue)
                {
                    if (entrega.TieneNivelAceiteLubricador.Value)
                    {
                        chbxNivelAceiteLubricador.Checked = true;
                    }
                    else
                    {
                        chbxNivelAceiteLubricador.Checked = false;
                    }
                }
                #endregion
                #region Cuestionario Recepción

                if (recepcion.TieneCondicionBujes.HasValue)
                {
                    if (recepcion.TieneCondicionBujes.Value)
                    {
                        chbxCondicionBujesRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionBujesRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionLubricador.HasValue)
                {
                    if (recepcion.TieneCondicionLubricador.Value)
                    {
                        chbxCondicionLubricadorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionLubricadorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionMangueras.HasValue)
                {
                    if (recepcion.TieneCondicionMangueras.Value)
                    {
                        chbxCondicionManguerasRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionManguerasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionPica.HasValue)
                {
                    if (recepcion.TieneCondicionPica.Value)
                    {
                        chbxCondicionPicaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionPicaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionPintura.HasValue)
                {
                    if (recepcion.TieneCondicionPintura.Value)
                    {
                        chbxCondicionPinturaRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxCondicionPinturaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneEstructura.HasValue)
                {
                    if (recepcion.TieneEstructura.Value)
                    {
                        chbxEstructuraRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxEstructuraRecepcion.Checked = false;
                    }
                }
                if (recepcion.TieneNivelAceiteLubricador.HasValue)
                {
                    if (recepcion.TieneNivelAceiteLubricador.Value)
                    {
                        chbxNivelAceiteLubricadorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxNivelAceiteLubricadorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAjustePresionCompresor.HasValue)
                {
                    if (recepcion.TieneAjustePresionCompresor.Value)
                    {
                        chbxAjustePresionCompresorRecepcion.Checked = true;
                    }
                    else
                    {
                        chbxAjustePresionCompresorRecepcion.Checked = false;
                    }
                }
                #endregion
                #endregion
            } catch (Exception ex) {
                throw new Exception(".ImprimirReporte: Error al imprimir el reporte. " + ex.Message);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Genera el reporte para el check list
        /// </summary>
        /// <param name="datos">Datos del check list</param>
        private void ImprimirReporte(Dictionary <string, object> datos)
        {
            try {
                #region Parte Generica
                #region Cabecera

                #region Logo
                var modulo            = (ModuloBO)datos["Modulo"];
                int?unidadOperativaID = (int)datos["UnidadOperativaID"];
                if (unidadOperativaID != null && modulo.ObtenerConfiguracion(unidadOperativaID.Value) != null)
                {
                    ConfiguracionModuloBO configuracion = modulo.ObtenerConfiguracion(unidadOperativaID.Value);
                    if (!string.IsNullOrEmpty(configuracion.URLLogoEmpresa) && !string.IsNullOrWhiteSpace(configuracion.URLLogoEmpresa))
                    {
                        this.picLogoEmpresa.ImageUrl = configuracion.URLLogoEmpresa;
                    }
                }
                #endregion

                #region Folio
                string folio = (string)datos["Folio"];
                lblNumeroContrato.Text = folio;
                #endregion

                #region Contrato
                var contrato = (ContratoPSLBO)datos["Contrato"];
                if (contrato != null)
                {
                    if (contrato.Sucursal != null)
                    {
                        if (contrato.Sucursal.DireccionesSucursal != null && contrato.Sucursal.DireccionesSucursal.Count > 0)
                        {
                            xrlDireccionEmpresa.Text = string.Format("{0} {1} {2} {3} CP. {4}", contrato.Sucursal.DireccionesSucursal[0].Calle, contrato.Sucursal.DireccionesSucursal[0].Colonia, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Municipio.Codigo, contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Estado.Codigo, contrato.Sucursal.DireccionesSucursal[0].CodigoPostal);
                        }
                    }
                    lblUbicacion.Text = !string.IsNullOrEmpty(contrato.DestinoAreaOperacion) ? contrato.DestinoAreaOperacion : string.Empty;
                }
                #endregion

                #region Fecha
                lblFechaCreacion.Text = DateTime.Now.ToShortDateString();
                #endregion

                #region Unidad

                var unidad = (UnidadBO)datos["Unidad"];
                this.lblNumeroSerie.Text = unidad.NumeroSerie.ToString();
                this.lblModelo.Text      = unidad.Modelo.Nombre;
                this.lblAnio.Text        = unidad.Anio.ToString();
                this.lblItemEcode.Text   = unidad.NumeroEconomico.ToString();
                if (unidad.Modelo != null)
                {
                    if (unidad.Modelo.Marca != null)
                    {
                        this.lblMarca.Text = unidad.Modelo.Marca.Nombre.ToString();
                    }
                }

                var descripcion = string.Empty;
                if (unidad.TipoEquipoServicio != null)
                {
                    descripcion = unidad.TipoEquipoServicio.Nombre + " ";
                }
                if (unidad.Modelo != null)
                {
                    descripcion += unidad.Modelo.Nombre;
                }
                this.lblTipoUnidadModelo.Text = descripcion;


                #endregion

                #endregion

                #region Estatus contrato

                EEstatusContrato?estatus = null;
                if (datos.ContainsKey("EstatusContrato") && datos["EstatusContrato"] != null)
                {
                    estatus = (EEstatusContrato)datos["EstatusContrato"];
                }
                #endregion

                #region Cliente

                var cliente = (CuentaClienteIdealeaseBO)datos["Cliente"];
                this.lblClienteFacturacion.Text = cliente.Id.ToString();
                this.lblDireccion.Text          = cliente.Direccion;
                if (cliente.Cliente != null)
                {
                    this.lblCorreoClienteFacturacion.Text = cliente.Correo;
                    this.lblEmailEmpresaEntrega.Text      = cliente.Correo;
                    this.lblNombreCliente.Text            = cliente.Nombre.ToUpper();

                    if (cliente.Telefonos != null && cliente.Telefonos.Count > 0)
                    {
                        lblTelfonoClienteFacturacion.Text = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                        lblTelefonoEmpresaEntrega.Text    = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                    }
                }

                #endregion

                #region Linea
                var linea = (LineaContratoPSLBO)datos["Linea"];
                if (linea != null)
                {
                    lblFolio.Text = !string.IsNullOrEmpty(linea.FolioCheckList) ? linea.FolioCheckList : string.Empty;
                }
                #endregion

                #region Datos entrega
                var entrega = (ListadoVerificacionExcavadoraBO)datos["Entrega"] ?? new ListadoVerificacionExcavadoraBO();
                #endregion

                #region Fecha y Horaentrega
                this.lblFechaEntrega.Text = contrato.FechaInicioArrendamiento.HasValue ? contrato.FechaInicioArrendamiento.Value.ToShortDateString() : string.Empty;
                #endregion

                #region Hórometro Entrega
                this.lblKilometrajeEntrega.Text = entrega.Horometro.HasValue
                                                      ? entrega.Horometro.Value.ToString("#,##0")
                                                      : string.Empty;
                #endregion

                #region Capacidad
                this.lblTanqueCombustible.Text    = unidad == null || unidad.CombustibleConsumidoTotal == null ? "N/A" : unidad.CombustibleConsumidoTotal.ToString() + " L"; this.lblTanqueHidraulico.Text = "N/A";
                this.lblCarterMotor.Text          = "N/A";
                this.lblDepositoRefrigerante.Text = "N/A";
                #endregion

                #region Observaciones
                this.lblObservaciones.Text = !string.IsNullOrEmpty(entrega.Observaciones) ? entrega.Observaciones : string.Empty;
                #endregion

                #region Combustible

                this.lblCombustibleSalida.Text = entrega.Combustible.HasValue ? Convert.ToInt32(entrega.Combustible.Value).ToString("#,##0") + " L" : "N/A";

                #endregion

                #region Datos Recepción
                var recepcion = (ListadoVerificacionExcavadoraBO)datos["Recepcion"] ?? new ListadoVerificacionExcavadoraBO();
                #endregion

                #region Fecha y Hora salida
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : (contrato.FechaPromesaActual.HasValue ? contrato.FechaPromesaActual.Value.ToShortDateString() : string.Empty);
                #endregion

                #region Horómetro Recepción
                this.lblHorometroRetorno.Text = recepcion.Horometro.HasValue
                                                ? recepcion.Horometro.Value.ToString("#,##0")
                                                : string.Empty;
                #endregion

                #region Observaciones recepción
                this.xrObservacionesRecepcion.Text = !string.IsNullOrEmpty(recepcion.Observaciones) ? recepcion.Observaciones : string.Empty;
                #endregion

                #region Combustible
                this.lblCombustibleRetorno.Text = recepcion.Combustible.HasValue ? Convert.ToInt32(recepcion.Combustible.Value).ToString("#,##0") + " L" : string.Empty;
                #endregion

                #endregion

                #region Cuestionarios
                #region Cuestionario Entrega

                #region Observaciones
                this.lblObservaciones.Text = !string.IsNullOrEmpty(entrega.Observaciones) ? entrega.Observaciones : string.Empty;
                #endregion

                if (entrega.TieneZapatas.HasValue)
                {
                    if (entrega.TieneZapatas.Value)
                    {
                        chkTieneZapatas.Checked = true;
                    }
                    else
                    {
                        chkTieneZapatas.Checked = false;
                    }
                }

                if (entrega.TieneZapatas.HasValue)
                {
                    if (entrega.TieneZapatas.Value)
                    {
                        chkTieneZapatas.Checked = true;
                    }
                    else
                    {
                        chkTieneZapatas.Checked = false;
                    }
                }

                if (entrega.TieneBrazoPluma.HasValue)
                {
                    if (entrega.TieneBrazoPluma.Value)
                    {
                        chkBrazoPluma.Checked = true;
                    }
                    else
                    {
                        chkBrazoPluma.Checked = false;
                    }
                }

                if (entrega.TieneContrapeso.HasValue)
                {
                    if (entrega.TieneContrapeso.Value)
                    {
                        chkContrapeso.Checked = true;
                    }
                    else
                    {
                        chkContrapeso.Checked = false;
                    }
                }

                if (entrega.TieneVastagosGatos.HasValue)
                {
                    if (entrega.TieneVastagosGatos.Value)
                    {
                        chkVastagos.Checked = true;
                    }
                    else
                    {
                        chkVastagos.Checked = false;
                    }
                }

                if (entrega.TieneTensionCadena.HasValue)
                {
                    if (entrega.TieneTensionCadena.Value)
                    {
                        chkTensionCadena.Checked = true;
                    }
                    else
                    {
                        chkTensionCadena.Checked = false;
                    }
                }

                if (entrega.TieneRodillosTransito.HasValue)
                {
                    if (entrega.TieneRodillosTransito.Value)
                    {
                        chkRodillosTransito.Checked = true;
                    }
                    else
                    {
                        chkTensionCadena.Checked = false;
                    }
                }

                if (entrega.TieneEspejosRetrovisores.HasValue)
                {
                    if (entrega.TieneEspejosRetrovisores.Value)
                    {
                        chkEspejosRetrovisores.Checked = true;
                    }
                    else
                    {
                        chkEspejosRetrovisores.Checked = false;
                    }
                }

                if (entrega.TieneCristalesCabina.HasValue)
                {
                    if (entrega.TieneCristalesCabina.Value)
                    {
                        chkCristalesCabina.Checked = true;
                    }
                    else
                    {
                        chkCristalesCabina.Checked = false;
                    }
                }

                if (entrega.TienePuertasCerraduras.HasValue)
                {
                    if (entrega.TienePuertasCerraduras.Value)
                    {
                        chkPuertasCerraduras.Checked = true;
                    }
                    else
                    {
                        chkPuertasCerraduras.Checked = false;
                    }
                }

                if (entrega.TieneBisagrasCofreMotor.HasValue)
                {
                    if (entrega.TieneBisagrasCofreMotor.Value)
                    {
                        chkBisagrasCofreMotor.Checked = true;
                    }
                    else
                    {
                        chkBisagrasCofreMotor.Checked = false;
                    }
                }

                if (entrega.TieneBalancinBote.HasValue)
                {
                    if (entrega.TieneBalancinBote.Value)
                    {
                        chkBalancinBote.Checked = true;
                    }
                    else
                    {
                        chkBalancinBote.Checked = false;
                    }
                }

                if (entrega.TieneCombustible.HasValue)
                {
                    if (entrega.TieneCombustible.Value)
                    {
                        chkCombustible.Checked = true;
                    }
                    else
                    {
                        chkCombustible.Checked = false;
                    }
                }

                if (entrega.TieneAceiteMotor.HasValue)
                {
                    if (entrega.TieneAceiteMotor.Value)
                    {
                        chkAceiteMotor.Checked = true;
                    }
                    else
                    {
                        chkAceiteMotor.Checked = false;
                    }
                }

                if (entrega.TieneAceiteHidraulico.HasValue)
                {
                    if (entrega.TieneAceiteHidraulico.Value)
                    {
                        chkAceiteHidraulico.Checked = true;
                    }
                    else
                    {
                        chkAceiteHidraulico.Checked = false;
                    }
                }

                if (entrega.TieneLiquidoRefrigerante.HasValue)
                {
                    if (entrega.TieneLiquidoRefrigerante.Value)
                    {
                        chkLiquidoRefrijerante.Checked = true;
                    }
                    else
                    {
                        chkLiquidoRefrijerante.Checked = false;
                    }
                }

                if (entrega.TieneReductorEngranesTransito.HasValue)
                {
                    if (entrega.TieneReductorEngranesTransito.Value)
                    {
                        chkReductorEngranesTransito.Checked = true;
                    }
                    else
                    {
                        chkReductorEngranesTransito.Checked = false;
                    }
                }

                if (entrega.TieneReductorSwing.HasValue)
                {
                    if (entrega.TieneReductorSwing.Value)
                    {
                        ckhReductorSwing.Checked = true;
                    }
                    else
                    {
                        ckhReductorSwing.Checked = false;
                    }
                }

                if (entrega.TieneBateria.HasValue)
                {
                    if (entrega.TieneBateria.Value)
                    {
                        chkBateria.Checked = true;
                    }
                    else
                    {
                        chkBateria.Checked = false;
                    }
                }

                if (entrega.TienePasadoresBoom.HasValue)
                {
                    if (entrega.TienePasadoresBoom.Value)
                    {
                        chkPasadoresBoom.Checked = true;
                    }
                    else
                    {
                        chkPasadoresBoom.Checked = false;
                    }
                }

                if (entrega.TienePasadoresBrazo.HasValue)
                {
                    if (entrega.TienePasadoresBrazo.Value)
                    {
                        chkPasadoresBrazo.Checked = true;
                    }
                    else
                    {
                        chkPasadoresBrazo.Checked = false;
                    }
                }

                if (entrega.TienePasadoresBote.HasValue)
                {
                    if (entrega.TienePasadoresBote.Value)
                    {
                        chkPasadoresBote.Checked = true;
                    }
                    else
                    {
                        chkPasadoresBote.Checked = false;
                    }
                }

                if (entrega.TieneTornameza.HasValue)
                {
                    if (entrega.TieneTornameza.Value)
                    {
                        chkTornamesa.Checked = true;
                    }
                    else
                    {
                        chkTornamesa.Checked = false;
                    }
                }

                if (entrega.TieneCentralEngrase.HasValue)
                {
                    if (entrega.TieneCentralEngrase.Value)
                    {
                        chkCentralEngrase.Checked = true;
                    }
                    else
                    {
                        chkCentralEngrase.Checked = false;
                    }
                }

                if (entrega.TieneLucesTrabajo.HasValue)
                {
                    if (entrega.TieneLucesTrabajo.Value)
                    {
                        chkLucesTrabajo.Checked = true;
                    }
                    else
                    {
                        chkLucesTrabajo.Checked = false;
                    }
                }

                if (entrega.TieneLamparasTablero.HasValue)
                {
                    if (entrega.TieneLamparasTablero.Value)
                    {
                        chkLamparasTablero.Checked = true;
                    }
                    else
                    {
                        chkLamparasTablero.Checked = false;
                    }
                }

                if (entrega.TieneInterruptorDesconexion.HasValue)
                {
                    if (entrega.TieneInterruptorDesconexion.Value)
                    {
                        chkInterruptorConexion.Checked = true;
                    }
                    else
                    {
                        chkInterruptorConexion.Checked = false;
                    }
                }

                if (entrega.TieneAlarmaReversa.HasValue)
                {
                    if (entrega.TieneAlarmaReversa.Value)
                    {
                        chkAlarmaReversa.Checked = true;
                    }
                    else
                    {
                        chkAlarmaReversa.Checked = false;
                    }
                }

                if (entrega.TieneHorometro.HasValue)
                {
                    if (entrega.TieneHorometro.Value)
                    {
                        chkHorometro.Checked = true;
                    }
                    else
                    {
                        chkHorometro.Checked = false;
                    }
                }

                if (entrega.TieneLimpiaparabrisas.HasValue)
                {
                    if (entrega.TieneLimpiaparabrisas.Value)
                    {
                        chkLimpiaparabrisas.Checked = true;
                    }
                    else
                    {
                        chkLimpiaparabrisas.Checked = false;
                    }
                }

                if (entrega.TieneJoystick.HasValue)
                {
                    if (entrega.TieneJoystick.Value)
                    {
                        chkJoysticks.Checked = true;
                    }
                    else
                    {
                        chkJoysticks.Checked = false;
                    }
                }

                if (entrega.TieneLucesAdvertencia.HasValue)
                {
                    if (entrega.TieneLucesAdvertencia.Value)
                    {
                        chkLucesAdvertencia.Checked = true;
                    }
                    else
                    {
                        chkLucesAdvertencia.Checked = false;
                    }
                }

                if (entrega.TieneIndicadores.HasValue)
                {
                    if (entrega.TieneIndicadores.Value)
                    {
                        chkIndicadores.Checked = true;
                    }
                    else
                    {
                        chkIndicadores.Checked = false;
                    }
                }

                if (entrega.TienePalancaBloqueoPilotaje.HasValue)
                {
                    if (entrega.TienePalancaBloqueoPilotaje.Value)
                    {
                        chkPalancaBloqueoPilotaje.Checked = true;
                    }
                    else
                    {
                        chkPalancaBloqueoPilotaje.Checked = false;
                    }
                }

                if (entrega.TieneAireAcondicionado.HasValue)
                {
                    if (entrega.TieneAireAcondicionado.Value)
                    {
                        chkAireAcondicionado.Checked = true;
                    }
                    else
                    {
                        chkAireAcondicionado.Checked = false;
                    }
                }

                if (entrega.TieneAutoaceleracion.HasValue)
                {
                    if (entrega.TieneAutoaceleracion.Value)
                    {
                        chkAutoaceleracion.Checked = true;
                    }
                    else
                    {
                        chkAutoaceleracion.Checked = false;
                    }
                }

                if (entrega.TieneVelocidadMinimaMotor.HasValue)
                {
                    if (entrega.TieneVelocidadMinimaMotor.Value)
                    {
                        chkVelocidadMinimaMotor.Checked = true;
                    }
                    else
                    {
                        chkVelocidadMinimaMotor.Checked = false;
                    }
                }

                if (entrega.TieneVelocidadMaximaMotor.HasValue)
                {
                    if (entrega.TieneVelocidadMaximaMotor.Value)
                    {
                        chkVelocidadMaximaMotor.Checked = true;
                    }
                    else
                    {
                        chkVelocidadMaximaMotor.Checked = false;
                    }
                }

                if (entrega.TieneTapaCombustible.HasValue)
                {
                    if (entrega.TieneTapaCombustible.Value)
                    {
                        chkTapaCombustible.Checked = true;
                    }
                    else
                    {
                        chkTapaCombustible.Checked = false;
                    }
                }

                if (entrega.TieneCondicionAsiento.HasValue)
                {
                    if (entrega.TieneCondicionAsiento.Value)
                    {
                        chkCondicionAsiento.Checked = true;
                    }
                    else
                    {
                        chkCondicionAsiento.Checked = false;
                    }
                }

                if (entrega.TieneCondicionPintura.HasValue)
                {
                    if (entrega.TieneCondicionPintura.Value)
                    {
                        chkCondicionPintura.Checked = true;
                    }
                    else
                    {
                        chkCondicionPintura.Checked = false;
                    }
                }

                if (entrega.TieneCondicionCalcas.HasValue)
                {
                    if (entrega.TieneCondicionCalcas.Value)
                    {
                        chkCondicionCalcas.Checked = true;
                    }
                    else
                    {
                        chkCondicionCalcas.Checked = false;
                    }
                }

                if (entrega.TieneSimboloSeguridadMaquina.HasValue)
                {
                    if (entrega.TieneSimboloSeguridadMaquina.Value)
                    {
                        chkSimboloSeguridadMaquina.Checked = true;
                    }
                    else
                    {
                        chkSimboloSeguridadMaquina.Checked = false;
                    }
                }

                if (entrega.TieneEstructuraChasis.HasValue)
                {
                    if (entrega.TieneEstructuraChasis.Value)
                    {
                        chkEstructuraChasis.Checked = true;
                    }
                    else
                    {
                        chkEstructuraChasis.Checked = false;
                    }
                }

                if (entrega.TieneAntenasMonitoreoSatelital.HasValue)
                {
                    if (entrega.TieneAntenasMonitoreoSatelital.Value)
                    {
                        chKAntenasMonitoreoSatelital.Checked = true;
                    }
                    else
                    {
                        chKAntenasMonitoreoSatelital.Checked = false;
                    }
                }

                #endregion
                #region Cuestionario Recepción

                if (recepcion.TieneZapatas.HasValue)
                {
                    if (recepcion.TieneZapatas.Value)
                    {
                        chkTieneZapatasRecepcion.Checked = true;
                    }
                    else
                    {
                        chkTieneZapatasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneBrazoPluma.HasValue)
                {
                    if (recepcion.TieneBrazoPluma.Value)
                    {
                        chkBrazoPlumaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkBrazoPlumaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneContrapeso.HasValue)
                {
                    if (recepcion.TieneContrapeso.Value)
                    {
                        chkContrapesoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkContrapesoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneVastagosGatos.HasValue)
                {
                    if (recepcion.TieneVastagosGatos.Value)
                    {
                        chkVastagosRecepcion.Checked = true;
                    }
                    else
                    {
                        chkVastagosRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneTensionCadena.HasValue)
                {
                    if (recepcion.TieneTensionCadena.Value)
                    {
                        chkTensionCadenaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkTensionCadenaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneRodillosTransito.HasValue)
                {
                    if (recepcion.TieneRodillosTransito.Value)
                    {
                        chkRodillosTransitoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkTensionCadenaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneEspejosRetrovisores.HasValue)
                {
                    if (recepcion.TieneEspejosRetrovisores.Value)
                    {
                        chkEspejosRetrovisoresRecepcion.Checked = true;
                    }
                    else
                    {
                        chkEspejosRetrovisoresRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCristalesCabina.HasValue)
                {
                    if (recepcion.TieneCristalesCabina.Value)
                    {
                        chkCristalesCabinaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkCristalesCabinaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePuertasCerraduras.HasValue)
                {
                    if (recepcion.TienePuertasCerraduras.Value)
                    {
                        chkPuertasCerradurasRecepcion.Checked = true;
                    }
                    else
                    {
                        chkPuertasCerradurasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneBisagrasCofreMotor.HasValue)
                {
                    if (recepcion.TieneBisagrasCofreMotor.Value)
                    {
                        chkBisagrasCofreMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chkBisagrasCofreMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneBalancinBote.HasValue)
                {
                    if (recepcion.TieneBalancinBote.Value)
                    {
                        chkBalancinBoteRecepcion.Checked = true;
                    }
                    else
                    {
                        chkBalancinBoteRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCombustible.HasValue)
                {
                    if (recepcion.TieneCombustible.Value)
                    {
                        chkTieneCombustibleRecepcion.Checked = true;
                    }
                    else
                    {
                        chkTieneCombustibleRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAceiteMotor.HasValue)
                {
                    if (recepcion.TieneAceiteMotor.Value)
                    {
                        chkAceiteMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chkAceiteMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAceiteHidraulico.HasValue)
                {
                    if (recepcion.TieneAceiteHidraulico.Value)
                    {
                        chkAceiteHidraulicoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkAceiteHidraulicoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLiquidoRefrigerante.HasValue)
                {
                    if (recepcion.TieneLiquidoRefrigerante.Value)
                    {
                        chkLiquidoRefrijeranteRecepcion.Checked = true;
                    }
                    else
                    {
                        chkLiquidoRefrijeranteRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneReductorEngranesTransito.HasValue)
                {
                    if (recepcion.TieneReductorEngranesTransito.Value)
                    {
                        chkReductorEngranesTransitoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkReductorEngranesTransitoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneReductorSwing.HasValue)
                {
                    if (recepcion.TieneReductorSwing.Value)
                    {
                        ckhReductorSwingRecepcion.Checked = true;
                    }
                    else
                    {
                        ckhReductorSwingRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneBateria.HasValue)
                {
                    if (recepcion.TieneBateria.Value)
                    {
                        chkBateriaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkBateriaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePasadoresBoom.HasValue)
                {
                    if (recepcion.TienePasadoresBoom.Value)
                    {
                        chkPasadoresBoomRecepcion.Checked = true;
                    }
                    else
                    {
                        chkPasadoresBoomRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePasadoresBrazo.HasValue)
                {
                    if (recepcion.TienePasadoresBrazo.Value)
                    {
                        chkPasadoresBrazoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkPasadoresBrazoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePasadoresBote.HasValue)
                {
                    if (recepcion.TienePasadoresBote.Value)
                    {
                        chkPasadoresBoteRecepcion.Checked = true;
                    }
                    else
                    {
                        chkPasadoresBoteRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneTornameza.HasValue)
                {
                    if (recepcion.TieneTornameza.Value)
                    {
                        chkTornamesaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkTornamesaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCentralEngrase.HasValue)
                {
                    if (recepcion.TieneCentralEngrase.Value)
                    {
                        chkCentralEngraseRecepcion.Checked = true;
                    }
                    else
                    {
                        chkCentralEngraseRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLucesTrabajo.HasValue)
                {
                    if (recepcion.TieneLucesTrabajo.Value)
                    {
                        chkLucesTrabajoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkLucesTrabajoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLamparasTablero.HasValue)
                {
                    if (recepcion.TieneLamparasTablero.Value)
                    {
                        chkLamparasTableroRecepcion.Checked = true;
                    }
                    else
                    {
                        chkLamparasTableroRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneInterruptorDesconexion.HasValue)
                {
                    if (recepcion.TieneInterruptorDesconexion.Value)
                    {
                        chkInterruptorConexionRecepcion.Checked = true;
                    }
                    else
                    {
                        chkInterruptorConexionRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAlarmaReversa.HasValue)
                {
                    if (recepcion.TieneAlarmaReversa.Value)
                    {
                        chkAlarmaReversaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkAlarmaReversaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneHorometro.HasValue)
                {
                    if (recepcion.TieneHorometro.Value)
                    {
                        chkHorometroRecepcion.Checked = true;
                    }
                    else
                    {
                        chkHorometroRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLimpiaparabrisas.HasValue)
                {
                    if (recepcion.TieneLimpiaparabrisas.Value)
                    {
                        chkLimpiaparabrisasRecepcion.Checked = true;
                    }
                    else
                    {
                        chkLimpiaparabrisasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneJoystick.HasValue)
                {
                    if (recepcion.TieneJoystick.Value)
                    {
                        chkJoysticksRecepcion.Checked = true;
                    }
                    else
                    {
                        chkJoysticksRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneLucesAdvertencia.HasValue)
                {
                    if (recepcion.TieneLucesAdvertencia.Value)
                    {
                        chkLucesAdvertenciaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkLucesAdvertenciaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneIndicadores.HasValue)
                {
                    if (recepcion.TieneIndicadores.Value)
                    {
                        chkIndicadoresRecepcion.Checked = true;
                    }
                    else
                    {
                        chkIndicadoresRecepcion.Checked = false;
                    }
                }

                if (recepcion.TienePalancaBloqueoPilotaje.HasValue)
                {
                    if (recepcion.TienePalancaBloqueoPilotaje.Value)
                    {
                        chkPalancaBloqueoPilotajeRecepcion.Checked = true;
                    }
                    else
                    {
                        chkPalancaBloqueoPilotajeRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAireAcondicionado.HasValue)
                {
                    if (recepcion.TieneAireAcondicionado.Value)
                    {
                        chkAireAcondicionadoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkAireAcondicionadoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAutoaceleracion.HasValue)
                {
                    if (recepcion.TieneAutoaceleracion.Value)
                    {
                        chkAutoaceleracionRecepcion.Checked = true;
                    }
                    else
                    {
                        chkAutoaceleracionRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneVelocidadMinimaMotor.HasValue)
                {
                    if (recepcion.TieneVelocidadMinimaMotor.Value)
                    {
                        chkVelocidadMinimaMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chkVelocidadMinimaMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneVelocidadMaximaMotor.HasValue)
                {
                    if (recepcion.TieneVelocidadMaximaMotor.Value)
                    {
                        chkVelocidadMaximaMotorRecepcion.Checked = true;
                    }
                    else
                    {
                        chkVelocidadMaximaMotorRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneTapaCombustible.HasValue)
                {
                    if (recepcion.TieneTapaCombustible.Value)
                    {
                        chkTapaCombustibleRecepcion.Checked = true;
                    }
                    else
                    {
                        chkTapaCombustibleRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionAsiento.HasValue)
                {
                    if (recepcion.TieneCondicionAsiento.Value)
                    {
                        chkCondicionAsientoRecepcion.Checked = true;
                    }
                    else
                    {
                        chkCondicionAsientoRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionPintura.HasValue)
                {
                    if (recepcion.TieneCondicionPintura.Value)
                    {
                        chkCondicionPinturaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkCondicionPinturaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneCondicionCalcas.HasValue)
                {
                    if (recepcion.TieneCondicionCalcas.Value)
                    {
                        chkCondicionCalcasRecepcion.Checked = true;
                    }
                    else
                    {
                        chkCondicionCalcasRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneSimboloSeguridadMaquina.HasValue)
                {
                    if (recepcion.TieneSimboloSeguridadMaquina.Value)
                    {
                        chkSimboloSeguridadMaquinaRecepcion.Checked = true;
                    }
                    else
                    {
                        chkSimboloSeguridadMaquinaRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneEstructuraChasis.HasValue)
                {
                    if (recepcion.TieneEstructuraChasis.Value)
                    {
                        chkEstructuraChasisRecepcion.Checked = true;
                    }
                    else
                    {
                        chkEstructuraChasisRecepcion.Checked = false;
                    }
                }

                if (recepcion.TieneAntenasMonitoreoSatelital.HasValue)
                {
                    if (recepcion.TieneAntenasMonitoreoSatelital.Value)
                    {
                        chKAntenasMonitoreoSatelitalRecepcion.Checked = true;
                    }
                    else
                    {
                        chKAntenasMonitoreoSatelitalRecepcion.Checked = false;
                    }
                }

                #endregion

                #endregion
            } catch (Exception ex) {
                throw new Exception(".ImprimirReporte: Error al imprimir el reporte. " + ex.Message);
            }
        }
        /// <summary>
        /// Genera el reporte para el check list
        /// </summary>
        /// <param name="datos">Datos del check list</param>
        private void ImprimirReporte(Dictionary <string, object> datos)
        {
            try {
                #region Parte Generica
                #region Cabecera

                #region Logo
                var modulo            = (ModuloBO)datos["Modulo"];
                int?unidadOperativaID = (int)datos["UnidadOperativaID"];
                if (unidadOperativaID != null && modulo.ObtenerConfiguracion(unidadOperativaID.Value) != null)
                {
                    ConfiguracionModuloBO configuracion = modulo.ObtenerConfiguracion(unidadOperativaID.Value);
                    if (!string.IsNullOrEmpty(configuracion.URLLogoEmpresa) && !string.IsNullOrWhiteSpace(configuracion.URLLogoEmpresa))
                    {
                        this.picLogoEmpresa.ImageUrl = configuracion.URLLogoEmpresa;
                    }
                }
                #endregion

                #region Folio
                string folio = (string)datos["Folio"];
                lblNumeroContrato.Text = folio;
                #endregion

                #region Contrato
                var contrato = (ContratoPSLBO)datos["Contrato"];
                if (contrato != null)
                {
                    if (contrato.Sucursal != null)
                    {
                        if (contrato.Sucursal.DireccionesSucursal != null && contrato.Sucursal.DireccionesSucursal.Count > 0)
                        {
                            xrlDireccionEmpresa.Text = string.Format("{0} {1} {2} {3} CP. {4}",
                                                                     contrato.Sucursal.DireccionesSucursal[0].Calle ?? string.Empty,
                                                                     contrato.Sucursal.DireccionesSucursal[0].Colonia ?? string.Empty,
                                                                     contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Municipio.Codigo ?? string.Empty,
                                                                     contrato.Sucursal.DireccionesSucursal[0].Ubicacion.Estado.Codigo ?? string.Empty,
                                                                     contrato.Sucursal.DireccionesSucursal[0].CodigoPostal ?? string.Empty
                                                                     ).ToUpper();
                        }
                    }

                    lblUbicacion.Text = !string.IsNullOrEmpty(contrato.DestinoAreaOperacion) ? contrato.DestinoAreaOperacion : string.Empty;
                }
                #endregion

                #region Fecha
                lblFechaCreacion.Text = DateTime.Now.ToShortDateString();
                #endregion

                #region Unidad

                var unidad = (UnidadBO)datos["Unidad"];
                this.lblNumeroSerie.Text = unidad.NumeroSerie.ToString();
                this.lblModelo.Text      = unidad.Modelo.Nombre;
                this.lblAnio.Text        = unidad.Anio.ToString();
                this.lblItemEcode.Text   = unidad.NumeroEconomico.ToString();
                if (unidad.Modelo != null)
                {
                    if (unidad.Modelo.Marca != null)
                    {
                        this.lblMarca.Text = unidad.Modelo.Marca.Nombre.ToString();
                    }
                }

                var descripcion = string.Empty;
                //if (unidad.TipoEquipoServicio != null)
                //    descripcion = unidad.TipoEquipoServicio.Nombre + " ";
                if (unidad.Modelo != null)
                {
                    descripcion += unidad.Modelo.Nombre;
                }
                this.lblTipoUnidadModelo.Text = descripcion;


                #endregion

                #endregion

                #region Estatus contrato

                EEstatusContrato?estatus = null;
                if (datos.ContainsKey("EstatusContrato") && datos["EstatusContrato"] != null)
                {
                    estatus = (EEstatusContrato)datos["EstatusContrato"];
                }


                #endregion

                #region Cliente

                var cliente = (CuentaClienteIdealeaseBO)datos["Cliente"];
                this.lblClienteFacturacion.Text = cliente.Id.ToString();
                this.lblDireccion.Text          = cliente.Direccion;
                if (cliente.Cliente != null)
                {
                    this.lblCorreoClienteFacturacion.Text = cliente.Correo;
                    this.lblEmailEmpresaEntrega.Text      = cliente.Correo;
                    this.lblNombreCliente.Text            = cliente.Nombre.ToUpper();

                    if (cliente.Telefonos != null && cliente.Telefonos.Count > 0)
                    {
                        lblTelfonoClienteFacturacion.Text = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                        lblTelefonoEmpresaEntrega.Text    = !string.IsNullOrEmpty(cliente.Telefonos[0].Telefono) ? cliente.Telefonos[0].Telefono : string.Empty;
                    }
                }

                #endregion

                #region Datos entrega

                var entrega = (ListadoVerificacionEntregaRecepcionBO)datos["Entrega"] ?? new ListadoVerificacionEntregaRecepcionBO();

                #endregion

                #region Linea
                var linea = (LineaContratoPSLBO)datos["Linea"];
                if (linea != null)
                {
                    lblFolio.Text = !string.IsNullOrEmpty(linea.FolioCheckList) ? linea.FolioCheckList : string.Empty;
                }
                #endregion

                #region Kilómetros y horas
                this.lblKilometrajeEntrega.Text = entrega.Horometro.HasValue
                                                      ? entrega.Horometro.Value.ToString("#,##0")
                                                      : string.Empty;

                #endregion

                #region Capacidad
                this.lblTanqueCombustible.Text = unidad == null || unidad.CombustibleConsumidoTotal == null ? "N/A" : unidad.CombustibleConsumidoTotal.ToString() + " L";
                #endregion

                #region Cuestionario Entrega

                #region Observaciones
                this.lblObservacionesEntrega.Text = !string.IsNullOrEmpty(entrega.Observaciones) ? entrega.Observaciones : string.Empty;
                #endregion

                #endregion

                #region Combustible

                this.lblCombustibleSalida.Text = entrega.Combustible.HasValue ? Convert.ToInt32(entrega.Combustible.Value).ToString("#,##0") + " L" : "N/A";

                #endregion

                #region Datos Recepción
                var recepcion = (ListadoVerificacionEntregaRecepcionBO)datos["Recepcion"] ?? new ListadoVerificacionEntregaRecepcionBO();

                #region Fecha recepción
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : string.Empty;
                #endregion

                #region Horómetro
                this.lblHorometroRetorno.Text = recepcion.Horometro.HasValue
                                                ? recepcion.Horometro.Value.ToString("#,##0")
                                                : string.Empty;
                #endregion

                #region Observaciones recepción
                this.lblObservacionesRecepcion.Text = !string.IsNullOrEmpty(recepcion.Observaciones) ? recepcion.Observaciones : string.Empty;
                #endregion

                #region Combustible
                this.lblCombustibleRetorno.Text = recepcion.Combustible.HasValue ? Convert.ToInt32(recepcion.Combustible.Value).ToString("#,##0") + " L" : string.Empty;

                #endregion
                #endregion

                #region Fecha y Hora salida
                this.lblFechaEntrega.Text   = contrato.FechaInicioArrendamiento.HasValue ? contrato.FechaInicioArrendamiento.Value.ToShortDateString() : string.Empty;
                this.lblFechaRecepcion.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : (contrato.FechaPromesaActual.HasValue ? contrato.FechaPromesaActual.Value.ToShortDateString() : string.Empty);
                #endregion
                #endregion

                #region entrega

                xrlBandasE.Text            = entrega.TieneBandas.HasValue ? (entrega.TieneBandas.Value ? "SI" : "NO") : "";
                xrlFiltroAceiteE.Text      = entrega.TieneFiltroAceite.HasValue ? (entrega.TieneFiltroAceite.Value ? "SI" : "NO") : "";
                xrlFiltroAguaE.Text        = entrega.TieneFiltroAgua.HasValue ? (entrega.TieneFiltroAgua.Value ? "SI" : "NO") : "";
                xrlFiltroCombustibleE.Text = entrega.TieneFiltroCombustible.HasValue ? (entrega.TieneFiltroCombustible.Value ? "SI" : "NO") : "";
                xrlFiltroAireE.Text        = entrega.TieneFiltroAire.HasValue ? (entrega.TieneFiltroAire.Value ? "SI" : "NO") : "";
                xrlManguerasE.Text         = entrega.TieneMangueras.HasValue ? (entrega.TieneMangueras.Value ? "SI" : "NO") : "";

                xrlAmperimetroE.Text = entrega.TieneAmperimetro.HasValue ? (entrega.TieneAmperimetro.Value ? "SI" : "NO") : "";
                xrlVoltimetroE.Text  = entrega.TieneVoltimetro.HasValue ? (entrega.TieneVoltimetro.Value ? "SI" : "NO") : "";
                xrlHorometroE.Text   = entrega.TieneHorometro.HasValue ? (entrega.TieneHorometro.Value ? "SI" : "NO") : "";
                xrlManometroE.Text   = entrega.TieneManometro.HasValue ? (entrega.TieneManometro.Value ? "SI" : "NO") : "";
                xrlInterruptorE.Text = entrega.TieneInterruptor.HasValue ? (entrega.TieneInterruptor.Value ? "SI" : "NO") : "";

                xrlAceiteE.Text         = entrega.TieneNivelAceite.HasValue ? (entrega.TieneNivelAceite.Value ? "SI" : "NO") : "";
                xrlAnticongelanteE.Text = entrega.TieneNivelAnticongelante.HasValue ? (entrega.TieneNivelAnticongelante.Value ? "SI" : "NO") : "";

                xrlL1NE.Text  = entrega.VoltajeL1N.HasValue ? (entrega.VoltajeL1N.Value).ToString() : "";
                xrlL2NE.Text  = entrega.VoltajeL2N.HasValue ? (entrega.VoltajeL2N.Value).ToString() : "";
                xrlL3NE.Text  = entrega.VoltajeL3N.HasValue ? (entrega.VoltajeL3N.Value).ToString() : "";
                xrlL1L2E.Text = entrega.VoltajeL1L2.HasValue ? (entrega.VoltajeL1L2.Value).ToString() : "";
                xrlL2L3E.Text = entrega.VoltajeL2L3.HasValue ? (entrega.VoltajeL2L3.Value).ToString() : "";
                xrlL3L1E.Text = entrega.VoltajeL3L1.HasValue ? (entrega.VoltajeL3L1.Value).ToString() : "";

                xrlCablesE.Text   = entrega.TieneCables.HasValue ? (entrega.TieneCables.Value ? "SI" : "NO") : "";
                xrlTramosE.Text   = entrega.TieneTramos.HasValue ? (entrega.TieneTramos.Value ? "SI" : "NO") : "";
                xrlLineasE.Text   = entrega.TieneLineas.HasValue ? (entrega.TieneLineas.Value ? "SI" : "NO") : "";
                xrlCalibresE.Text = entrega.TieneCalibres.HasValue ? (entrega.TieneCalibres.Value ? "SI" : "NO") : "";
                xrlZapatasE.Text  = entrega.TieneZapatas.HasValue ? (entrega.TieneZapatas.Value ? "SI" : "NO") : "";

                xrlCantidadE.Text = entrega.BateriaCantidad.HasValue ? (entrega.BateriaCantidad.Value).ToString() : "";
                xrlPlacasE.Text   = entrega.BateriaPlacas.HasValue ? (entrega.BateriaPlacas.Value).ToString() : "";
                xrlMarcaE.Text    = entrega.BateriaMarca;

                xrlSuspensionE.Text     = entrega.Suspension;
                xrlGanchoE.Text         = entrega.Gancho;
                xrlGatoNivelacionE.Text = entrega.GatoNivelacion;
                xrlArnesConexionE.Text  = entrega.ArnesConexion;

                xrlEje1DE.Text        = entrega.TieneEje1LlantaD.HasValue ? (entrega.TieneEje1LlantaD.Value ? "SI" : "NO") : "";
                xrlEje1IE.Text        = entrega.TieneEje1LlantaI.HasValue ? (entrega.TieneEje1LlantaI.Value ? "SI" : "NO") : "";
                xrlEje2DE.Text        = entrega.TieneEje2LlantaD.HasValue ? (entrega.TieneEje2LlantaD.Value ? "SI" : "NO") : "";
                xrlEje2IE.Text        = entrega.TieneEje2LlantaI.HasValue ? (entrega.TieneEje2LlantaI.Value ? "SI" : "NO") : "";
                xrlEje3DE.Text        = entrega.TieneEje3LlantaD.HasValue ? (entrega.TieneEje3LlantaD.Value ? "SI" : "NO") : "";
                xrlEje3IE.Text        = entrega.TieneEje3LlantaI.HasValue ? (entrega.TieneEje3LlantaI.Value ? "SI" : "NO") : "";
                xrlTapasLluviaDE.Text = entrega.TieneTapaLluviaLlantaD.HasValue ? (entrega.TieneTapaLluviaLlantaD.Value ? "SI" : "NO") : "";
                xrlTapasLluviaIE.Text = entrega.TieneTapaLluviaLlantaI.HasValue ? (entrega.TieneTapaLluviaLlantaI.Value ? "SI" : "NO") : "";

                xrlIzquierdaE.Text      = entrega.TieneLamparaIzquierda.HasValue ? (entrega.TieneLamparaIzquierda.Value ? "SI" : "NO") : "";
                xrlDerechaE.Text        = entrega.TieneLamparaDerecha.HasValue ? (entrega.TieneLamparaDerecha.Value ? "SI" : "NO") : "";
                xrlSenalSatelitalE.Text = entrega.TieneSenalSatelital.HasValue ? (entrega.TieneSenalSatelital.Value ? "SI" : "NO") : "";
                xrlDiodosE.Text         = entrega.TieneDiodos.HasValue ? (entrega.TieneDiodos.Value ? "SI" : "NO") : "";

                #endregion

                #region recepcion

                xrlBandasR.Text            = recepcion.TieneBandas.HasValue ? (recepcion.TieneBandas.Value ? "SI" : "NO") : "";
                xrlFiltroAceiteR.Text      = recepcion.TieneFiltroAceite.HasValue ? (recepcion.TieneFiltroAceite.Value ? "SI" : "NO") : "";
                xrlFiltroAguaR.Text        = recepcion.TieneFiltroAgua.HasValue ? (recepcion.TieneFiltroAgua.Value ? "SI" : "NO") : "";
                xrlFiltroCombustibleR.Text = recepcion.TieneFiltroCombustible.HasValue ? (recepcion.TieneFiltroCombustible.Value ? "SI" : "NO") : "";
                xrlFiltroAireR.Text        = recepcion.TieneFiltroAire.HasValue ? (recepcion.TieneFiltroAire.Value ? "SI" : "NO") : "";
                xrlManguerasR.Text         = recepcion.TieneMangueras.HasValue ? (recepcion.TieneMangueras.Value ? "SI" : "NO") : "";

                xrlAmperimetroR.Text = recepcion.TieneAmperimetro.HasValue ? (recepcion.TieneAmperimetro.Value ? "SI" : "NO") : "";
                xrlVoltimetroR.Text  = recepcion.TieneVoltimetro.HasValue ? (recepcion.TieneVoltimetro.Value ? "SI" : "NO") : "";
                xrlHorometroR.Text   = recepcion.TieneHorometro.HasValue ? (recepcion.TieneHorometro.Value ? "SI" : "NO") : "";
                xrlManometroR.Text   = recepcion.TieneManometro.HasValue ? (recepcion.TieneManometro.Value ? "SI" : "NO") : "";
                xrlInterruptorR.Text = recepcion.TieneInterruptor.HasValue ? (recepcion.TieneInterruptor.Value ? "SI" : "NO") : "";

                xrlAceiteR.Text         = recepcion.TieneNivelAceite.HasValue ? (recepcion.TieneNivelAceite.Value ? "SI" : "NO") : "";
                xrlAnticongelanteR.Text = recepcion.TieneNivelAnticongelante.HasValue ? (recepcion.TieneNivelAnticongelante.Value ? "SI" : "NO") : "";

                xrlL1NR.Text  = recepcion.VoltajeL1N.HasValue ? recepcion.VoltajeL1N.Value.ToString() : "";
                xrlL2NR.Text  = recepcion.VoltajeL2N.HasValue ? recepcion.VoltajeL2N.Value.ToString() : "";
                xrlL3NR.Text  = recepcion.VoltajeL3N.HasValue ? recepcion.VoltajeL3N.Value.ToString() : "";
                xrlL1L2R.Text = recepcion.VoltajeL1L2.HasValue ? recepcion.VoltajeL1L2.Value.ToString() : "";
                xrlL2L3R.Text = recepcion.VoltajeL2L3.HasValue ? recepcion.VoltajeL2L3.Value.ToString() : "";
                xrlL3L1R.Text = recepcion.VoltajeL3L1.HasValue ? recepcion.VoltajeL3L1.Value.ToString() : "";

                xrlCablesR.Text   = recepcion.TieneCables.HasValue ? (recepcion.TieneCables.Value ? "SI" : "NO") : "";
                xrlTramosR.Text   = recepcion.TieneTramos.HasValue ? (recepcion.TieneTramos.Value ? "SI" : "NO") : "";
                xrlLineasR.Text   = recepcion.TieneLineas.HasValue ? (recepcion.TieneLineas.Value ? "SI" : "NO") : "";
                xrlCalibresR.Text = recepcion.TieneCalibres.HasValue ? (recepcion.TieneCalibres.Value ? "SI" : "NO") : "";
                xrlZapatasR.Text  = recepcion.TieneZapatas.HasValue ? (recepcion.TieneZapatas.Value ? "SI" : "NO") : "";

                xrlCantidadR.Text = recepcion.BateriaCantidad.HasValue ? recepcion.BateriaCantidad.Value.ToString() : "";
                xrlPlacasR.Text   = recepcion.BateriaPlacas.HasValue ? recepcion.BateriaPlacas.Value.ToString() : "";
                xrlMarcaR.Text    = recepcion.BateriaMarca;

                xrlSuspensionR.Text     = recepcion.Suspension;
                xrlGanchoR.Text         = recepcion.Gancho;
                xrlGatoNivelacionR.Text = recepcion.GatoNivelacion;
                xrlArnesConexionR.Text  = recepcion.ArnesConexion;

                xrlEje1DR.Text        = recepcion.TieneEje1LlantaD.HasValue ? (recepcion.TieneEje1LlantaD.Value ? "SI" : "NO") : "";
                xrlEje1IR.Text        = recepcion.TieneEje1LlantaI.HasValue ? (recepcion.TieneEje1LlantaI.Value ? "SI" : "NO") : "";
                xrlEje2DR.Text        = recepcion.TieneEje2LlantaD.HasValue ? (recepcion.TieneEje2LlantaD.Value ? "SI" : "NO") : "";
                xrlEje2IR.Text        = recepcion.TieneEje2LlantaI.HasValue ? (recepcion.TieneEje2LlantaI.Value ? "SI" : "NO") : "";
                xrlEje3DR.Text        = recepcion.TieneEje3LlantaD.HasValue ? (recepcion.TieneEje3LlantaD.Value ? "SI" : "NO") : "";
                xrlEje3IR.Text        = recepcion.TieneEje3LlantaI.HasValue ? (recepcion.TieneEje3LlantaI.Value ? "SI" : "NO") : "";
                xrlTapasLluviaDR.Text = recepcion.TieneTapaLluviaLlantaD.HasValue ? (recepcion.TieneTapaLluviaLlantaD.Value ? "SI" : "NO") : "";
                xrlTapasLluviaIR.Text = recepcion.TieneTapaLluviaLlantaI.HasValue ? (recepcion.TieneTapaLluviaLlantaI.Value ? "SI" : "NO") : "";

                xrlIzquierdaR.Text      = recepcion.TieneLamparaIzquierda.HasValue ? (recepcion.TieneLamparaIzquierda.Value ? "SI" : "NO") : "";
                xrlDerechaR.Text        = recepcion.TieneLamparaDerecha.HasValue ? (recepcion.TieneLamparaDerecha.Value ? "SI" : "NO") : "";
                xrlSenalSatelitalR.Text = recepcion.TieneSenalSatelital.HasValue ? (recepcion.TieneSenalSatelital.Value ? "SI" : "NO") : "";
                xrlDiodosR.Text         = recepcion.TieneDiodos.HasValue ? (recepcion.TieneDiodos.Value ? "SI" : "NO") : "";

                #endregion
            } catch (Exception ex) {
                throw new Exception(".ImprimirReporte: Error al imprimir el reporte. " + ex.Message);
            }
        }
        /// <summary>
        /// Genera el reporte para el check list
        /// </summary>
        /// <param name="datos">Datos del check list</param>
        /// <param name="xmlDocument">Plantilla del reporte</param>
        private void ImprimirReporte(Dictionary <string, object> datos, XmlDocument xmlDocument)
        {
            try
            {
                #region Cabecera
                #region Título
                XmlNodeList textoCondiciones = xmlDocument.GetElementsByTagName("titulo");
                if (textoCondiciones.Count < 1)
                {
                    throw new Exception("el formato del archivo XML es incorrecto");
                }
                this.lblTitulo.Html = textoCondiciones[0].InnerText;
                #endregion

                #region Logo
                var modulo            = (ModuloBO)datos["Modulo"];
                int?unidadOperativaID = (int)datos["UnidadOperativaID"];
                if (unidadOperativaID != null && modulo.ObtenerConfiguracion(unidadOperativaID.Value) != null)
                {
                    ConfiguracionModuloBO configuracion = modulo.ObtenerConfiguracion(unidadOperativaID.Value);
                    if (!string.IsNullOrEmpty(configuracion.URLLogoEmpresa) && !string.IsNullOrWhiteSpace(configuracion.URLLogoEmpresa))
                    {
                        this.picLogoEmpresa.ImageUrl = configuracion.URLLogoEmpresa;
                    }
                }

                #endregion

                #region Folio
                string folio = (string)datos["Folio"];
                this.lblFolioCheckList.Text = !string.IsNullOrEmpty(folio) && !string.IsNullOrWhiteSpace(folio) ? folio : string.Empty;
                this.lblFolioCabecera.Text  = !string.IsNullOrEmpty(folio) && !string.IsNullOrWhiteSpace(folio) ? folio : string.Empty;
                #endregion

                #region Unidad
                var unidad = (UnidadBO)datos["Unidad"];
                this.lblModeloUnidad.Text    = unidad.Modelo.Nombre;
                this.lblNumeroEconomico.Text = unidad.NumeroEconomico;
                #region Tramites
                var placas = (TramiteBO)datos["Placas"];
                this.lblPlacas.Text = placas.Resultado;
                #endregion
                #endregion

                #region Estatus Contrato
                EEstatusContrato?estatus = null;
                if (datos.ContainsKey("EstatusContrato") && datos["EstatusContrato"] != null)
                {
                    estatus = (EEstatusContrato)datos["EstatusContrato"];
                }

                switch (estatus)
                {
                case EEstatusContrato.Cancelado:
                case EEstatusContrato.Cerrado:
                    this.Watermark.Text = estatus.ToString().ToUpper();
                    break;
                }
                #endregion
                #endregion

                #region Cliente
                var cliente = (CuentaClienteIdealeaseBO)datos["Cliente"];
                this.lblNombreClienteEntrega.Text = cliente.Nombre;
                #endregion

                #region Datos Entrega
                var entrega = (ListadoVerificacionBO)datos["Entrega"];

                #region Usuario
                this.lblNombreUsuarioEntrega.Text = entrega.UsuarioVerifica.Nombre;
                #endregion

                #region Fecha y hora
                this.lblFechaEntrega.Text = entrega.Fecha.HasValue ? entrega.Fecha.Value.ToShortDateString() : string.Empty;
                this.lblHoraEntrega.Text  = entrega.Fecha.HasValue ? entrega.Fecha.Value.ToString("hh:mm tt").Replace(".", "").ToUpper() : string.Empty;
                #endregion

                #region Operador
                var operador = (OperadorBO)datos["Operador"];
                this.lblNombreOperadorEntrega.Text = operador.Nombre;
                #endregion

                #region Kilometros Horas

                this.lblKilometrajeEntrega.Text = entrega.Kilometraje.HasValue
                                                      ? entrega.Kilometraje.Value.ToString("#,##0")
                                                      : string.Empty;
                this.lblHorasEntrega.Text = entrega.Horometro.HasValue
                                                ? entrega.Horometro.Value.ToString("#,##0")
                                                : string.Empty;

                #endregion

                #region Cuestionario

                #region Espejos Completos
                if (entrega.TieneEspejosCompletos.HasValue)
                {
                    if (entrega.TieneEspejosCompletos.Value)
                    {
                        chkEntregaEspejosSI.Checked = true;
                    }
                    else
                    {
                        chkEntregaEspejosNO.Checked = true;
                    }
                }
                #endregion

                #region Contrato de Renta
                if (entrega.TieneContratoRenta.HasValue)
                {
                    if (entrega.TieneContratoRenta.Value)
                    {
                        this.chkEntregaContratoSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaContratoNO.Checked = false;
                    }
                }
                #endregion

                #region Interior Limpio
                if (entrega.TieneInteriorLimpio.HasValue)
                {
                    if (entrega.TieneInteriorLimpio.Value)
                    {
                        this.chkEntregaInteriorSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaInteriorNO.Checked = true;
                    }
                }
                #endregion

                #region Vestiduras Limpias
                if (entrega.TieneVestidurasLimpias.HasValue)
                {
                    if (entrega.TieneVestidurasLimpias.Value)
                    {
                        this.chkEntregaVestidurasSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaVestidurasNO.Checked = true;
                    }
                }
                #endregion

                #region Tapetes
                if (entrega.TieneTapetes.HasValue)
                {
                    if (entrega.TieneTapetes.Value)
                    {
                        this.chkEntregaTapetesSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaTapetesNO.Checked = true;
                    }
                }
                #endregion

                #region Llave Original
                if (entrega.TieneLlaveOriginal.HasValue)
                {
                    if (entrega.TieneLlaveOriginal.Value)
                    {
                        this.chkEntregaLlaveSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaLlaveNO.Checked = true;
                    }
                }
                #endregion

                #region Encendedor
                if (entrega.TieneEncendedor.HasValue)
                {
                    if (entrega.TieneEncendedor.Value)
                    {
                        this.chkEntregaEncendedorSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaEncendedorNO.Checked = true;
                    }
                }
                #endregion

                #region Estereo y Bocinas
                if (entrega.TieneStereoBocinas.HasValue)
                {
                    if (entrega.TieneStereoBocinas.Value)
                    {
                        this.chkEntregaEstereoSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaEstereoNO.Checked = true;
                    }
                }
                #endregion

                #region Alarma de reversa
                if (entrega.TieneAlarmasReversa.HasValue)
                {
                    if (entrega.TieneAlarmasReversa.Value)
                    {
                        this.chkEntregaAlarmaSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaAlarmaNO.Checked = true;
                    }
                }
                #endregion

                #region Extinguidor
                if (entrega.TieneExtinguidor.HasValue)
                {
                    if (entrega.TieneExtinguidor.Value)
                    {
                        this.chkEntregaExtinguidorSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaExtinguidorNO.Checked = true;
                    }
                }
                #endregion

                #region Gato y Llave
                if (entrega.TieneGatoLlaveTuerca.HasValue)
                {
                    if (entrega.TieneGatoLlaveTuerca.Value)
                    {
                        this.chkEntregaGatoSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaGatoNO.Checked = true;
                    }
                }
                #endregion

                #region 3 Reflejantes
                if (entrega.TieneTresReflejantes.HasValue)
                {
                    if (entrega.TieneTresReflejantes.Value)
                    {
                        this.chkEntregaReflejantesSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaReflejantesNO.Checked = true;
                    }
                }
                #endregion

                #region Limpieza Int. Caja
                if (entrega.TieneLimpiezaInteriorCaja.HasValue)
                {
                    if (entrega.TieneLimpiezaInteriorCaja.Value)
                    {
                        this.chkEntregaCajaSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaCajaNO.Checked = true;
                    }
                }
                #endregion

                #region GPS
                if (entrega.TieneGPS.HasValue)
                {
                    if (entrega.TieneGPS.Value)
                    {
                        this.chkEntregaGPSSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaGPSNO.Checked = true;
                    }
                }
                #endregion

                #region Documentación Completa
                if (entrega.TieneDocumentacionCompleta.HasValue)
                {
                    if (entrega.TieneDocumentacionCompleta.Value)
                    {
                        this.chkEntregaDocumentacionSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaDocumentacionNO.Checked = true;
                    }
                }

                this.lblEntregaObsDocumentacion.Text = entrega.ObservacionesDocumentacionCompleta;
                #endregion

                #region Baterias Correctas
                if (entrega.BateriasCorrectas.HasValue)
                {
                    if (entrega.BateriasCorrectas.Value)
                    {
                        this.chkEntregaBateriasSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaBateriasNO.Checked = true;
                    }
                }

                this.lblEntregaObsBaterias.Text = entrega.ObservacionesBaterias;
                #endregion

                #region Golpes En General
                if (entrega.TieneGolpesGeneral.HasValue)
                {
                    if (entrega.TieneGolpesGeneral.Value)
                    {
                        this.chkEntregaGolpesSI.Checked = true;
                    }
                    else
                    {
                        this.chkEntregaGolpesNO.Checked = true;
                    }
                }
                #endregion

                #endregion

                #region Observaciones
                this.dtlObservcionesEntrega.DataSource = entrega.VerificacionesSeccion;
                this.xrlPosicion.DataBindings.Add(new XRBinding("Text", entrega.VerificacionesSeccion, "Numero"));
                this.xrlObservacion.DataBindings.Add(new XRBinding("Text", entrega.VerificacionesSeccion, "Observacion"));
                #endregion

                #region Combustible
                decimal?porcentaje = null;
                if (unidad != null)
                {
                    if (unidad.CaracteristicasUnidad != null)
                    {
                        if (unidad.CaracteristicasUnidad.CapacidadTanque.HasValue)
                        {
                            porcentaje = entrega.CalcularPorcentajeCombustible(unidad.CaracteristicasUnidad.CapacidadTanque.Value);
                        }
                    }

                    this.lblEntregaNivelCombustible.Text = porcentaje.HasValue ? porcentaje.Value.ToString("#,##0.00") : string.Empty;
                }

                var         imagenes      = this.CargarImagenes((string)datos["Path"]);
                XmlNodeList txtFracciones = xmlDocument.GetElementsByTagName("fracciones");
                if (txtFracciones.Count < 1)
                {
                    throw new Exception("el formato del archivo XML es incorrecto");
                }
                var fraccion = (int)Convert.ChangeType(txtFracciones[0].InnerText, typeof(int));
                int?indexPic = -1;

                if (unidad != null)
                {
                    if (unidad.CaracteristicasUnidad != null)
                    {
                        if (unidad.CaracteristicasUnidad.CapacidadTanque.HasValue)
                        {
                            indexPic = entrega.ObtenerFraccionMedidorCombustible(unidad.CaracteristicasUnidad.CapacidadTanque.Value, fraccion);
                        }
                    }
                }

                var urlFraccion = imagenes.FirstOrDefault(x => string.Compare(x.Key, indexPic.ToString(), System.StringComparison.Ordinal) == 0).Value;
                this.picEntregaNivelCombustible.ImageUrl = urlFraccion;

                this.lblEntregaCombustible.Text = entrega.Combustible.HasValue
                                                      ? entrega.Combustible.Value.ToString("#,##0")
                                                      : string.Empty;
                #endregion

                #endregion

                #region Datos Recepción
                var recepcion = (ListadoVerificacionBO)datos["Recepcion"] ?? new ListadoVerificacionBO();

                this.lblNombreClienteRecibe.Text = recepcion != null
                                                       ? (recepcion.ListadoVerificacionID.HasValue
                                                              ? cliente.Nombre
                                                              : string.Empty)
                                                       : string.Empty;

                #region Usuario
                this.lblNombreUsuarioRecibe.Text = recepcion.UsuarioVerifica != null
                                                    ? (!string.IsNullOrEmpty(recepcion.UsuarioVerifica.Nombre) && !string.IsNullOrWhiteSpace(recepcion.UsuarioVerifica.Nombre) ? recepcion.UsuarioVerifica.Nombre : string.Empty)
                                                    : string.Empty;
                #endregion

                #region Fecha y hora
                this.lblFechaRecibe.Text = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToShortDateString() : string.Empty;
                this.lblHoraRecibe.Text  = recepcion.Fecha.HasValue ? recepcion.Fecha.Value.ToString("hh:mm tt").Replace(".", "").ToUpper() : string.Empty;

                #endregion

                #region Operador
                this.lblNombreOperadorRecibe.Text = recepcion.UsuarioVerifica != null ? operador.Nombre : string.Empty;
                #endregion

                #region Kilometros Horas
                this.lblKilometrajeRecibe.Text = recepcion.Kilometraje.HasValue
                                                      ? recepcion.Kilometraje.Value.ToString("#,##0")
                                                      : string.Empty;
                this.lblHorasRecibe.Text = recepcion.Horometro.HasValue
                                                ? recepcion.Horometro.Value.ToString("#,##0")
                                                : string.Empty;
                #endregion

                #region Cuestionario

                #region Espejos Completos
                if (recepcion.TieneEspejosCompletos.HasValue)
                {
                    if (recepcion.TieneEspejosCompletos.Value)
                    {
                        this.chkRecepcionEspejosSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionEspejosNO.Checked = true;
                    }
                }
                #endregion

                #region Contrato de Renta
                if (recepcion.TieneContratoRenta.HasValue)
                {
                    if (recepcion.TieneContratoRenta.Value)
                    {
                        this.chkRecepcionContratoSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionContratoNO.Checked = false;
                    }
                }
                #endregion

                #region Interior Limpio
                if (recepcion.TieneInteriorLimpio.HasValue)
                {
                    if (recepcion.TieneInteriorLimpio.Value)
                    {
                        this.chkRecepcionInteriorSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionInteriorNO.Checked = true;
                    }
                }
                #endregion

                #region Vestiduras Limpias
                if (recepcion.TieneVestidurasLimpias.HasValue)
                {
                    if (recepcion.TieneVestidurasLimpias.Value)
                    {
                        this.chkRecepcionVestidurasSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionVestidurasNO.Checked = true;
                    }
                }
                #endregion

                #region Tapetes
                if (recepcion.TieneTapetes.HasValue)
                {
                    if (recepcion.TieneTapetes.Value)
                    {
                        this.chkRecepcionTapetesSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionTapetesNO.Checked = true;
                    }
                }
                #endregion

                #region Llave Original
                if (recepcion.TieneLlaveOriginal.HasValue)
                {
                    if (recepcion.TieneLlaveOriginal.Value)
                    {
                        this.chkRecepcionLlaveSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionLlaveNO.Checked = true;
                    }
                }
                #endregion

                #region Encendedor
                if (recepcion.TieneEncendedor.HasValue)
                {
                    if (recepcion.TieneEncendedor.Value)
                    {
                        this.chkRecepcionEncendedorSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionEncendedorNO.Checked = true;
                    }
                }
                #endregion

                #region Estereo y Bocinas
                if (recepcion.TieneStereoBocinas.HasValue)
                {
                    if (recepcion.TieneStereoBocinas.Value)
                    {
                        this.chkRecepcionEstereoSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionEstereoNO.Checked = true;
                    }
                }
                #endregion

                #region Alarma de reversa
                if (recepcion.TieneAlarmasReversa.HasValue)
                {
                    if (recepcion.TieneAlarmasReversa.Value)
                    {
                        this.chkRecepcionAlarmaSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionAlarmaNO.Checked = true;
                    }
                }
                #endregion

                #region Extinguidor
                if (recepcion.TieneExtinguidor.HasValue)
                {
                    if (recepcion.TieneExtinguidor.Value)
                    {
                        this.chkRecepcionExtinguidorSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionExtinguidorNO.Checked = true;
                    }
                }
                #endregion

                #region Gato y Llave
                if (recepcion.TieneGatoLlaveTuerca.HasValue)
                {
                    if (recepcion.TieneGatoLlaveTuerca.Value)
                    {
                        this.chkRecepcionGatoSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionGatoNO.Checked = true;
                    }
                }
                #endregion

                #region 3 Reflejantes
                if (recepcion.TieneTresReflejantes.HasValue)
                {
                    if (recepcion.TieneTresReflejantes.Value)
                    {
                        this.chkRecepcionReflejantesSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionReflejantesNO.Checked = true;
                    }
                }
                #endregion

                #region Limpieza Int. Caja
                if (recepcion.TieneLimpiezaInteriorCaja.HasValue)
                {
                    if (recepcion.TieneLimpiezaInteriorCaja.Value)
                    {
                        this.chkRecepcionCajaSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionCajaNO.Checked = true;
                    }
                }
                #endregion

                #region GPS
                if (recepcion.TieneGPS.HasValue)
                {
                    if (recepcion.TieneGPS.Value)
                    {
                        this.chkRecepcionGPSSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionGPSNO.Checked = true;
                    }
                }
                #endregion

                #region Documentación Completa
                if (recepcion.TieneDocumentacionCompleta.HasValue)
                {
                    if (recepcion.TieneDocumentacionCompleta.Value)
                    {
                        this.chkRecepcionDocumentacionSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionDocumentacionNO.Checked = true;
                    }
                }

                this.lblRecepcionObsDocumentacion.Text = !string.IsNullOrEmpty(recepcion.ObservacionesDocumentacionCompleta) && !string.IsNullOrWhiteSpace(recepcion.ObservacionesDocumentacionCompleta)
                                                        ? recepcion.ObservacionesDocumentacionCompleta
                                                        : string.Empty;
                #endregion

                #region Baterias Correctas
                if (recepcion.BateriasCorrectas.HasValue)
                {
                    if (recepcion.BateriasCorrectas.Value)
                    {
                        this.chkRecepcionBateriasSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionBateriasNO.Checked = true;
                    }
                }

                this.lblRecepcionObsBaterias.Text = recepcion.ObservacionesBaterias;
                #endregion

                #region Golpes En General
                if (recepcion.TieneGolpesGeneral.HasValue)
                {
                    if (recepcion.TieneGolpesGeneral.Value)
                    {
                        this.chkRecepcionGolpesSI.Checked = true;
                    }
                    else
                    {
                        this.chkRecepcionGolpesNO.Checked = true;
                    }
                }
                #endregion

                #endregion

                #region Observaciones
                this.dtlObsRecepcion.DataSource = recepcion.VerificacionesSeccion;
                this.lblRecepcionPosicion.DataBindings.Add(new XRBinding("Text", recepcion.VerificacionesSeccion, "Numero"));
                this.lblRecepcionObservacion.DataBindings.Add(new XRBinding("Text", recepcion.VerificacionesSeccion, "Observacion"));
                #endregion

                #region Combustible
                decimal?porcentajeRecep = null;
                if (unidad != null)
                {
                    if (unidad.CaracteristicasUnidad != null)
                    {
                        if (unidad.CaracteristicasUnidad.CapacidadTanque.HasValue)
                        {
                            porcentajeRecep = recepcion.CalcularPorcentajeCombustible(unidad.CaracteristicasUnidad.CapacidadTanque.Value);
                        }
                    }

                    this.lblRecepcionNivelCombustible.Text = porcentajeRecep.HasValue ? porcentajeRecep.Value.ToString("#,##0.00") : string.Empty;
                }

                int?indexPicRec = -1;

                if (unidad != null)
                {
                    if (unidad.CaracteristicasUnidad != null)
                    {
                        if (unidad.CaracteristicasUnidad.CapacidadTanque.HasValue)
                        {
                            indexPicRec = recepcion.ObtenerFraccionMedidorCombustible(unidad.CaracteristicasUnidad.CapacidadTanque.Value, fraccion);
                        }
                    }
                }

                if (indexPicRec == null)
                {
                    indexPicRec = -1;
                }

                var urlFraccionRec = imagenes.FirstOrDefault(x => string.Compare(x.Key, indexPicRec.ToString(), System.StringComparison.Ordinal) == 0).Value;
                this.picRecepcionNivelCombustible.ImageUrl = urlFraccionRec;

                this.lblRecepcionCombustible.Text = recepcion.Combustible.HasValue
                                                        ? recepcion.Combustible.Value.ToString("#,##0")
                                                        : string.Empty;
                #endregion
                #endregion

                #region Info Llantas
                var lista = new List <LlantaDTO>();

                if (entrega.VerificacionesLlanta != null)
                {
                    if (entrega.VerificacionesLlanta.Count > 0)
                    {
                        foreach (var verificacion in entrega.VerificacionesLlanta)
                        {
                            LlantaDTO item = new LlantaDTO();
                            item.Codigo   = verificacion.Llanta != null ? verificacion.Llanta.Codigo : string.Empty;
                            item.Posicion = verificacion.Llanta != null
                                                ? (verificacion.Llanta.Posicion.HasValue
                                                       ? verificacion.Llanta.Posicion
                                                       : null)
                                                : null;
                            item.Correcto = verificacion.Correcto.HasValue
                                                ? (verificacion.Correcto.Value ? verificacion.Correcto : null)
                                                : null;
                            item.Incorrecto = verificacion.Correcto.HasValue
                                                  ? (!verificacion.Correcto.Value ? (bool?)true : null)
                                                  : null;
                            lista.Add(item);
                        }
                    }
                }
                lista.Sort((x, y) => string.Compare(x.Posicion.ToString(), y.Posicion.ToString()));

                if (recepcion != null)
                {
                    if (recepcion.VerificacionesLlanta != null)
                    {
                        if (recepcion.VerificacionesLlanta.Count > 0)
                        {
                            foreach (var verifRecepcion in recepcion.VerificacionesLlanta)
                            {
                                LlantaDTO item = lista.FirstOrDefault(x =>
                                                                      x.Codigo == verifRecepcion.Llanta.Codigo &&
                                                                      x.Posicion == verifRecepcion.Llanta.Posicion);

                                if (item != null)
                                {
                                    item.CorrectoRecepcion   = verifRecepcion.Correcto.HasValue ? (verifRecepcion.Correcto.Value ? verifRecepcion.Correcto : null) : null;
                                    item.IncorrectoRecepcion = verifRecepcion.Correcto.HasValue ? (!verifRecepcion.Correcto.Value ? (bool?)true : null) : null;
                                }
                            }
                        }
                    }
                }

                this.dtlLlantas.DataSource = lista;
                this.xrblPosicion.DataBindings.Add(new XRBinding("Text", null, "Posicion"));
                this.xrblCodigo.DataBindings.Add(new XRBinding("Text", null, "Codigo"));
                this.chkEntregaLlantasSI.DataBindings.Add(new XRBinding("CheckState", null, "Correcto"));
                this.chkEntregaLlantasNO.DataBindings.Add(new XRBinding("CheckState", null, "Incorrecto"));
                this.lblEntregaObsLlanta.Text = entrega.ObservacionesLlantas;

                this.xrlblRecepcionPosicion.DataBindings.Add(new XRBinding("Text", null, "Posicion"));
                this.xrlblRecepcionCodigo.DataBindings.Add(new XRBinding("Text", null, "Codigo"));
                this.chkRecepcionLlantaSI.DataBindings.Add(new XRBinding("CheckState", null, "CorrectoRecepcion"));
                this.chkRecepcionLlantaNO.DataBindings.Add(new XRBinding("CheckState", null, "IncorrectoRecepcion"));

                if (recepcion != null)
                {
                    if (recepcion.VerificacionesLlanta != null)
                    {
                        if (recepcion.VerificacionesLlanta.Count > 0)
                        {
                            this.lblRecepcionObsLlanta.Text = recepcion.ObservacionesLlantas;
                        }
                    }

                    this.lblRecepcionObsLlanta.Text = recepcion.ObservacionesLlantas;
                }
                else
                {
                    this.lblRecepcionObsLlanta.Text = string.Empty;
                }

                #endregion
            }
            catch (Exception ex)
            {
                throw new Exception(nombreClase + ".ImpirmirReporte: Error al imprimir el reporte. " + ex.Message);
            }
        }