From 2a4135d4614ae94115bfeba805d5cb0794d46d0e Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 24 Sep 2021 14:40:56 -0700 Subject: [PATCH] limpieza de getclientes --- Ashx/SIGWeb.ashx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 57248f917..5f30eea0e 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -600,6 +600,15 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then + Dim i As Integer = 0 'limpieza de columnas + While i < DtRetorno.Columns.Count + If Not DtRetorno.Columns(i).ColumnName.Contiene("CveCliente", ColumnaNombre) Then + DtRetorno.Columns.RemoveAt(i) + Else + i = i + 1 + End If + End While + DtRetorno.Columns("CveCliente").ColumnName = "id" DtRetorno.Columns(ColumnaNombre).ColumnName = "text" retorno = JsonConvert.SerializeObject(DtRetorno).ToString @@ -913,7 +922,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState DtPSRetorno = DTTmp.Copy Else - 'no regresar datos herror al consultar + 'no regresar datos error al consultar DtPSRetorno.Clear() End If DTTmp.Dispose()