Correcion de bug
This commit is contained in:
@@ -65,13 +65,20 @@ Public Class WsTSoft
|
||||
If Continuar Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng")
|
||||
For Each Dir As JObject In Direcciones
|
||||
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
|
||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
|
||||
Try
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
|
||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
|
||||
Catch ex As Exception
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
Else
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
End If
|
||||
@@ -103,17 +110,25 @@ Public Class WsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||
Dim objRem As New GetRemisionHistorialesObj
|
||||
If Continuar Then
|
||||
Dim Dt = objTsoft.DtResultados.Copy()
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
Try
|
||||
Dim Dt = objTsoft.DtResultados.Copy()
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
|
||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = ""
|
||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = ""
|
||||
Catch ex As Exception
|
||||
objRem.CurrentError = "Ocurrió un error al asignar las direcciones"
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
Else
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
@@ -129,11 +144,17 @@ Public Class WsTSoft
|
||||
Dim objTsoft As New ClsTSoft
|
||||
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
||||
If objTsoft.DtResultados.Rows.Count > 0 Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
For Each Dir As JObject In Direcciones
|
||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
Try
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
retorno = objTsoft.DtResultados.DataTableToJSONIPP()
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user