This commit is contained in:
@@ -3421,7 +3421,11 @@ Public Class ClsPaginas
|
||||
pages.Add("/Compras/PopUpVerFactura.aspx")
|
||||
Return pages
|
||||
End Function
|
||||
Protected Overridable Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
|
||||
Dim sw As Diagnostics.Stopwatch
|
||||
Protected Overridable Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
|
||||
|
||||
sw = New Diagnostics.Stopwatch
|
||||
sw.Start()
|
||||
If Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing Then
|
||||
Dim AuthorizeRequest As Boolean = False
|
||||
Dim HuboError = False
|
||||
@@ -4921,7 +4925,14 @@ Public Class ClsPaginas
|
||||
Mensaje.Alert(Mensaje, pOpcion, JSBtnAceptar, TimeoutToast:=timeout)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
|
||||
Protected Overridable Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
|
||||
If sw IsNot Nothing AndAlso Not (Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing) Then
|
||||
|
||||
sw.Stop()
|
||||
Using ObjUsuario As New ClsSisUsuarios
|
||||
ObjUsuario.AddBitacora(CveModulo, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request.Url.ToString(), sw.ElapsedMilliseconds)
|
||||
End Using
|
||||
End If
|
||||
If Not IsNothing(ViewState("strToastMsglargonoreplace")) AndAlso ViewState("strToastMsglargonoreplace").ToString.Length > 0 Then
|
||||
RegistraScript(ViewState("strToastMsglargonoreplace").ToString(), "esteseraunticklargoparaquenosesobrescribaconotro")
|
||||
ViewState("strToastMsglargonoreplace") = Nothing
|
||||
|
||||
@@ -891,7 +891,7 @@ Public Class ClsSisUsuarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddBitacora(CveModulo As Integer, Accion As String, Resultado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddBitacora(CveModulo As Integer, Accion As String, Resultado As String, CveUsuario As Integer, CveEmpresa As Integer, Optional URL As String = "-1", Optional TiempodeEjecucion As Long = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Sis_UsuariosBitacoraAdd")
|
||||
|
||||
@@ -901,6 +901,8 @@ Public Class ClsSisUsuarios
|
||||
.Add("@Resultado", SqlDbType.VarChar).Value = Resultado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@URL", SqlDbType.VarChar).Value = URL
|
||||
.Add("@TiempodeEjecucion", SqlDbType.BigInt).Value = TiempodeEjecucion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -17,6 +17,7 @@ Public Class LogicNominas
|
||||
Dim sw As Diagnostics.Stopwatch = Nothing
|
||||
If guardarLogTimbrado Then
|
||||
sw = New Diagnostics.Stopwatch
|
||||
|
||||
sw.Start()
|
||||
End If
|
||||
Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual) 'CvePersonal, CvePeriodo,
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Post">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPost" runat="server" Text='<%# Eval("LastPostback", "{0:dd/MM/yyyy HH:mm}")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlPost" runat="server" Text='<%# Eval("LastPostback")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -14,9 +14,46 @@ Partial Class SessionesActivas
|
||||
ViewState("RCveUsuario") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property UsuarioActual() As Usuario
|
||||
Get
|
||||
Try
|
||||
'UsuarioActual = DirectCast(Session("UsuarioSIG"), Usuario)
|
||||
UsuarioActual = CType(Context.Session("UsuarioSIG"), Usuario)
|
||||
Catch ex As Exception
|
||||
Usuario.CerrarSession()
|
||||
Return Nothing
|
||||
End Try
|
||||
End Get
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing Then
|
||||
|
||||
Dim AuthorizeRequest As Boolean = False
|
||||
Dim HuboError = False
|
||||
Dim statusCode = 401
|
||||
AuthorizeRequest = False
|
||||
|
||||
Response.StatusCode = statusCode
|
||||
If Not AuthorizeRequest Then
|
||||
Usuario.CerrarSession()
|
||||
Response.End()
|
||||
End If
|
||||
End If
|
||||
If UsuarioActual.CveRol <> 1 Then
|
||||
|
||||
Dim AuthorizeRequest As Boolean = False
|
||||
Dim HuboError = False
|
||||
Dim statusCode = 401
|
||||
AuthorizeRequest = False
|
||||
|
||||
Response.StatusCode = statusCode
|
||||
If Not AuthorizeRequest Then
|
||||
Usuario.CerrarSession()
|
||||
Response.End()
|
||||
End If
|
||||
End If
|
||||
' Dim listacve As New List(Of String)
|
||||
' listacve.Add("1815")
|
||||
' Notificaciones.AlertaVentana("notificacion", listacve, timeoutseconds:=0)
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user