From e4f8386039d5bbdd4c3b3341ce53b41c7df89892 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 2 Oct 2021 13:26:45 -0700 Subject: [PATCH] mejora --- Ashx/SIGWeb.ashx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 5f30eea0e..fdc3a076d 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -595,8 +595,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If DtRetorno = dt.FiltraParametros(String.Format("NombreComercial like '%{0}%' OR Nombre like '%{0}%' ", Name)) + dt.Dispose() End If - dt.Dispose() + End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then @@ -617,6 +618,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState context.Response.Write("[]") End If DtRetorno.Dispose() + DtRetorno = Nothing Return retorno End Function @@ -671,10 +673,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState retorno = JsonConvert.SerializeObject(DtRetorno).ToString context.Response.Write(retorno) DtRetorno.Dispose() + DtRetorno = Nothing Else context.Response.Write("[]") End If - DtRetorno.Dispose() + Return retorno End Function #End Region @@ -946,6 +949,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString context.Response.Write(retorno) DtPSRetorno.Dispose() + DtPSRetorno = Nothing Else context.Response.Write("[]") End If