GPS. metodo para obtener rutas en webs service

This commit is contained in:
2022-06-18 14:28:45 -07:00
parent 1d3c44dd57
commit 2b5e7c9b61

View File

@@ -1150,6 +1150,44 @@ Public Class WSGPSApp
End Function
<WebMethod>
Public Function GetGeoRutas(CveCliente As Integer, CveDispositivo As Integer) As String
Dim CveGeoReferencia As Integer = -1
Dim DtRutas As DataTable = Nothing
Using ObjGPS As New ClsGPS
If ObjGPS.GetReferenciaDetalle(-1, -1, CveDispositivo, CveCliente) Then
CveGeoReferencia = ObjGPS.DtResultados.FiltroPrimeroValor("CveGeoReferencia", "Tipo = 'Ruta'").ToEntero()
End If
If CveGeoReferencia > 0 Then
If ObjGPS.GeoReferenciaGet(CveGeoReferencia, -1, "Ruta", CveCliente) Then
DtRutas = ObjGPS.DtResultados.Copy()
End If
End If
End Using
Dim Rutas As New List(Of Object)
If CveGeoReferencia > 0 Then
For Each Row As DataRow In DtRutas.Rows
Dim Coordenadas As List(Of MWSGeolocation2) = SQLToGmapsPolyline(Row("Coordenadas").ToString())
Rutas.Add(New With {
.CveRuta = CveGeoReferencia,
.Ruta = Row("GeoReferencia").ToString(),
.Folio = "",
.Fecha = Row("FechaInicio").ToString(),
.CveDispositivo = CveDispositivo,
.CveUsuarioIngreso = -1,
.Coordenadas = Coordenadas
})
Next
End If
Return JsonConvert.SerializeObject(Rutas)
End Function
<WebMethod>
Public Function GetRutas(CveCliente As Integer, CveRuta As Integer, MostrarPuntos As Boolean) As String
Dim DtRutas As DataTable = Nothing