diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index 4f24d2b76..d19cb9541 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -5466,6 +5466,108 @@ Public Class ClsGPS End Function +#End Region + +#Region "K I M B E R L Y - C L A R K" + Public Function AddKimberlyClarkTracking(Dominio As String, Codigo As String, Serie As String, CveDispositivo As Integer, CveUsuarioIngreso As Integer, CveCliente As Integer, CveEmpresa As Integer) As Integer + Dim retorno As Integer = -1 + DataAdapter("PA_GPS_KimberlyClarkTrackingAdd", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@Dominio", SqlDbType.VarChar).Value = Dominio + .Add("@Codigo", SqlDbType.VarChar).Value = Codigo + .Add("@Serie", SqlDbType.VarChar).Value = Serie + .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo + .Add("@CveUsuarioIngreso", SqlDbType.Int).Value = CveUsuarioIngreso + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveKimberlyClarkTracking", SqlDbType.Int).Direction = ParameterDirection.Output + End With + + Try + SqlAdapter.Fill(Data) + retorno = SqlAdapter.SelectCommand.Parameters("@CveKimberlyClarkTracking").Value.ToString.ToEntero + Catch ex As Exception + OnError("Ocurrió un error al agregar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function UpdateKimberlyClarkTrackingEstatus(CveKimberlyClarkTracking As Integer, CveEstatus As Boolean, CveUsuarioModifico As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_KimberlyClarkTrackingUpdate", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveKimberlyClarkTracking", SqlDbType.Int).Value = CveKimberlyClarkTracking + .Add("@CveEstatus", SqlDbType.Bit).Value = CveEstatus + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function GetKimberlyClarkTracking(CveKimberlyClarkTracking As Integer, CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_KimberlyClarkTrackingGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveKimberlyClarkTracking", SqlDbType.Int).Value = CveKimberlyClarkTracking + .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function GetKimberlyClarkTrackingDatos(CveKimberlyClarkTracking As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_KimberlyClarkTrackingGet", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveKimberlyClarkTracking", SqlDbType.Int).Value = CveKimberlyClarkTracking + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los datos de un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function + + Public Function RemoveKimberlyClarkTracking(CveKimberlyClarkTracking As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GPS_KimberlyClarkTrackingRemove", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveKimberlyClarkTracking", SqlDbType.Int).Value = CveKimberlyClarkTracking + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar un tracking.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return retorno + End Function #End Region Protected Sub addParameters(name As String, tipo As SqlDbType, valor As Object) diff --git a/App_WebReferences/WSKimberlyClark/Reference.svcmap b/App_WebReferences/WSKimberlyClark/Reference.svcmap new file mode 100644 index 000000000..e8edb1371 --- /dev/null +++ b/App_WebReferences/WSKimberlyClark/Reference.svcmap @@ -0,0 +1,31 @@ + + + + false + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSKimberlyClark/Service.disco b/App_WebReferences/WSKimberlyClark/Service.disco new file mode 100644 index 000000000..f7c20e50e --- /dev/null +++ b/App_WebReferences/WSKimberlyClark/Service.disco @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSKimberlyClark/Service.wsdl b/App_WebReferences/WSKimberlyClark/Service.wsdl new file mode 100644 index 000000000..926141c97 --- /dev/null +++ b/App_WebReferences/WSKimberlyClark/Service.wsdl @@ -0,0 +1,1435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Autenticacion necesaria para la operacion por parte de los prestadores + + + + + Cierre de sesion explicito por parte del prestador + + + + + Inserta un evento, reconoce el prestador por medio del login previo + + + + + Loguea e inserta multiples eventos en modo batch + + + + + Loguea e inserta un evento + + + + + Loguea e inserta un evento indicando ademas de incorporar los sensores + + + + + + + + + Retorna el primer comando de la lista + + + + + Indica que el comando ya fue procesado + + + + + Metodo para informar el estado del comando, retorna verdadero su fue insertado correctamente + + + + + Metodo para el cambio de clave, retorna verdadero si la clave es realmente cambiada. + + + + + Loguea cambia la clave, retorna verdadero si la clave es realmente cambiada. + + + + + Realiza el login y retorna el primer comando de la lista + + + + + Realiza el login y finaliza un comando + + + + + Realiza el login y actualiza el estado de un comando en proceso + + + + + Realiza el login y retorna el primer comando de la lista + + + + + + + Autenticacion necesaria para la operacion por parte de los prestadores + + + + + Cierre de sesion explicito por parte del prestador + + + + + Inserta un evento, reconoce el prestador por medio del login previo + + + + + Loguea e inserta un evento + + + + + + + + + Retorna el primer comando de la lista + + + + + Indica que el comando ya fue procesado + + + + + Metodo para informar el estado del comando, retorna verdadero su fue insertado correctamente + + + + + Metodo para el cambio de clave, retorna verdadero si la clave es realmente cambiada. + + + + + Loguea cambia la clave, retorna verdadero si la clave es realmente cambiada. + + + + + Realiza el login y retorna el primer comando de la lista + + + + + Realiza el login y finaliza un comando + + + + + Realiza el login y actualiza el estado de un comando en proceso + + + + + Realiza el login y retorna el primer comando de la lista + + + + + + + Autenticacion necesaria para la operacion por parte de los prestadores + + + + + Cierre de sesion explicito por parte del prestador + + + + + Inserta un evento, reconoce el prestador por medio del login previo + + + + + Loguea e inserta un evento + + + + + + + + + Retorna el primer comando de la lista + + + + + Indica que el comando ya fue procesado + + + + + Metodo para informar el estado del comando, retorna verdadero su fue insertado correctamente + + + + + Metodo para el cambio de clave, retorna verdadero si la clave es realmente cambiada. + + + + + Loguea cambia la clave, retorna verdadero si la clave es realmente cambiada. + + + + + Realiza el login y retorna el primer comando de la lista + + + + + Realiza el login y finaliza un comando + + + + + Realiza el login y actualiza el estado de un comando en proceso + + + + + Realiza el login y retorna el primer comando de la lista + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSKimberlyClark/configuration.svcinfo b/App_WebReferences/WSKimberlyClark/configuration.svcinfo new file mode 100644 index 000000000..210b37bc7 --- /dev/null +++ b/App_WebReferences/WSKimberlyClark/configuration.svcinfo @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSKimberlyClark/configuration91.svcinfo b/App_WebReferences/WSKimberlyClark/configuration91.svcinfo new file mode 100644 index 000000000..291b32d20 --- /dev/null +++ b/App_WebReferences/WSKimberlyClark/configuration91.svcinfo @@ -0,0 +1,549 @@ + + + + + + + ServiceSoap + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + Transport + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + ServiceSoap1 + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + ServiceSoap12 + + + + + + + + + + + + + + + System.ServiceModel.Configuration.TextMessageEncodingElement + + + 64 + + + 16 + + + Soap12 + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + System.ServiceModel.Configuration.HttpsTransportElement + + + False + + + 524288 + + + 65536 + + + False + + + 00:00:00 + + + Anonymous + + + False + + + True + + + StrongWildcard + + + True + + + 65536 + + + 0 + + + System.ServiceModel.Configuration.HttpMessageHandlerFactoryElement + + + (Collection) + + + + + + + + + Anonymous + + + + + + Buffered + + + False + + + True + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + System.ServiceModel.Configuration.WebSocketTransportSettingsElement + + + Never + + + False + + + 00:00:00 + + + + + + False + + + 0 + + + False + + + + + + + + + https://unigis2.unisolutions.com.ar/HUB/UNIGIS/MAPI/SOAP/GPS/Service.asmx + + + + + + basicHttpBinding + + + ServiceSoap + + + WSKimberlyClark.ServiceSoap + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + ServiceSoap + + + + + + + + + + + + + https://unigis2.unisolutions.com.ar/HUB/UNIGIS/MAPI/SOAP/GPS/Service.asmx + + + + + + customBinding + + + ServiceSoap12 + + + WSKimberlyClark.ServiceSoap + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + ServiceSoap12 + + + + + + + + + + + \ No newline at end of file diff --git a/GPS/KimberlyClarkTracking.aspx b/GPS/KimberlyClarkTracking.aspx new file mode 100644 index 000000000..8f0b88a4d --- /dev/null +++ b/GPS/KimberlyClarkTracking.aspx @@ -0,0 +1,163 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KimberlyClarkTracking.aspx.vb" Inherits="GPS_KimberlyClarkTracking" %> + + + + + + + Integración Kimberly-Clark + + + + + + +
  • + +
  • +
    +
    +
    + + + + + +
    +
    +
    + +
    +
    +
      +
    • Vehículo: + + +
    • +
    • Estatus: + + + + + +
    • +
    • Fecha Inicio: +
      + +
      +
    • +
    • Fecha Fin: +
      + +
      +
    • +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + \ No newline at end of file diff --git a/GPS/KimberlyClarkTracking.aspx.vb b/GPS/KimberlyClarkTracking.aspx.vb new file mode 100644 index 000000000..ae1a4122d --- /dev/null +++ b/GPS/KimberlyClarkTracking.aspx.vb @@ -0,0 +1,143 @@ +Option Strict On +Option Explicit On + +Imports System.Data +Imports System.IO +Imports System.Net +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports Newtonsoft.Json.Linq +Imports System.Linq +Imports System.Net.Http + +Partial Class GPS_KimberlyClarkTracking + Inherits ClsPaginas + + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CargaDatos() + End If + End Sub + Private Sub CargaDatos() + CargaDispositivos() + CargaTracking() + End Sub + Public Sub CargaDispositivos() + Dim DtDispositivos As DataTable = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1") + + DdlDispositivoFiltro.DataSource = DtDispositivos + DdlDispositivoFiltro.DataBind() + DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1")) + + DdlDispositivo.DataSource = DtDispositivos + DdlDispositivo.DataBind() + DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1")) + + UpAgregar.Update() + End Sub + Private Sub CargaTracking() + Dim FechaI As DateTime = If(IsDate(txtFechaI.Text), txtFechaI.Text.ToDateTime(), MinFecha) + Dim FechaF As DateTime = If(IsDate(txtFechaF.Text), txtFechaF.Text.ToDateTime(), MaxFecha) + + Dim ObjGPS As New ClsGPS + If ObjGPS.GetKimberlyClarkTracking(-1, DdlDispositivoFiltro.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveCliente, UsuarioActual.CveEmpresa, FechaI, FechaF) Then + GvDatos.DataSource = ObjGPS.DtResultados + End If + ObjGPS.Dispose() + + GvDatos.DataBind() + UpDatos.Update() + End Sub + Protected Sub LnkAgregarTracking_Click(sender As Object, e As EventArgs) + RegistraScript("$('#DivAgregar').modal('show');") + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaTracking() + End Sub + Protected Sub LnkCambiarEstatus_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Dim CveKimberlyClarkTracking As Integer = GvRow.DataKey("CveKimberlyClarkTracking").ToEntero() + Dim Estatus As Boolean = CBool(GvRow.DataKey("CveEstatus").ToEntero()) + + Dim ObjGPS As New ClsGPS + If ObjGPS.UpdateKimberlyClarkTrackingEstatus(CveKimberlyClarkTracking, Not Estatus, UsuarioActual.CveUsuario) Then + Alert("El tracking fue desactivado correctamente") + Else + Alert("Ocurrió un error al actualizar el estatus", TipoMensaje.MsgError) + End If + ObjGPS.Dispose() + + CargaDatos() + End Sub + Protected Sub GvDatos_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Dim CveKimberlyClarkTracking As Integer = GvRow.DataKey("CveKimberlyClarkTracking").ToEntero() + + Dim ObjGPS As New ClsGPS + If ObjGPS.RemoveKimberlyClarkTracking(CveKimberlyClarkTracking) Then + Alert("El tracking fue eliminado") + Else + Alert("Ocurrió un error al actualizar el estatus", TipoMensaje.MsgError) + End If + ObjGPS.Dispose() + + CargaDatos() + End Sub + + Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) + Dim Dominio As String = TxtDominio.Text.Trim() + Dim Codigo As String = TxtCodigo.Text.Trim() + Dim Serie As String = TxtSerie.Text.Trim() + Dim CveDispositivo As Integer = DdlDispositivo.SelectedValue.ToEntero() + + Dim ObjGPS As New ClsGPS + Dim CveKimberlyClarkTracking As Integer = ObjGPS.AddKimberlyClarkTracking(Dominio, Codigo, Serie, CveDispositivo, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, UsuarioActual.CveEmpresa) + If CveKimberlyClarkTracking > 0 Then + Alert("El tracking fue agregado correctamente") + Else + Alert("Ocurrió un error el tracking", TipoMensaje.MsgError) + End If + ObjGPS.Dispose() + + CargaDatos() + RegistraScript("$('#DivAgregar').modal('hide');") + End Sub + Protected Sub LnkEnviarPosicion_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Dim CveDispositivo As Integer = GvRow.DataKey("CveDispositivo").ToEntero() + Dim Dominio As String = GvRow.DataKey("Dominio") + Dim Serie As String = GvRow.DataKey("Serie") + Dim Codigo As String = GvRow.DataKey("Codigo") + Dim Lat As Double = 0 + Dim Lng As Double = 0 + Dim Velocidad As Double = 0 + Dim FechaEvento As DateTime = Nothing + + Using ObjGPS As New ClsGPS + If ObjGPS.UltimaPosicionEquipoGet(CveDispositivo, MinFecha, MaxFecha) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then + Lat = ObjGPS.DtResultados.Rows(0)("Lat").ToString().ToDouble() + Lng = ObjGPS.DtResultados.Rows(0)("Lng").ToString().ToDouble() + FechaEvento = ObjGPS.DtResultados.Rows(0)("FechaTrama").ToString().ToDateTime() + Velocidad = ObjGPS.DtResultados.Rows(0)("SPD").ToString().ToDouble() + End If + End Using + + Try + Dim WS = New WSKimberlyClark.ServiceSoapClient() + + Dim Retorno = WS.LoginYInsertarEvento("USUARIO", "CONTRASEÑA", Dominio, Serie, Codigo, Lat, Lng, 0, Velocidad, FechaEvento, FechaEvento) + If Retorno > 0 Then + Alert("El evento se envió correctamente") + Else + Alert("No se envió el evento", TipoMensaje.MsgAdvertencia) + End If + Catch ex As Exception + OnError("Ocurrió un error al enviar la posición", ex) + End Try + + End Sub +End Class