Redireccionar Usuarios de SIG a GPS
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2019 © AD Sistemas.</asp:Literal>
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2022 © AD Sistemas.</asp:Literal>
|
||||
</div>
|
||||
<%--<div class="col-lg-offset-4 col-md-offset-4 col-sm-offset-3 col-lg-4 col-md-4 col-sm-6 col-xs-12 text-right">
|
||||
<asp:LinkButton ID="linkRegistrar" runat="server" CssClass="restaurar-password" OnClientClick="window.location.href='ActivarUsuario.aspx'">Registrar</asp:LinkButton>
|
||||
|
||||
@@ -46,14 +46,14 @@
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvPortalRastreo" runat="server" DataKeyNames="CveUsuario, CveCliente, Contraseña, Usuario" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false"
|
||||
<asp:GridView ID="GvPortalRastreo" runat="server" DataKeyNames="CveUsuario, CveCliente, Contraseña, Usuario,CveEmpresa" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false" OnRowDataBound="GvPortalRastreo_RowDataBound"
|
||||
Width="100%" ToolTip="Listado de Empresas a las que tiene acceso." CssClass="table table-striped table-advance table-hover GVSearch"
|
||||
Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Portal Rastreo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEmp" runat="server" CssClass="Texto" Text='<%# Eval("Cliente")%>' CommandArgument='<%# Eval("CveCliente") %>' CommandName="Cambia"></asp:LinkButton>
|
||||
<asp:HyperLink ID="HlpPortal" runat="server" CssClass="Texto" Target="_blank" Text='<%# Eval("Cliente")%>' ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
@@ -113,8 +113,9 @@
|
||||
$('#BtnSeleccionar').click();
|
||||
}
|
||||
|
||||
function Ir2() {
|
||||
gotourl('/PortalGPS/InicioGPS.aspx');
|
||||
function Ir2(url) {
|
||||
//gotourl('/PortalGPS/InicioGPS.aspx');
|
||||
gotourl(url);
|
||||
}
|
||||
|
||||
function Ir3() {
|
||||
|
||||
@@ -93,41 +93,6 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvPortalRastreo_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalRastreo.RowCommand
|
||||
If e.CommandName = "Cambia" Then
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
If gvr IsNot Nothing Then
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
Dim Usuario As Usuario = Nothing
|
||||
Usuario = ObjUsuario.ValidaUsuarioGPS2(gvr.DataKey("CveCliente"), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||
ObjUsuario.Dispose()
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
Usuario.ModoSimulacion = ModoSimulacion
|
||||
ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
Usuario.CvePlataforma = 3
|
||||
CreaObjetoEmpresa(Usuario)
|
||||
'si la contraseña es la prederminada, pide la nueva contraseña
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario.ToString), False)
|
||||
RegistraScript("Ir2();")
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvPortalCliente_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalCliente.RowCommand
|
||||
If e.CommandName = "Cambia" Then
|
||||
@@ -263,4 +228,15 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvPortalRastreo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Parametros As String = Encripta($"OPCION=PORTALGPS&CVEEMPRESA={e.Row.DBCampo("CveEmpresa")}&CVECLIENTE={e.Row.DBCampo("CveCliente")}&CVEUSUARIO={UsuarioActual.CveUsuario}&TICKS={Now.Ticks}")
|
||||
|
||||
Dim SitioGPS As String = "https://gps.signalsgps.com/"
|
||||
|
||||
Dim URLGPS As String = $"{SitioGPS}LogIn.aspx?P={Parametros}"
|
||||
|
||||
e.Row.FCHyperLink("HlpPortal").NavigateUrl = URLGPS
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user