From 2ddd967b16406c12170ca607a7d93fedc4d35b24 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 16 Mar 2023 15:43:32 -0700 Subject: [PATCH] Log de descarga de pdf --- Ashx/E141.ashx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index dbca48046..0bfb003be 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -102,12 +102,17 @@ Public Class E141 : Implements IHttpHandler 'DESCARGA DEL PDF If Not String.IsNullOrEmpty(Params) Then - Dim UrlParametros As Hashtable = Parametros(Decripta(Params)) + Try + Dim UrlParametros As Hashtable = Parametros(Decripta(Params)) + + Dim File As String = UrlParametros("FILE").ToString() + If Not String.IsNullOrEmpty(File) Then + ImprimirbytesPDF(context, DescargarFactura(File), File) + End If + Catch ex As Exception + GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141") + End Try - Dim File As String = UrlParametros("FILE").ToString() - If Not String.IsNullOrEmpty(File) Then - ImprimirbytesPDF(context, DescargarFactura(File), File) - End If Else Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())