Example #1
0
        public static void Logout(ServiceRequest2 serviceRequest, ServiceRequestEventHandler asyncCallback)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline(service._serviceLogout, asyncCallback, json._jsonLogout);
#else
            new Thread(() => { serviceRequest.BeginWebRequest(service._serviceLogout, asyncCallback); }).Start();
#endif
        }
Example #2
0
        public static void ValidaAcceso(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoValidaAcceso> asyncCallback, ReqValidarAcceso requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResValidaAcceso, DtoValidaAcceso>(service._serviceValidarAcceso, asyncCallback, json._jsonValidaAcceso);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResValidaAcceso, DtoValidaAcceso, ReqValidarAcceso>(service._serviceValidarAcceso, asyncCallback, requestData); }).Start();
#endif
        }
Example #3
0
        public static void ValidaNip(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoValidarNip> asyncCallback, ReqValidarNip requestData, TipoNip tipoNip)
        {
            switch (tipoNip)
            {
                case TipoNip.BancaTelefonica:
#if OFFLINE
                    serviceRequest.BeginWebRequestOffline<ResValidarNip, DtoValidarNip>(service._serviceValidaNipBancaTelefonica, asyncCallback, json._jsonValidaNip);
#else
                    new Thread(() => { serviceRequest.BeginWebRequest<ResValidarNip, DtoValidarNip, ReqValidarNip>(service._serviceValidaNipBancaTelefonica, asyncCallback, requestData); }).Start();
#endif
                    break;
                case TipoNip.Supernet:
#if OFFLINE
                    serviceRequest.BeginWebRequestOffline<ResValidarNip, DtoValidarNip>(service._serviceValidaNipSupernet, asyncCallback, json._jsonValidaNip);
#else
                    new Thread(() => { serviceRequest.BeginWebRequest<ResValidarNip, DtoValidarNip, ReqValidarNip>(service._serviceValidaNipSupernet, asyncCallback, requestData); }).Start();
#endif
                    break;
            }
        }
Example #4
0
        public static void Login(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoLogin> asyncCallback, ReqLogin requestData, Santander.TipoClaveUsuario tipoClaveUsuario)
        {
            switch (tipoClaveUsuario)
            {
                case TipoClaveUsuario.CodigoCliente:
#if OFFLINE
                    serviceRequest.BeginWebRequestOffline<ResLogin, DtoLogin>(service._serviceLogin, asyncCallback, json._jsonLogin);
#else
                    new Thread(() => { serviceRequest.BeginWebRequest<ResLogin, DtoLogin, ReqLogin>(service._serviceLogin, asyncCallback, requestData); }).Start();
#endif
                    break;
                case TipoClaveUsuario.CuentaCheques:
                case TipoClaveUsuario.Tarjeta:
#if OFFLINE
                    serviceRequest.BeginWebRequestOffline<ResLogin, DtoLogin>(service._serviceLoginTDC, asyncCallback, json._jsonLogin);
#else
                    new Thread(() => { serviceRequest.BeginWebRequest<ResLogin, DtoLogin, ReqLogin>(service._serviceLoginTDC, asyncCallback, requestData); }).Start();
#endif
                    break;
            }
        }
Example #5
0
        // Code to execute when the application is launching (eg, from Start)
        // This code will not execute when the application is reactivated
        private void Application_Launching(object sender, LaunchingEventArgs e)
        {
            if (timer == null)
            {
                timer = new System.Threading.Timer((_) =>
                {
                    this.RootFrame.Dispatcher.BeginInvoke(() =>
                    {
                        if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() && !this.IsNetworkAvailable)
                        {
                            this.IsNetworkAvailable = false;
                            MessageBox.Show(TextosFront.frontMensajeConexionInternet);
                        }
                        else
                        {
                            this.IsNetworkAvailable = true;
                        }
                    });
                });
                timer.Change(0, 5000);
            }

            serviceRequest = new ServiceRequest2();

            Santander.DataAccess.Services.InitializeServices();
            Santander.DataAccess.Jsons.InitializeJsons();
            Santander.View.Views.InitializeViews();
            selectedEstatusTransferencia = null;
            selectedServicio = null;
            SelectedConsultaCuentasRegistradas = null;
        }
Example #6
0
        public static void InitAsociarCtaTelMov(ServiceRequest2 serviceRequest, ServiceRequestEventHandler asyncCallback)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline(Services._serviceInitAsociarCtaTelMov, asyncCallback, json._jsonInitAsociarCtaTelMov);
