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