public static async Task <bool> ObtenerVentasPendientes() { bool Respueta = false; await Task.Run(() => { TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); Respueta = cliente.OBTENER_VENTAS_PENDIENTES_POR_TERMINAL_SEMI_AUTOMATIC(TSSalesApp.vTerminal.nropos); } catch (Exception ex) { Respueta = false; } 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> 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> 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); }
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> 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); }
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); }
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); }
public static async Task <LoginEstado> AutenticateDeposito() { LoginEstado Respuesta = LoginEstado.ErrorSistema; await Task.Run(() => { TS_BELoginVendedor input = new TS_BELoginVendedor() { cdempresa = TSLoginApp.CurrentEmpresa.cdempresa, usuario = UserNameVenderdor, clave = PasswordVenderdor }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _AUTENTICAR_DEPOSITO_GRIFEROCompleted(cliente.AUTENTICAR_DEPOSITO_GRIFERO(input)); Respuesta = LoginEstado.EsperandoRespuesta; } catch { Respuesta = LoginEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(Respuesta); }
public static async Task <LoginEstado> AutorizeLoginConfiguracionLados(string usuario, string clave) { LoginEstado respuesta = LoginEstado.ErrorSistema; await Task.Run(() => { TS_BELoginVendedor input = new TS_BELoginVendedor() { cdempresa = TSLoginApp.CurrentEmpresa.cdempresa, usuario = usuario, clave = clave }; TS_SIImpresionClient cliente = null; try { cliente = new TS_SIImpresionClient(Helper.ServicioSoapBinding(), new EndpointAddress(Config.Services.Impresion)); _AUTENTICAR_CONFIGURACION_LADOSCompleted(cliente.AUTENTICAR_CONFIGURACION_LADOS(input)); respuesta = LoginEstado.EsperandoRespuesta; } catch { respuesta = LoginEstado.ErrorSistema; } finally { if (cliente != null) { if (cliente.State == CommunicationState.Opened) { cliente.Close(); } } } }); return(respuesta); }
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); }