#else
            new Thread(() => { serviceRequest.BeginWebRequest(service._serviceInitAsociarCtaTelMov, asyncCallback); }).Start();
#endif
        }
Example #7
0
        public static void EnvTerminosCondiciones(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoEnvTerminosCondiciones> asyncCallback, ReqEnvTerminosCondiciones requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResEnvTerminosCondiciones, DtoEnvTerminosCondiciones>(Services._serviceEnvTerminosCondiciones, asyncCallback, json._jsonEnvTerminosCondiciones);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResEnvTerminosCondiciones, DtoEnvTerminosCondiciones, ReqEnvTerminosCondiciones>(service._serviceEnvTerminosCondiciones, asyncCallback, requestData); }).Start();
#endif
        }
Example #8
0
        public static void AsociarCuentaNumTelMov(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoAsociarCuentaNumTelMov> asyncCallback, ReqAsociarCuentaNumTelMov requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResAsociarCuentaNumTelMov, DtoAsociarCuentaNumTelMov>(Services._serviceAsociarCuentaNumTelMov, asyncCallback, json._jsonAsociarCuentaNumTelMov);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResAsociarCuentaNumTelMov, DtoAsociarCuentaNumTelMov, ReqAsociarCuentaNumTelMov>(service._serviceAsociarCuentaNumTelMov, asyncCallback, requestData); }).Start();
#endif
        }
Example #9
0
        public static void DesbloqueoSoftToken(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoDesbloqueoToken> asyncCallback, ReqDesbloqueoST requestData)
        {
            new Thread(() => { serviceRequest.BeginWebRequest<ResDesbloqueoToken, DtoDesbloqueoToken, ReqDesbloqueoST>(service._serviceDesbloqueoToken, asyncCallback, requestData); }).Start();

        }
Example #10
0
 public static void ReemplazarST(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoReemplazoST> asyncCallback, ReqReemplazoST requestData)
 {
     new Thread(() => { serviceRequest.BeginWebRequest<ResReemplazoST, DtoReemplazoST, ReqReemplazoST>(service._serviceReemplazoST, asyncCallback, requestData); }).Start();
 }
Example #11
0
        public static void DarAltaSuperToken(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoActualizarDatosCliente> asyncCallback, ReqAltaSuperToken requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResActualizarDatosCliente, DtoActualizarDatosCliente>(Services._serviceActualizarDatosCliente, asyncCallback, json._jsonActualizarDatosCliente);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResActualizarDatosCliente, DtoActualizarDatosCliente, ReqAltaSuperToken>(service._serviceAltaSuperToken, asyncCallback, requestData); }).Start();
#endif
        }
Example #12
0
        public static void ValidaPreguntaRetoS2U(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoValidaPreguntaRetoS2U> asyncCallback, ReqValidaPreguntaRetoS2U requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResValidaPreguntaRetoS2U, DtoValidaPreguntaRetoS2U>(Services._serviceValidaPreguntaRetoS2U, asyncCallback, json._jsonValidaPreguntaRetoS2U);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResValidaPreguntaRetoS2U, DtoValidaPreguntaRetoS2U, ReqValidaPreguntaRetoS2U>(service._serviceValidaPreguntaRetoS2U, asyncCallback, requestData); }).Start();
#endif
        }
Example #13
0
        public static void LoginRSA(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoLoginRSA> asyncCallback, ReqLoginRSA requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResLoginRSA, DtoLoginRSA>(Services._serviceLoginRSA, asyncCallback, json._jsonLoginRSA);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResLoginRSA, DtoLoginRSA, ReqLoginRSA>(service._serviceLoginRSA, asyncCallback, requestData); }).Start();
#endif
        }
Example #14
0
        public static void AfiliarSupermovil(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<string> asyncCallback, ReqAfiliarSupermovil requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResAfiliarSupermovil, string>(Services._serviceAfiliarSupermovil, asyncCallback, json._jsonAfiliarSupermovil);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResAfiliarSupermovil, string, ReqAfiliarSupermovil>(service._serviceAfiliarSupermovil, asyncCallback, requestData); }).Start();
#endif
        }
