|
|
|
|
@@ -1,13 +1,13 @@
|
|
|
|
|
<%@ WebHandler Language="VB" Class="SIGGPS" %>
|
|
|
|
|
'Option Explicit On
|
|
|
|
|
'Option Strict On
|
|
|
|
|
|
|
|
|
|
<%@ WebHandler Language="VB" Class="SIGGPS" %>
|
|
|
|
|
'Option Explicit On
|
|
|
|
|
'Option Strict On
|
|
|
|
|
|
|
|
|
|
Imports System
|
|
|
|
|
Imports System.Web
|
|
|
|
|
Imports System.Data
|
|
|
|
|
Imports Newtonsoft.Json.Linq
|
|
|
|
|
Imports Extensiones
|
|
|
|
|
Imports System.IO
|
|
|
|
|
Imports System.IO
|
|
|
|
|
Imports Microsoft.AspNet.SignalR
|
|
|
|
|
|
|
|
|
|
Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|
|
|
|
@@ -17,10 +17,10 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|
|
|
|
If context.Request("metodo") IsNot Nothing Then
|
|
|
|
|
Select Case context.Request("metodo")
|
|
|
|
|
Case "getimginstalacion"
|
|
|
|
|
GetImgInstalacion(context)
|
|
|
|
|
Case "EjecutarNotificaciones"
|
|
|
|
|
EjecutarNotificaciones(context)
|
|
|
|
|
Case "EjecutaTrayectos"
|
|
|
|
|
GetImgInstalacion(context)
|
|
|
|
|
Case "EjecutarNotificaciones"
|
|
|
|
|
EjecutarNotificaciones(context)
|
|
|
|
|
Case "EjecutaTrayectos"
|
|
|
|
|
EnviarCorreoTrayectos(context, context.Request("CveTrayecto").ToString().ToEntero())
|
|
|
|
|
End Select
|
|
|
|
|
ElseIf context.Request.InputStream IsNot Nothing Then
|
|
|
|
|
@@ -69,19 +69,19 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|
|
|
|
Return URLParametros
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
Private Sub EjecutarNotificaciones(ByVal context As HttpContext)
|
|
|
|
|
Dim Retorno As String = "[]"
|
|
|
|
|
'Dim contextc = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext(Of MyGPSHub)()
|
|
|
|
|
'SendNotificacionGPS(contextc, 5, 1727, "Encabezado", "Mensaje", 2, "{""timeOut"":15000, ""extendedTimeOut"":16000}", "142608__autistic-lucario__error.wav", 0, SQLToGmapsJArray("POINT (-99.211688 19.717715)", "POINT").ToString())
|
|
|
|
|
Using ObjGPS As New ClsSisNotificaciones
|
|
|
|
|
ObjGPS.ObtenerNotificaciones()
|
|
|
|
|
End Using
|
|
|
|
|
context.Response.Write(Retorno)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Sub SendNotificacionGPS(context As Microsoft.AspNet.SignalR.IHubContext, CveNotificacionBitacora As Integer, CveUsuario As Integer, Encabezado As String, Mensaje As String, TipoNotificacion As Integer, Pie As String, Sonido As String, Persistencia As Boolean, Coords As String)
|
|
|
|
|
context.Clients.All.addLatestNotification(Mensaje, CveUsuario, Encabezado, TipoNotificacion, Pie, Sonido, CveNotificacionBitacora, Persistencia, Coords)
|
|
|
|
|
End Sub
|
|
|
|
|
Private Sub EjecutarNotificaciones(ByVal context As HttpContext)
|
|
|
|
|
Dim Retorno As String = "[]"
|
|
|
|
|
'Dim contextc = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext(Of MyGPSHub)()
|
|
|
|
|
'SendNotificacionGPS(contextc, 5, 1727, "Encabezado", "Mensaje", 2, "{""timeOut"":15000, ""extendedTimeOut"":16000}", "142608__autistic-lucario__error.wav", 0, SQLToGmapsJArray("POINT (-99.211688 19.717715)", "POINT").ToString())
|
|
|
|
|
Using ObjGPS As New ClsSisNotificaciones
|
|
|
|
|
ObjGPS.ObtenerNotificaciones()
|
|
|
|
|
End Using
|
|
|
|
|
context.Response.Write(Retorno)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Sub SendNotificacionGPS(context As Microsoft.AspNet.SignalR.IHubContext, CveNotificacionBitacora As Integer, CveUsuario As Integer, Encabezado As String, Mensaje As String, TipoNotificacion As Integer, Pie As String, Sonido As String, Persistencia As Boolean, Coords As String)
|
|
|
|
|
context.Clients.All.addLatestNotification(Mensaje, CveUsuario, Encabezado, TipoNotificacion, Pie, Sonido, CveNotificacionBitacora, Persistencia, Coords)
|
|
|
|
|
End Sub
|
|
|
|
|
Private Sub GetImgInstalacion(ByVal context As HttpContext)
|
|
|
|
|
Dim params As String = Decripta(context.Request("r").ToString)
|
|
|
|
|
Dim Parametros = Me.Parametros(params)
|
|
|
|
|
@@ -91,7 +91,7 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|
|
|
|
Dim Usuario As Usuario = UsuarioActual(context)
|
|
|
|
|
|
|
|
|
|
If Not IsNothing(Usuario) Then
|
|
|
|
|
Dim Url = String.Format("{0}\Empresas\{1}\Dispositivos\{2}\Imagenes\{3}", AppDomain.CurrentDomain.BaseDirectory, Usuario.CveEmpresa, CveDispositivo, Archivo)
|
|
|
|
|
Dim Url = String.Format("{0}\Empresas\{1}\Dispositivos\{2}\Imagenes\{3}", ModExtensiones.DirectorioBaseEmpresas, Usuario.CveEmpresa, CveDispositivo, Archivo)
|
|
|
|
|
|
|
|
|
|
If File.Exists(Url) Then
|
|
|
|
|
context.Response.ContentType = String.Format("image/{0}", Extension)
|
|
|
|
|
@@ -232,158 +232,158 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
Return Json
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
#Region "N O T F I C A C I O N - T R A Y E C T O S"
|
|
|
|
|
Private Sub EnviarCorreoTrayectos(ByVal context As HttpContext, CveTrayecto As Integer)
|
|
|
|
|
Dim Retorno As JObject = New JObject(New JProperty("EnvioCorreo", False), New JProperty("Mensaje", ""))
|
|
|
|
|
Try
|
|
|
|
|
Dim DtInfoTrayecto As DataTable = Nothing
|
|
|
|
|
Dim DtTrayecto As DataTable = Nothing
|
|
|
|
|
|
|
|
|
|
Using ObjGPS As New ClsGPS
|
|
|
|
|
If ObjGPS.GetTrayectos(CveTrayecto, -1, -1) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
|
|
|
|
|
DtTrayecto = ObjGPS.DtResultados.Copy()
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If ObjGPS.GetTrayectosDatos(CveTrayecto) Then
|
|
|
|
|
DtInfoTrayecto = ObjGPS.DtSetResultados.Tables(0).Copy()
|
|
|
|
|
End If
|
|
|
|
|
End Using
|
|
|
|
|
|
|
|
|
|
If DtTrayecto IsNot Nothing AndAlso DtInfoTrayecto IsNot Nothing AndAlso DtInfoTrayecto.Rows.Count > 0 Then
|
|
|
|
|
Dim RowTrayecto As DataRow = DtTrayecto.Rows(0)
|
|
|
|
|
Dim RowInfo As DataRow = DtInfoTrayecto.Rows(0)
|
|
|
|
|
|
|
|
|
|
Dim EnviarLiga As Boolean = CBool(RowTrayecto("EnviarLiga").ToString())
|
|
|
|
|
|
|
|
|
|
Dim Asunto As String = "Estatus de Trayecto"
|
|
|
|
|
Dim Cuerpo As String = GeneraCorreo(CveTrayecto, EnviarLiga, RowInfo)
|
|
|
|
|
Dim Correos As String = RowTrayecto("CorreosNotificacion").ToString()
|
|
|
|
|
|
|
|
|
|
Dim ObjMail As New ClsSisMail
|
|
|
|
|
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, Asunto, Cuerpo) Then
|
|
|
|
|
Retorno("EnvioCorreo") = True
|
|
|
|
|
Retorno("Mensaje") = "El correo fue enviado correctamente"
|
|
|
|
|
Else
|
|
|
|
|
Retorno("EnvioCorreo") = False
|
|
|
|
|
Retorno("Mensaje") = "Ocurrió un error al enviar el correo"
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
Catch ex As Exception
|
|
|
|
|
OnError("Ocurrió un error al enviar el correo", ex)
|
|
|
|
|
End Try
|
|
|
|
|
|
|
|
|
|
context.Response.Write(Retorno.ToString())
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Protected Function GeneraCorreo(CveTrayecto As Integer, EnviarLiga As Boolean, Row As DataRow) As String
|
|
|
|
|
Dim strBody As New StringBuilder
|
|
|
|
|
Try
|
|
|
|
|
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
|
|
|
|
strBody.Append("<head> ")
|
|
|
|
|
strBody.Append(" <style type=""text/css""> ")
|
|
|
|
|
strBody.Append(" body ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" margin:0px; ")
|
|
|
|
|
strBody.Append(" padding:0px 0px 0px 0px; ")
|
|
|
|
|
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
|
|
|
|
strBody.Append(" font-size: 10px; ")
|
|
|
|
|
strBody.Append(" background-color:#F0F0F0; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" a.Texto ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" font-size:11px; ")
|
|
|
|
|
strBody.Append(" background-color:#F7F6F3; ")
|
|
|
|
|
strBody.Append(" text-decoration:none; ")
|
|
|
|
|
strBody.Append(" font-weight:bold; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .Texto ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .TextoAlterno ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
|
|
|
|
strBody.Append(" vertical-align:middle; height:20px;")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .BarraIdentidad ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" color:#FFFFFF; ")
|
|
|
|
|
strBody.Append(" background:#F0F0F0; ")
|
|
|
|
|
strBody.Append(" font-weight:bold; ")
|
|
|
|
|
strBody.Append(" font-size:19px; ")
|
|
|
|
|
strBody.Append(" font-style:oblique; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .Titulos ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" background-color: Gray;")
|
|
|
|
|
strBody.Append(" color:White; ")
|
|
|
|
|
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
|
|
|
|
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
|
|
|
|
strBody.Append(" text-decoration:none; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .Verde {color: #00CC00;} ")
|
|
|
|
|
strBody.Append(" .Negro {color: #000000;} ")
|
|
|
|
|
strBody.Append(" .Rojo {color: #FF0000;} ")
|
|
|
|
|
strBody.Append(" </style> ")
|
|
|
|
|
strBody.Append("</head> ")
|
|
|
|
|
strBody.Append("<body> ")
|
|
|
|
|
strBody.Append(" <h5> ")
|
|
|
|
|
strBody.Append(" ")
|
|
|
|
|
strBody.Append(" </h5> ")
|
|
|
|
|
strBody.Append(" <div id=""C_divOC"" > ")
|
|
|
|
|
strBody.Append("<div><fieldset><legend><strong> Datos del Trayecto</strong></legend>")
|
|
|
|
|
strBody.Append("<table style=""width: 726.5px;"" border=""0"" cellspacing=""0"" cellpadding=""0"">")
|
|
|
|
|
strBody.Append("<tbody>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Trayecto:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("Trayecto"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Vehículo:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}strong></td>", Row("Vehiculo"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Estatus:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("Estatus"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Latitud:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("LatitudActual"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Longitud:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("LongitudActual"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Posición:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 187px;"" colspan=""3""><strong> <a href=""https://www.google.com/maps/search/{0},{1}/\"" target=""_blank"" rel=""noopener"">Ver en google maps</a></strong></td>", Row("LatitudActual"), Row("LongitudActual"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
If EnviarLiga Then
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Rastreo:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 187px;"" colspan=""3""><strong> <a href=""http://gps.signalsgps.com/GPS/RastreoTrayectos.aspx?P={0}"" target=""_blank"" rel=""noopener"">Rastrear Vehículo</a></strong></td>", Encripta($"CveTrayecto={Row("CveTrayecto").ToString()}"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
End If
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 187px;"" colspan=""3""><img src=""{0}"" /></td>", Row("Liga"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("</tbody>")
|
|
|
|
|
strBody.Append("</table>")
|
|
|
|
|
strBody.Append("</fieldset></div>")
|
|
|
|
|
strBody.Append(" <h5> ")
|
|
|
|
|
strBody.Append(" ")
|
|
|
|
|
strBody.Append(" </h5> ")
|
|
|
|
|
strBody.Append(" </div> ")
|
|
|
|
|
strBody.Append("</body></html>")
|
|
|
|
|
Catch ex As Exception
|
|
|
|
|
OnError("Ocurrio un error al general el correo.", ex)
|
|
|
|
|
End Try
|
|
|
|
|
Return strBody.ToString()
|
|
|
|
|
End Function
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
#Region "N O T F I C A C I O N - T R A Y E C T O S"
|
|
|
|
|
Private Sub EnviarCorreoTrayectos(ByVal context As HttpContext, CveTrayecto As Integer)
|
|
|
|
|
Dim Retorno As JObject = New JObject(New JProperty("EnvioCorreo", False), New JProperty("Mensaje", ""))
|
|
|
|
|
Try
|
|
|
|
|
Dim DtInfoTrayecto As DataTable = Nothing
|
|
|
|
|
Dim DtTrayecto As DataTable = Nothing
|
|
|
|
|
|
|
|
|
|
Using ObjGPS As New ClsGPS
|
|
|
|
|
If ObjGPS.GetTrayectos(CveTrayecto, -1, -1) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
|
|
|
|
|
DtTrayecto = ObjGPS.DtResultados.Copy()
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If ObjGPS.GetTrayectosDatos(CveTrayecto) Then
|
|
|
|
|
DtInfoTrayecto = ObjGPS.DtSetResultados.Tables(0).Copy()
|
|
|
|
|
End If
|
|
|
|
|
End Using
|
|
|
|
|
|
|
|
|
|
If DtTrayecto IsNot Nothing AndAlso DtInfoTrayecto IsNot Nothing AndAlso DtInfoTrayecto.Rows.Count > 0 Then
|
|
|
|
|
Dim RowTrayecto As DataRow = DtTrayecto.Rows(0)
|
|
|
|
|
Dim RowInfo As DataRow = DtInfoTrayecto.Rows(0)
|
|
|
|
|
|
|
|
|
|
Dim EnviarLiga As Boolean = CBool(RowTrayecto("EnviarLiga").ToString())
|
|
|
|
|
|
|
|
|
|
Dim Asunto As String = "Estatus de Trayecto"
|
|
|
|
|
Dim Cuerpo As String = GeneraCorreo(CveTrayecto, EnviarLiga, RowInfo)
|
|
|
|
|
Dim Correos As String = RowTrayecto("CorreosNotificacion").ToString()
|
|
|
|
|
|
|
|
|
|
Dim ObjMail As New ClsSisMail
|
|
|
|
|
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, Asunto, Cuerpo) Then
|
|
|
|
|
Retorno("EnvioCorreo") = True
|
|
|
|
|
Retorno("Mensaje") = "El correo fue enviado correctamente"
|
|
|
|
|
Else
|
|
|
|
|
Retorno("EnvioCorreo") = False
|
|
|
|
|
Retorno("Mensaje") = "Ocurrió un error al enviar el correo"
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
Catch ex As Exception
|
|
|
|
|
OnError("Ocurrió un error al enviar el correo", ex)
|
|
|
|
|
End Try
|
|
|
|
|
|
|
|
|
|
context.Response.Write(Retorno.ToString())
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Protected Function GeneraCorreo(CveTrayecto As Integer, EnviarLiga As Boolean, Row As DataRow) As String
|
|
|
|
|
Dim strBody As New StringBuilder
|
|
|
|
|
Try
|
|
|
|
|
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
|
|
|
|
strBody.Append("<head> ")
|
|
|
|
|
strBody.Append(" <style type=""text/css""> ")
|
|
|
|
|
strBody.Append(" body ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" margin:0px; ")
|
|
|
|
|
strBody.Append(" padding:0px 0px 0px 0px; ")
|
|
|
|
|
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
|
|
|
|
strBody.Append(" font-size: 10px; ")
|
|
|
|
|
strBody.Append(" background-color:#F0F0F0; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" a.Texto ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" font-size:11px; ")
|
|
|
|
|
strBody.Append(" background-color:#F7F6F3; ")
|
|
|
|
|
strBody.Append(" text-decoration:none; ")
|
|
|
|
|
strBody.Append(" font-weight:bold; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .Texto ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .TextoAlterno ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
|
|
|
|
strBody.Append(" vertical-align:middle; height:20px;")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .BarraIdentidad ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" color:#FFFFFF; ")
|
|
|
|
|
strBody.Append(" background:#F0F0F0; ")
|
|
|
|
|
strBody.Append(" font-weight:bold; ")
|
|
|
|
|
strBody.Append(" font-size:19px; ")
|
|
|
|
|
strBody.Append(" font-style:oblique; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .Titulos ")
|
|
|
|
|
strBody.Append(" { ")
|
|
|
|
|
strBody.Append(" background-color: Gray;")
|
|
|
|
|
strBody.Append(" color:White; ")
|
|
|
|
|
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
|
|
|
|
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
|
|
|
|
strBody.Append(" text-decoration:none; ")
|
|
|
|
|
strBody.Append(" } ")
|
|
|
|
|
strBody.Append(" .Verde {color: #00CC00;} ")
|
|
|
|
|
strBody.Append(" .Negro {color: #000000;} ")
|
|
|
|
|
strBody.Append(" .Rojo {color: #FF0000;} ")
|
|
|
|
|
strBody.Append(" </style> ")
|
|
|
|
|
strBody.Append("</head> ")
|
|
|
|
|
strBody.Append("<body> ")
|
|
|
|
|
strBody.Append(" <h5> ")
|
|
|
|
|
strBody.Append(" ")
|
|
|
|
|
strBody.Append(" </h5> ")
|
|
|
|
|
strBody.Append(" <div id=""C_divOC"" > ")
|
|
|
|
|
strBody.Append("<div><fieldset><legend><strong> Datos del Trayecto</strong></legend>")
|
|
|
|
|
strBody.Append("<table style=""width: 726.5px;"" border=""0"" cellspacing=""0"" cellpadding=""0"">")
|
|
|
|
|
strBody.Append("<tbody>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Trayecto:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("Trayecto"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Vehículo:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}strong></td>", Row("Vehiculo"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Estatus:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("Estatus"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Latitud:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("LatitudActual"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Longitud:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 167px;"" colspan=""3""><strong> {0}</strong></td>", Row("LongitudActual"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Posición:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 187px;"" colspan=""3""><strong> <a href=""https://www.google.com/maps/search/{0},{1}/\"" target=""_blank"" rel=""noopener"">Ver en google maps</a></strong></td>", Row("LatitudActual"), Row("LongitudActual"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
If EnviarLiga Then
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.Append("<td style=""width: 36.5px;""> Rastreo:</td>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 187px;"" colspan=""3""><strong> <a href=""http://gps.signalsgps.com/GPS/RastreoTrayectos.aspx?P={0}"" target=""_blank"" rel=""noopener"">Rastrear Vehículo</a></strong></td>", Encripta($"CveTrayecto={Row("CveTrayecto").ToString()}"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
End If
|
|
|
|
|
strBody.Append("<tr>")
|
|
|
|
|
strBody.AppendFormat("<td style=""width: 187px;"" colspan=""3""><img src=""{0}"" /></td>", Row("Liga"))
|
|
|
|
|
strBody.Append("</tr>")
|
|
|
|
|
strBody.Append("</tbody>")
|
|
|
|
|
strBody.Append("</table>")
|
|
|
|
|
strBody.Append("</fieldset></div>")
|
|
|
|
|
strBody.Append(" <h5> ")
|
|
|
|
|
strBody.Append(" ")
|
|
|
|
|
strBody.Append(" </h5> ")
|
|
|
|
|
strBody.Append(" </div> ")
|
|
|
|
|
strBody.Append("</body></html>")
|
|
|
|
|
Catch ex As Exception
|
|
|
|
|
OnError("Ocurrio un error al general el correo.", ex)
|
|
|
|
|
End Try
|
|
|
|
|
Return strBody.ToString()
|
|
|
|
|
End Function
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
End Class
|