Envio de correo en trayectos
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Notificar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEnviar" Visible='<%# CBool(Eval("EnviarNotificacion")) %>' runat="server" OnClick="LnkEnviar_Click" CausesValidation="False" CssClass="Texto" Text="<i class='fa fa-envelope fa-2'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Desea enviar el estado del trayecto?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="LnkEnviar" runat="server" Visible="false" OnClick="LnkEnviar_Click" CssClass="Texto" Text="<i class='fa fa-envelope fa-2'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Desea enviar el estado del trayecto?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField Text="Ver Detalle" Target="_blank" DataNavigateUrlFormatString="/GPS/TrayectoDetalle.aspx?CveTrayecto={0}" DataNavigateUrlFields="CveTrayecto" ItemStyle-Width="10%" />
|
||||
|
||||
@@ -295,7 +295,9 @@ Partial Class GPS_Trayectos
|
||||
ElseIf e.Row.DBCampo("EsInicio") = "False" AndAlso e.Row.DBCampo("EsFin") = "False" Then
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-secondary"
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("EnviarNotificacion")) Then
|
||||
e.Row.FCLinkButton("LnkEnviar").Visible = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlTrayecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -415,7 +417,7 @@ Partial Class GPS_Trayectos
|
||||
|
||||
Dim CveTrayecto As Integer = GvRow.DataKey("CveTrayecto").ToEntero()
|
||||
If CveTrayecto > 0 Then
|
||||
Dim Url = New Uri(String.Format("{0}/ashx/SIGGPS.ashx?metodo=EjecutaTrayectos&CveTrayecto={1}", "https://gps.signalsgps.com", CveTrayecto))
|
||||
Dim Url = New Uri(String.Format("{0}/ashx/SIGGPS.ashx?metodo=EjecutaTrayectos&CveTrayecto={1}", "http://gps.signalsgps.com", CveTrayecto))
|
||||
Dim Retorno As String = "{}"
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
@@ -435,8 +437,10 @@ Partial Class GPS_Trayectos
|
||||
Alert(Resp("Mensaje").ToString(), TipoMensaje.MsgError)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al descargar la factura", ex)
|
||||
OnError("Ocurrió un error al enviar el correo", ex)
|
||||
End Try
|
||||
Else
|
||||
Alert("No se pudo identificar el trayecto", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user