Example #15
0
        public static void GetCatalogoImagenesPreguntas(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoGetCatalogoImagenesPreguntas> asyncCallback)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResGetCatalogoImagenesPreguntas, DtoGetCatalogoImagenesPreguntas>(Services._serviceGetCatalogoImagenesPreguntas, asyncCallback, json._jsonGetCatalogoImagenesPreguntas);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResGetCatalogoImagenesPreguntas, DtoGetCatalogoImagenesPreguntas>(service._serviceGetCatalogoImagenesPreguntas, asyncCallback); }).Start();
#endif
        }
Example #16
0
 public static void ActivacionSoftTokenPrivado(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoActivacionSoftToken> asyncCallback, ReqActivacionSoftTokenPrivada requestData)
 {
     new Thread(() => { serviceRequest.BeginWebRequest<ResActivacionSoftToken, DtoActivacionSoftToken, ReqActivacionSoftTokenPrivada>(service._serviceActivacionSoftTokenPrivado, asyncCallback, requestData); }).Start();
 }
Example #17
0
 public static void ConsultarEstatusST(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoEstatusSoftToken> asyncCallback)
 {
     new Thread(() => { serviceRequest.BeginWebRequest<ResEstatusSoftToken, DtoEstatusSoftToken>(service._serviceConsultarEstatusST, asyncCallback); }).Start();
 }
Example #18
0
        public static void GetSrvActivos(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<List<ServicioActivo>> asyncCallback, ReqGetSrvActivos requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResGetSrvActivos, List<ServicioActivo>>(Services._serviceGetSrvActivos, asyncCallback, json._jsonGetSrvActivos);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResGetSrvActivos, List<ServicioActivo>, ReqGetSrvActivos>(service._serviceGetSrvActivos, asyncCallback, requestData); }).Start();
#endif
        }
Example #19
0
 public static void CambioST(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoCambioTF> asyncCallback)
 {
     new Thread(() => { serviceRequest.BeginWebRequest<ResCambioTF, DtoCambioTF>(service._serviceCambioTF, asyncCallback); }).Start();
 }
Example #20
0
        public static void BorrarSrv(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoBorrarSrv> asyncCallback, ReqBorrarSrv requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResBorrarSrv, DtoBorrarSrv>(Services._serviceBorrarSrv, asyncCallback, json._jsonBorrarSrv);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResBorrarSrv, DtoBorrarSrv, ReqBorrarSrv>(service._serviceBorrarSrv, asyncCallback, requestData); }).Start();
#endif
        }
Example #21
0
        public static void SincronizarSoftToken(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoSincronizacionST> asyncCallback, ReqSincronizacionST requestData)
        {
            new Thread(() => { serviceRequest.BeginWebRequest<ResSincronizacionST, DtoSincronizacionST, ReqSincronizacionST>(service._serviceSincronizarST, asyncCallback, requestData); }).Start();

        }
Example #22
0
        public static void ValidarNipDesbloqueo(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<string> asyncCallback, ReqValidarNipDesbloqueo requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResValidarNipDesbloqueo, string>(Services._serviceValidarNipDesbloqueo, asyncCallback, json._jsonValidarNipDesbloqueo);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResValidarNipDesbloqueo, string, ReqValidarNipDesbloqueo>(service._serviceValidarNipDesbloqueo, asyncCallback, requestData); }).Start();
#endif
        }
Example #23
0
        public static void GetLstBanco(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoGetLstBanco> asyncCallback)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResGetLstBanco, DtoGetLstBanco>(Services._serviceGetLstBanco, asyncCallback, json._jsonGetLstBanco);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResGetLstBanco, DtoGetLstBanco>(service._serviceGetLstBanco, asyncCallback); }).Start();
#endif
        }
Example #24
0
        public static void IniActualizaImgS2U(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoIniActualizaImgS2U> asyncCallback, ReqIniActualizaImgS2U requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResIniActualizaImgS2U, DtoIniActualizaImgS2U>(Services._serviceIniActualizaImgS2U, asyncCallback, json._jsonIniActualizaImgS2U);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResIniActualizaImgS2U, DtoIniActualizaImgS2U, ReqIniActualizaImgS2U>(service._serviceIniActualizaImgS2U, asyncCallback, requestData); }).Start();
#endif
        }
Example #25
0
        public static void GetCuentasPropiasConsulta(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<List<Cuenta>> asyncCallback)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResGetCuentasPropiasConsulta, List<Cuenta>>(service._serviceGetCuentasPropiasConsulta, asyncCallback, json._jsonGetCuentasPropiasConsulta);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResGetCuentasPropiasConsulta, List<Cuenta>>(service._serviceGetCuentasPropiasConsulta, asyncCallback); }).Start();
