-- cambios stringbuilder, performance
This commit is contained in:
@@ -2041,12 +2041,16 @@ Public Class ClsSisNotificaciones
|
|||||||
|
|
||||||
Using wc As New HttpClient()
|
Using wc As New HttpClient()
|
||||||
Try
|
Try
|
||||||
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php")
|
Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
|
||||||
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
|
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
|
||||||
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
|
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
|
||||||
Dim response = wc.PostAsync(Url, content).Result
|
Dim response = wc.PostAsync(Url, content).Result
|
||||||
Dim result = response.Content.ReadAsStringAsync().Result
|
Dim result = response.Content.ReadAsStringAsync().Result
|
||||||
retorno = JArray.Parse(result)
|
retorno = JArray.Parse(result)
|
||||||
|
response.Dispose()
|
||||||
|
content = Nothing
|
||||||
|
Url = Nothing
|
||||||
|
FormStuff = Nothing
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener las direcciones", ex)
|
OnError("Ocurrió un error al obtener las direcciones", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Retorno = 200
|
Retorno = 200
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
Empresa = Nothing
|
||||||
'context.Response.Write(CveUsuario.ToString())
|
'context.Response.Write(CveUsuario.ToString())
|
||||||
context.Response.StatusCode = Retorno
|
context.Response.StatusCode = Retorno
|
||||||
End Sub
|
End Sub
|
||||||
@@ -114,7 +114,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
context.Response.WriteFile(FileInfo.FullName)
|
context.Response.WriteFile(FileInfo.FullName)
|
||||||
context.Response.End()
|
context.Response.End()
|
||||||
End If
|
End If
|
||||||
|
FileInfo = Nothing
|
||||||
|
Url = ""
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -127,6 +128,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
savepath = context.Server.MapPath(tempPath)
|
savepath = context.Server.MapPath(tempPath)
|
||||||
Dim nombre As String = String.Format("{0}\{1}", savepath, context.Request("nombre"))
|
Dim nombre As String = String.Format("{0}\{1}", savepath, context.Request("nombre"))
|
||||||
File.Delete(nombre)
|
File.Delete(nombre)
|
||||||
|
tempPath = ""
|
||||||
|
savepath = ""
|
||||||
context.Response.StatusCode = 200
|
context.Response.StatusCode = 200
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -149,16 +152,18 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
If copyFile <> "" Then
|
If copyFile <> "" Then
|
||||||
Dim ext As Integer = copyFile.IndexOf(","c) + 1
|
Dim ext As Integer = copyFile.IndexOf(","c) + 1
|
||||||
|
|
||||||
Dim extncion As String = copyFile.Substring(5, ext - 5)
|
Dim extension As String = copyFile.Substring(5, ext - 5)
|
||||||
If extncion.Contains("image/") Then extncion = extncion.Replace("image/", "").Replace(";base64,", "")
|
If extension.Contains("image/") Then extension = extension.Replace("image/", "").Replace(";base64,", "")
|
||||||
'Dim extncion As String =
|
'Dim extncion As String =
|
||||||
filename = String.Format("{0}-{1}.{2}", tick, Cve, extncion)
|
filename = String.Format("{0}-{1}.{2}", tick, Cve, extension)
|
||||||
|
|
||||||
Dim msf As New MemoryStream(Convert.FromBase64String(copyFile.Substring(ext)))
|
Dim msf As New MemoryStream(Convert.FromBase64String(copyFile.Substring(ext)))
|
||||||
Dim stem As Stream = New FileStream(String.Format("{0}\{1}", savepath, filename), FileMode.Create)
|
Dim stem As Stream = New FileStream(String.Format("{0}\{1}", savepath, filename), FileMode.Create)
|
||||||
msf.WriteTo(stem)
|
msf.WriteTo(stem)
|
||||||
msf.Close()
|
msf.Close()
|
||||||
stem.Close()
|
stem.Close()
|
||||||
|
msf.Dispose()
|
||||||
|
stem.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -166,10 +171,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
postedFile = context.Request.Files(0)
|
postedFile = context.Request.Files(0)
|
||||||
filename = String.Format("{0}-{1}", tick, postedFile.FileName)
|
filename = String.Format("{0}-{1}", tick, postedFile.FileName)
|
||||||
|
|
||||||
postedFile.SaveAs((savepath & "\") + filename)
|
postedFile.SaveAs(String.Format("{0}\{1}", savepath, filename))
|
||||||
End If
|
End If
|
||||||
context.Response.Write(tick)
|
context.Response.Write(tick)
|
||||||
context.Response.StatusCode = 200
|
context.Response.StatusCode = 200
|
||||||
|
savepath = ""
|
||||||
|
tempPath = "" : filename = ""
|
||||||
|
postedFile = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -206,9 +214,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
'End If
|
'End If
|
||||||
'ObjClientes.Dispose()
|
'ObjClientes.Dispose()
|
||||||
|
|
||||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
DtRetorno = dt.FiltraParametros($"NombreComercial like '%{Name}%' OR Nombre like '%{Name}%' ")
|
DtRetorno = dt.FiltraParametros(String.Format("NombreComercial like '%{0}%' OR Nombre like '%{0}%' ", Name))
|
||||||
End If
|
End If
|
||||||
dt.Dispose()
|
dt.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -254,9 +262,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
' DtRetorno = ObjProveedores.DtResultados
|
' DtRetorno = ObjProveedores.DtResultados
|
||||||
'End If
|
'End If
|
||||||
'ObjProveedores.Dispose()
|
'ObjProveedores.Dispose()
|
||||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'")
|
DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name))
|
||||||
End If
|
End If
|
||||||
dt.Dispose()
|
dt.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -321,6 +329,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Else
|
Else
|
||||||
context.Response.Write("[]")
|
context.Response.Write("[]")
|
||||||
End If
|
End If
|
||||||
|
DtPSRetorno.Dispose()
|
||||||
|
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
@@ -485,9 +494,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
If usuario.TienePermisoProceso(300) And usuario.TienePermisoProceso(301) Then
|
If usuario.TienePermisoProceso(300) And usuario.TienePermisoProceso(301) Then
|
||||||
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados
|
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados
|
||||||
ElseIf usuario.TienePermisoProceso(300) Then 'TipoComprobacion 1 Biaticos
|
ElseIf usuario.TienePermisoProceso(300) Then 'TipoComprobacion 1 Viaticos
|
||||||
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1")
|
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1")
|
||||||
Else 'TipoComprobacion 2 Compreobacines
|
Else 'TipoComprobacion 2 caja chica
|
||||||
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2")
|
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -515,6 +524,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
'no regresar datos herror al consultar
|
'no regresar datos herror al consultar
|
||||||
DtPSRetorno.Clear()
|
DtPSRetorno.Clear()
|
||||||
End If
|
End If
|
||||||
|
DTTmp.Dispose()
|
||||||
|
ObjClasificaciones.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -556,7 +567,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
#Region "Funciones"
|
#Region "Funciones"
|
||||||
Public Function GetJson(ByVal dt As DataTable) As String
|
Public Function GetJson(ByVal dt As DataTable) As String
|
||||||
|
Dim Retorno As String = ""
|
||||||
Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer()
|
Dim serializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer()
|
||||||
Dim rows As New List(Of Dictionary(Of String, Object))
|
Dim rows As New List(Of Dictionary(Of String, Object))
|
||||||
Dim row As Dictionary(Of String, Object)
|
Dim row As Dictionary(Of String, Object)
|
||||||
@@ -568,7 +579,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Next
|
Next
|
||||||
rows.Add(row)
|
rows.Add(row)
|
||||||
Next
|
Next
|
||||||
Return serializer.Serialize(rows)
|
If dt IsNot Nothing Then dt.Dispose()
|
||||||
|
Retorno = serializer.Serialize(rows)
|
||||||
|
rows = Nothing
|
||||||
|
serializer = Nothing
|
||||||
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
|
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
|
||||||
Get
|
Get
|
||||||
@@ -631,6 +646,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
DtPSRetorno.Columns("ClaveNombre").ColumnName = "text"
|
DtPSRetorno.Columns("ClaveNombre").ColumnName = "text"
|
||||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
|
DtPSRetorno.Dispose()
|
||||||
Else
|
Else
|
||||||
context.Response.Write("[]")
|
context.Response.Write("[]")
|
||||||
End If
|
End If
|
||||||
@@ -738,6 +754,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
DtPSRetorno = Nothing
|
DtPSRetorno = Nothing
|
||||||
End Try
|
End Try
|
||||||
|
DTPS = Nothing
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -745,6 +763,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
DtPSRetorno.Columns("CvePS").ColumnName = "id"
|
DtPSRetorno.Columns("CvePS").ColumnName = "id"
|
||||||
DtPSRetorno.Columns("PSCodigo").ColumnName = "text"
|
DtPSRetorno.Columns("PSCodigo").ColumnName = "text"
|
||||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||||
|
DtPSRetorno.Dispose()
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
Else
|
Else
|
||||||
context.Response.Write("[]")
|
context.Response.Write("[]")
|
||||||
@@ -795,6 +814,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
DtRetorno.Columns("CvePersonal").ColumnName = "id"
|
DtRetorno.Columns("CvePersonal").ColumnName = "id"
|
||||||
DtRetorno.Columns("NombreCompleto").ColumnName = "text"
|
DtRetorno.Columns("NombreCompleto").ColumnName = "text"
|
||||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||||
|
DtRetorno.Dispose()
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
Else
|
Else
|
||||||
context.Response.Write("[]")
|
context.Response.Write("[]")
|
||||||
|
|||||||
@@ -544,6 +544,7 @@ Partial Class Inicio
|
|||||||
SBJSScript.AppendFormat("graficahighcharts2('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}]);", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, SBPie1, SBPie2)
|
SBJSScript.AppendFormat("graficahighcharts2('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}]);", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, SBPie1, SBPie2)
|
||||||
|
|
||||||
RegistraScript(SBJSScript.ToString, Indicador)
|
RegistraScript(SBJSScript.ToString, Indicador)
|
||||||
|
DTDatos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub MuestraGrafica(DTDatos As DataTable, ColTitle As String, ColValue As String, TipoDato As String, DivId As String)
|
Private Sub MuestraGrafica(DTDatos As DataTable, ColTitle As String, ColValue As String, TipoDato As String, DivId As String)
|
||||||
Dim Info As String = ""
|
Dim Info As String = ""
|
||||||
@@ -912,7 +913,7 @@ Partial Class Inicio
|
|||||||
Next
|
Next
|
||||||
grafica.series.Add(serie)
|
grafica.series.Add(serie)
|
||||||
Next
|
Next
|
||||||
|
data.Dispose()
|
||||||
End If
|
End If
|
||||||
Return grafica
|
Return grafica
|
||||||
End Function
|
End Function
|
||||||
@@ -990,6 +991,7 @@ Partial Class Inicio
|
|||||||
grafica.series.Add(serie)
|
grafica.series.Add(serie)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
data.Dispose()
|
||||||
End If
|
End If
|
||||||
Return grafica
|
Return grafica
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -381,7 +381,10 @@ Partial Class Site
|
|||||||
End If
|
End If
|
||||||
HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo)
|
HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo)
|
||||||
BarraNavegacion.Text = HeaderBar.ToString
|
BarraNavegacion.Text = HeaderBar.ToString
|
||||||
CargaMenu(MenuHTML)
|
'CargaMenu(MenuHTML)
|
||||||
|
Menu.Text = MenuHTML.ToString
|
||||||
|
MenuHTML.Clear()
|
||||||
|
HeaderBar.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -413,9 +416,9 @@ Partial Class Site
|
|||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub CargaMenu(Texto As StringBuilder)
|
'Private Sub CargaMenu(Texto As StringBuilder)
|
||||||
Menu.Text = Texto.ToString
|
' Menu.Text = Texto.ToString
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
#Region "Notificaciones"
|
#Region "Notificaciones"
|
||||||
|
|
||||||
@@ -458,6 +461,7 @@ Partial Class Site
|
|||||||
'OC.Dispose()
|
'OC.Dispose()
|
||||||
|
|
||||||
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
|
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
|
||||||
|
Notificaciones.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -474,7 +478,10 @@ Partial Class Site
|
|||||||
|
|
||||||
Dim x509 As New X509Certificate2()
|
Dim x509 As New X509Certificate2()
|
||||||
x509.Import(Data)
|
x509.Import(Data)
|
||||||
Return x509.NotAfter.ToShortDateString()
|
Dim Retorno = x509.NotAfter.ToShortDateString()
|
||||||
|
x509 = Nothing
|
||||||
|
Data = Nothing
|
||||||
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ Public Class WsTSoft
|
|||||||
Inherits System.Web.Services.WebService
|
Inherits System.Web.Services.WebService
|
||||||
|
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
Dim objTsoft As New ClsTSoft
|
Dim objTsoft As New ClsTSoft
|
||||||
objTsoft.IniciaTransacSQL()
|
objTsoft.IniciaTransacSQL()
|
||||||
Dim Continuar As Boolean = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha)
|
Dim Continuar As Boolean = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha)
|
||||||
@@ -34,9 +34,10 @@ Public Class WsTSoft
|
|||||||
objRem.CveRemision = 0
|
objRem.CveRemision = 0
|
||||||
objRem.CurrentError = objTsoft.MyCurrentError
|
objRem.CurrentError = objTsoft.MyCurrentError
|
||||||
End If
|
End If
|
||||||
objTsoft.Dispose()
|
objTsoft.Dispose()
|
||||||
retorno = JsonConvert.SerializeObject(objRem)
|
retorno = JsonConvert.SerializeObject(objRem)
|
||||||
Return retorno.ToString
|
objRem = Nothing
|
||||||
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
@@ -53,8 +54,9 @@ Public Class WsTSoft
|
|||||||
objRem.CurrentError = objTsoft.MyCurrentError
|
objRem.CurrentError = objTsoft.MyCurrentError
|
||||||
End If
|
End If
|
||||||
objTsoft.Dispose()
|
objTsoft.Dispose()
|
||||||
retorno = JsonConvert.SerializeObject(objRem)
|
retorno = JsonConvert.SerializeObject(objRem)
|
||||||
Return retorno.ToString
|
objRem = Nothing
|
||||||
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function GetUltimaPosicion(DevID As String) As String
|
Public Function GetUltimaPosicion(DevID As String) As String
|
||||||
@@ -85,8 +87,9 @@ Public Class WsTSoft
|
|||||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||||
End If
|
End If
|
||||||
ObjGPS.Dispose()
|
ObjGPS.Dispose()
|
||||||
retorno = JsonConvert.SerializeObject(ObjPos)
|
retorno = JsonConvert.SerializeObject(ObjPos)
|
||||||
Return retorno.ToString
|
ObjPos = Nothing
|
||||||
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function TerminoRemision(FolioRemision As String, NoEconomico As String) As String
|
Public Function TerminoRemision(FolioRemision As String, NoEconomico As String) As String
|
||||||
@@ -102,8 +105,9 @@ Public Class WsTSoft
|
|||||||
objRem.CurrentError = objTsoft.MyCurrentError
|
objRem.CurrentError = objTsoft.MyCurrentError
|
||||||
End If
|
End If
|
||||||
objTsoft.Dispose()
|
objTsoft.Dispose()
|
||||||
retorno = JsonConvert.SerializeObject(objRem)
|
retorno = JsonConvert.SerializeObject(objRem)
|
||||||
Return retorno.ToString
|
objRem = Nothing
|
||||||
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String
|
Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String
|
||||||
@@ -136,8 +140,9 @@ Public Class WsTSoft
|
|||||||
objRem.CurrentError = objTsoft.MyCurrentError
|
objRem.CurrentError = objTsoft.MyCurrentError
|
||||||
End If
|
End If
|
||||||
objTsoft.Dispose()
|
objTsoft.Dispose()
|
||||||
retorno = JsonConvert.SerializeObject(objRem)
|
retorno = JsonConvert.SerializeObject(objRem)
|
||||||
Return retorno.ToString
|
retorno = Nothing
|
||||||
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function GetInfoEventos(FechaInicio As String, FechaFin As String) As String
|
Public Function GetInfoEventos(FechaInicio As String, FechaFin As String) As String
|
||||||
@@ -167,7 +172,7 @@ Public Class WsTSoft
|
|||||||
End If
|
End If
|
||||||
objTsoft.Dispose()
|
objTsoft.Dispose()
|
||||||
|
|
||||||
Return retorno.ToString
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function TieneRemisionesActivas(NoEconomico As String) As String
|
Public Function TieneRemisionesActivas(NoEconomico As String) As String
|
||||||
@@ -183,7 +188,8 @@ Public Class WsTSoft
|
|||||||
.CurrentError = ObjTSoft.MyCurrentError
|
.CurrentError = ObjTSoft.MyCurrentError
|
||||||
}
|
}
|
||||||
ObjTSoft.Dispose()
|
ObjTSoft.Dispose()
|
||||||
retorno = JsonConvert.SerializeObject(objRem)
|
retorno = JsonConvert.SerializeObject(objRem)
|
||||||
|
objRem = Nothing
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -203,12 +209,16 @@ Public Class WsTSoft
|
|||||||
|
|
||||||
Using wc As New HttpClient()
|
Using wc As New HttpClient()
|
||||||
Try
|
Try
|
||||||
Dim Url = New Uri($"{ClsPaginas.UrlDirecciones}nominatim/reverseMultiple.php")
|
Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones))
|
||||||
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
|
Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array)
|
||||||
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
|
Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded")
|
||||||
Dim response = wc.PostAsync(Url, content).Result
|
Dim response = wc.PostAsync(Url, content).Result
|
||||||
Dim result = response.Content.ReadAsStringAsync().Result
|
Dim result = response.Content.ReadAsStringAsync().Result
|
||||||
retorno = JArray.Parse(result)
|
retorno = JArray.Parse(result)
|
||||||
|
response.Dispose()
|
||||||
|
content = Nothing
|
||||||
|
Url = Nothing
|
||||||
|
FormStuff = Nothing
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener las direcciones", ex)
|
OnError("Ocurrió un error al obtener las direcciones", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
Reference in New Issue
Block a user