public static async Task <PrintEstado> ProcesaEliminarGriferoCara() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_BELadoEInput input = new TS_BELadoEInput() { lado = Lado, nropos = NroPos }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _ELIMINAR_GRIFERO_LADOSCompleted(cliente.ELIMINAR_GRIFERO_LADOS(input)); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
protected override async void OnAppearing() { base.OnAppearing(); if (Cargado) { return; } PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(delegate { TSPrintApp.ObtenerGrifero += TSPrintApp_ObtenerGrifero;; resultado = TSPrintApp.ReporteGrifero().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } }
public static async Task <PrintEstado> ProcesaReImpresionUltimoDocumento() { PrintEstado Respuesta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_BEUltimoDocumentoInput input = new TS_BEUltimoDocumentoInput() { nropos = NroPos, imprimir = true }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _OBTENER_ULTIMO_DOCUMENTO_IMPRESOCompleted(cliente.OBTENER_ULTIMO_DOCUMENTO_IMPRESO(input)); Respuesta = PrintEstado.EsperandoRespuesta; } catch { Respuesta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respuesta); }
private async void Delete() { if (itemIndex != null) { TSPrintApp.nroDeposito = itemIndex.nrodeposito; TSPrintApp.turno = itemIndex.turno.ToString(); TSPrintApp.NroPos = itemIndex.nropos; this.busyindicator.IsVisible = true; PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(() => { TSPrintApp.EliminaDepositos += TSPrintApp_EliminaDepositos; resultado = TSPrintApp.ProcesaEliminarDeposito().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } } this.listView.ResetSwipe(); }
private async void ObtenerReportesDepositos() { PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(() => { TSPrintApp.ObtenerDepositos += _TSPrintApp_ObtenerDepositos; resultado = TSPrintApp.ObtenerReporteDepositos().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } }
protected override async void OnAppearing() { base.OnAppearing(); if (Cargado) { return; } Cargado = true; PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(() => { TSPrintApp.ObtenerInicioDia += TSPrintApp_ObtenerInicioDia; resultado = TSPrintApp.ProcesaIncioDia(cdusuario).Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } }
protected override async void OnAppearing() { base.OnAppearing(); if (Cargado) { return; } Cargado = true; TSPrintApp.ig_bloque_playa = Convert.ToBoolean(1);; TSPrintApp.imprimir = Convert.ToBoolean(0); PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(delegate { TSPrintApp.ObtenerCierreX += _ObtenerCierreX; resultado = TSPrintApp.ObtenerReporteCierreX().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } }
protected override async void OnAppearing() { base.OnAppearing(); if (Cargado) return; Cargado = true; PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(delegate { TSPrintApp.RegistraGriferoCara += TSPrintApp_RegistraDepositos; resultado = TSPrintApp.ProcesaRegistraGriferoCara().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); await Navigation.PopAsync(); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); await Navigation.PopAsync(); break; } } }
public static async Task <PrintEstado> ReporteGriferoCara() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _OBTENER_GRIFERO_LADOSCompleted(cliente.OBTENER_GRIFERO_LADOS((TSSalesApp.vTerminal.nropos ?? ""))); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
public static async Task <PrintEstado> ProcesaCambioTurno() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _OBTENER_CAMBIO_TURNOCompleted(cliente.OBTENER_CAMBIO_TURNO(true, false)); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
public static async Task <PrintEstado> ProcesaIncioDia(string cdusuario) { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _OBTENER_INICIO_DIACompleted(cliente.OBTENER_INICIO_DIA((TSLoginApp.Serie ?? ""), (cdusuario ?? ""))); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
public static async Task <PrintEstado> ObtenerReporteDepositos() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _CONSULTAR_DEPOSITOSCompleted(cliente.CONSULTAR_DEPOSITOS((TSSalesApp.vTerminal.nropos ?? ""), (TSLoginApp.UserNameVenderdor ?? ""))); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
public static async Task <PrintEstado> ReporteGrifero() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _OBTENER_VENDEDORESCompleted(cliente.OBTENER_VENDEDORES((TSLoginApp.CurrentEmpresa.cdempresa ?? ""))); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
protected override async void OnAppearing() { base.OnAppearing(); if (contexto.IsLoaded) { return; } contexto.IsLoaded = true; TSPrintApp.imprimir = true; TSPrintApp.NroPos = TSSalesApp.vTerminal.nropos; PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(() => { TSPrintApp.UltimoDocumento += _ImprimirUltimoDoc; resultado = TSPrintApp.ProcesaReImpresionUltimoDocumento().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: contexto.IsSearchEnd("Su dispositivo no cuenta con internet en estos momentos."); break; case PrintEstado.ErrorSistema: contexto.IsSearchEnd("Hubo un problema de comunicación con el servidor, por favor intente después."); break; } } }
private async void getDocuments() { TSPrintApp.NroPos = TSSalesApp.vTerminal.nropos; TSPrintApp.Cdtipodoc = ((TipoComprobate)this.cboDocuments.SelectedItem).Nro; TSPrintApp.Nrodocumento = this.txtCodigoDescription.Text; PrintEstado resultado = PrintEstado.ErrorSistema; busyindicator.IsVisible = true; await Task.Run(() => { TSPrintApp.ListarDocumentos += TSPrintApp_ListarDocumentos; resultado = TSPrintApp.ObtenerListarDocumentos().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { busyindicator.IsVisible = false; switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } }
public static async Task <PrintEstado> ProcesaRegistra() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_BEDepositoInput input = new TS_BEDepositoInput() { cdtppago = cdtppago, mtodolares = mtodolares, mtosoles = mtosoles, nrosobres = nrosobres, cdvendedor = TSLoginApp.UserNameVenderdor, nropos = TSSalesApp.vTerminal.nropos, turno_anterior = TurnoAnterior }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _REGISTRAR_DEPOSITOCompleted(cliente.REGISTRAR_DEPOSITO(input)); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
public static async Task <PrintEstado> ObtenerReporteCierreX() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_BEXCierreInput input = new TS_BEXCierreInput() { ignorar_bloqueo_playa = ig_bloque_playa, imprimir = imprimir, nropos = TSSalesApp.vTerminal.nropos, usuario = TSLoginApp.UserFull }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _OBTENER_CIERRE_XCompleted(cliente.OBTENER_CIERRE_X(input)); Respueta = PrintEstado.EsperandoRespuesta; } catch (Exception ex) { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
protected override async void OnAppearing() { base.OnAppearing(); if (Cargado) { return; } Cargado = true; TSPrintApp.Cdtipodoc = DocumentoInput.cdtipodoc; TSPrintApp.Nrodocumento = DocumentoInput.nrodocumento; TSPrintApp.NroSerieMaq = DocumentoInput.nroseriemaq; TSPrintApp.NroPos = DocumentoInput.nropos; TSPrintApp.imprimir = DocumentoInput.imprimir; TSPrintApp.fecha = DocumentoInput.fecha; PrintEstado resultado = PrintEstado.ErrorSistema; await Task.Run(() => { TSPrintApp.ReimprimirDocumentos += _ReImprimirDocumento; resultado = TSPrintApp.ProcesaReImprimirDocumento().Result; }); if (resultado != PrintEstado.EsperandoRespuesta) { switch (resultado) { case PrintEstado.ErrorInternet: await DisplayAlert("Aviso", "Su dispositivo no cuenta con internet en estos momentos.", "Aceptar"); break; case PrintEstado.ErrorSistema: await DisplayAlert("Aviso", "Hubo un problema de comunicación con el servidor, por favor intente después.", "Aceptar"); break; } } }
public static async Task <PrintEstado> ProcesaEliminarDeposito() { PrintEstado Respueta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_BEDepositoEInput input = new TS_BEDepositoEInput() { nrodeposito = nroDeposito, turno = turno, nropos = NroPos, }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _ELIMINAR_DEPOSITOCompleted(cliente.ELIMINAR_DEPOSITO(input)); Respueta = PrintEstado.EsperandoRespuesta; } catch { Respueta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respueta); }
public static async Task <PrintEstado> ObtenerListarDocumentos() { PrintEstado Respuesta = PrintEstado.ErrorSistema; await Task.Run(() => { TS_BEReimpresionLInput input = new TS_BEReimpresionLInput() { nropos = NroPos, nrodocumento = Nrodocumento, cdtipodoc = Cdtipodoc }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _LISTAR_DOCUMENTOS_REIMPRESIONCompleted(cliente.LISTAR_DOCUMENTOS_REIMPRESION(input)); Respuesta = PrintEstado.EsperandoRespuesta; } catch { Respuesta = PrintEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respuesta); }