#endif
        }
Example #26
0
        public static void ConsultaImagenAltaBajaSrv(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<MemoryStream> asyncCallback, ReqConsultaImagenAltaBajaSrv requestData)
        {
#if OFFLINE
            return;
#endif
            new Thread(() => { serviceRequest.BeginWebRequestImage<ReqConsultaImagenAltaBajaSrv>(service._serviceConsultaImagenAltaBajaSrv, asyncCallback, requestData); }).Start();
        }
Example #27
0
        public static void InitEnvioNotifiacion(ServiceRequest2 serviceRequest, ServiceRequestEventHandler asyncCallback, ReqEnvioNotifiacion requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline(Services._serviceEnvioNotifiacion, asyncCallback, json._jsonEnvioNotifiacion);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ReqEnvioNotifiacion>(service._serviceEnvioNotifiacion, asyncCallback, requestData); }).Start();
#endif
        }
Example #28
0
        public static void ValidaToken(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoValidaToken> asyncCallback, ReqValidarToken requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResValidaToken, DtoValidaToken>(service._serviceValidarToken, asyncCallback, json._jsonValidaTokenTemporal);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResValidaToken, DtoValidaToken, ReqValidarToken>(service._serviceValidarToken, asyncCallback, requestData); }).Start();
#endif
        }
Example #29
0
        // Code to execute when the application is activated (brought to foreground)
        // This code will not execute when the application is first launched
        private void Application_Activated(object sender, ActivatedEventArgs e)
        {
            if (timer == null)
            {
                timer = new System.Threading.Timer((_) =>
                {
                    this.RootFrame.Dispatcher.BeginInvoke(() =>
                    {
                        if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() && !this.IsNetworkAvailable)
                        {
                            this.IsNetworkAvailable = false;
                            MessageBox.Show(TextosFront.frontMensajeConexionInternet);
                        }
                        else
                        {
                            this.IsNetworkAvailable = true;
                        }
                    });
                });
                timer.Change(0, 5000);
            }

            serviceRequest = new ServiceRequest2();
            Santander.DataAccess.Services.InitializeServices();
            Santander.DataAccess.Jsons.InitializeJsons();
            Santander.View.Views.InitializeViews();
            bool statusLoadCliente = false;
            bool sesionInit = false;

            IsolatedStorageSettings.ApplicationSettings.TryGetValue("Cuentas", out this.Cuentas);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("Tarjetas", out this.Tarjetas);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("TotalCuentas", out this.TotalCuentas);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("FechaActual", out this.fechaActual);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("EstatusToken", out this.EstatusToken);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("EstatusSoftToken", out this.EstatusSoftToken);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("ZonaToken", out TokenManager.ZONA);
            IsolatedStorageSettings.ApplicationSettings.TryGetValue("LastOtp", out TokenManager.lastOtp);


            if (IsolatedStorageSettings.ApplicationSettings.TryGetValue("SesionIniciada", out sesionInit))
                this.SesionIniciada = sesionInit;
            if (this.SesionIniciada)
            {
                if (PhoneApplicationService.Current.State.ContainsKey("loadClienteStatus"))
                {
                    statusLoadCliente = (bool)PhoneApplicationService.Current.State["loadClienteStatus"];
                    if (statusLoadCliente)
                    {
                        clienteLSP = new ClienteLoadSaveP();
                        if (clienteLSP.loadClient())
                        {

                            System.Diagnostics.Debug.WriteLine("cliente cargado");

                            this.cliente.getFechaActual();
                            this.cliente.ClienteLoad = statusLoadCliente;
                        }
                    }
                    this.loadSaveCliente = true;
                }
            }

            this.matrix = Validaciones.cargarCSVResToken();
        }
Example #30
0
        public static void AnalyzeS2U(ServiceRequest2 serviceRequest, ServiceRequestEventHandler<DtoAnalyzeS2U> asyncCallback, ReqAnalyzeS2U requestData)
        {
#if OFFLINE
            serviceRequest.BeginWebRequestOffline<ResAnalyzeS2U, DtoAnalyzeS2U>(Services._serviceAnalyzeS2U, asyncCallback, json._jsonAnalyzeS2U);
#else
            new Thread(() => { serviceRequest.BeginWebRequest<ResAnalyzeS2U, DtoAnalyzeS2U, ReqAnalyzeS2U>(service._serviceAnalyzeS2U, asyncCallback, requestData); }).Start();
#endif
        }