public DetalleTramitesPRE(IDetalleTramitesVIS vista, IucTramiteFiltroAKVIS vistaFiltro, IucTramiteGPSVIS vistaGPS, IucTramitePlacaVIS vistaPlacaEstatal, IucTramitePlacaVIS vistaPlacaFederal, IucTramiteTenenciaVIS vistaTenencia, IucTramiteVerificacionVIS vistaAmbiental, IucTramiteVerificacionVIS vistaMecanico) { try { this.vista = vista; presentadorFiltro = new ucTramiteFiltroAKPRE(vistaFiltro); presentadorGPS = new ucTramiteGPSPRE(vistaGPS); presentadorMecanico = new ucTramiteVerificacionPRE(vistaMecanico); presentadorAmbiental = new ucTramiteVerificacionPRE(vistaAmbiental); presentadorPlacaFederal = new ucTramitePlacaPRE(vistaPlacaFederal); presentadorPlacaEstatal = new ucTramitePlacaPRE(vistaPlacaEstatal); presentadorTenencia = new ucTramiteTenenciaPRE(vistaTenencia); tenenciaBR = new TenenciaBR(); placaBR = new PlacaBR(); verificacionBR = new VerificacionBR(); gpsBR = new GPSBR(); filtroBR = new FiltroAKBR(); seguroBR = new SeguroBR(); unidadBR = new UnidadBR(); dctx = FacadeBR.ObtenerConexion(); } catch (Exception ex) { this.MostrarMensaje("Inconsistencias en la configuración", ETipoMensajeIU.ERROR, nombreClase + ".DetalleTramitesPRE: " + ex.Message); } }
public DetalleSeguroPRE(IDetalleSeguroVIS view, IucSeguroDetalleVIS view1) { try { this.vista = view; this.vista1 = view1; this.presentador1 = new ucSeguroDetallePRE(view1); this.controlador = new SeguroBR(); this.dctx = FacadeBR.ObtenerConexion(); } catch (Exception ex) { this.vista.MostrarMensaje("Inconsistencias en los parámetros de configuración", ETipoMensajeIU.ERROR, this.nombreClase + ".DetalleSeguroPRE:" + ex.Message); } }
/// <summary> /// Calcula el Numero de la Poliza de la Unidad /// </summary> /// <returns></returns> private string CalcularNumeroPoliza() { var seguroBR = new SeguroBR(); //SC_0051 List <SeguroBO> seguros = seguroBR.Consultar(dataContext, new SeguroBO { Activo = true, Tramitable = new UnidadBO { UnidadID = vista.UnidadID } }) ?? new List <SeguroBO>(); SeguroBO seguro = seguros.FindLast( seg => seg.Tramitable.TramitableID == vista.UnidadID && seg.Tramitable.TipoTramitable == ETipoTramitable.Unidad); return(seguro != null ? seguro.NumeroPoliza: string.Empty); }
public ucSeguroPRE(IucSeguroVIS view, IucDeducibleSeguroVIS view1, IucEndosoSeguroVIS view2, IucSiniestroSeguroVIS view3) { try { this.vista = view; this.vista1 = view1; this.vista2 = view2; this.vista3 = view3; this.vista.Activo = true; this.presentador1 = new ucDeducibleSeguroPRE(view1); this.presentador2 = new ucEndosoSeguroPRE(view2); this.presentador3 = new ucSiniestroSeguroPRE(view3); this.controlador = new SeguroBR(); this.dctx = FacadeBR.ObtenerConexion(); } catch (Exception ex) { this.vista.MostrarMensaje("Inconsistencias en los parámetros de configuración", ETipoMensajeIU.ERROR, this.nombreClase + ".ucSeguroPRE:" + ex.Message); } }
public ConsultarSeguroPRE(IConsultarSeguroVIS view) { this.vista = view; this.controlador = new SeguroBR(); this.dctx = FacadeBR.ObtenerConexion(); }
/// <summary> /// Consulta y muestra los trámites activos de un tramitable /// </summary> /// <param name="tramitableID">Identificador del tramitable</param> /// <param name="tipoTramitable">Tipo de tramitable</param> /// <param name="UnidadOperativaId">Identificador de la unidad operativa REQ: 13285</param> public void CargarTramites(int?tramitableID, ETipoTramitable?tipoTramitable, string descripcionEnllantable, int?UnidadOperativaId = null) { List <TramiteBO> lst = new List <TramiteBO>(); //RQM 13285, habilitamos pedimento //Si se proporciona un tramitable, se obtienen sus trámites if (tramitableID != null && tipoTramitable != null) { TramiteBO bo = new TramiteProxyBO(); bo.Activo = true; bo.Tramitable = new TramitableProxyBO() { TramitableID = tramitableID, TipoTramitable = tipoTramitable }; lst = this.controlador.Consultar(this.dctx, bo); } //Se recorren los tipos de trámites para incluir los que no se hayan realizado aún foreach (ETipoTramite tipo in Enum.GetValues(typeof(ETipoTramite))) { if (!(lst.Exists(p => p.Tipo != null && p.Tipo == tipo))) { TramiteBO temp = new TramiteProxyBO() { Activo = false, Tipo = tipo }; lst.Add(temp); } } //Se obtiene el seguro para concatenarle su aseguradora foreach (TramiteBO bo in lst) { if (bo.Activo != null && bo.Activo == true && bo.Tipo != null && bo.Tipo == ETipoTramite.SEGURO && bo.TramiteID != null) { SeguroBO seguro = new SeguroBO(bo); List <SeguroBO> lstTemp = new SeguroBR().Consultar(this.dctx, seguro); if (lstTemp.Count > 0) { seguro = lstTemp[0]; } if (seguro.Aseguradora != null) { if (seguro.NumeroPoliza == null) { seguro.NumeroPoliza = ""; } seguro.NumeroPoliza += " (" + seguro.Aseguradora + ")"; } bo.Resultado = seguro.Resultado; } } //Se asigna la información a la vista this.vista.TramitableID = tramitableID; this.vista.TipoTramitable = tipoTramitable; this.vista.DescripcionEnllantable = descripcionEnllantable; this.vista.Tramites = lst; this.vista.ActualizarTramites(); }