-- cambio ipbloqueadas
This commit is contained in:
@@ -553,7 +553,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" >
|
<div class="row" >
|
||||||
<div class="col-md-1">Opción:</div>
|
<div class="col-md-1">Opción:</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlSMSOpciones" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSOpciones_SelectedIndexChanged">
|
<asp:DropDownList ID="DdlSMSOpciones" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlSMSOpciones_SelectedIndexChanged">
|
||||||
<asp:ListItem Text="Vendedor" Value="1" />
|
<asp:ListItem Text="Vendedor" Value="1" />
|
||||||
<asp:ListItem Text="Gerente Ventas" Value="2" Selected="True" />
|
<asp:ListItem Text="Gerente Ventas" Value="2" Selected="True" />
|
||||||
|
|||||||
122
Inicio.aspx.vb
122
Inicio.aspx.vb
@@ -10,66 +10,27 @@ Partial Class Inicio
|
|||||||
|
|
||||||
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
|
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
|
||||||
|
|
||||||
|
|
||||||
Public Function GetFacturasCanceladasPendientesWS(objventas As ClsVentas, RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
|
|
||||||
Dim retorno As Boolean = False
|
|
||||||
Try
|
|
||||||
|
|
||||||
Dim objServicio As New Cancelacion2022.CancelacionSoapClient()
|
|
||||||
Dim resp As Cancelacion2022.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
|
||||||
If resp.Estado = 0 Then
|
|
||||||
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
|
||||||
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
|
||||||
Dim theDataSet As DataSet = New DataSet()
|
|
||||||
theDataSet.ReadXml(theReader)
|
|
||||||
|
|
||||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
|
||||||
Dim sb As New StringBuilder()
|
|
||||||
|
|
||||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
|
||||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
|
||||||
Next
|
|
||||||
If objventas.GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
|
|
||||||
retorno = True
|
|
||||||
End If
|
|
||||||
gvCancelaPendiente.DataSource = objventas.DtResultados
|
|
||||||
Else
|
|
||||||
If showalert Then
|
|
||||||
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Alert("Los servicios del SAT presentan intermitencia y no se puede obtener la información de cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
retorno = False
|
|
||||||
Me.OnError("Los servicios del SAT presentan intermitencia y no se puede obtener la información: ", ex, "")
|
|
||||||
End Try
|
|
||||||
gvCancelaPendiente.DataBind()
|
|
||||||
Return retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Sub cargaUnuaUno()
|
|
||||||
GVPA_OI_UnoAUnoTableroGet.DataSource = New System.Data.DataTable()
|
|
||||||
|
|
||||||
Using ObjPA_O As ClsOIEventos = New ClsOIEventos()
|
|
||||||
If ObjPA_O.UnoAUnoTableroGet(UsuarioActual.CveEmpresa, NowADS().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario) Then
|
|
||||||
|
|
||||||
If ObjPA_O.DtResultados.COUNT("CveUnoaUno", "CveUnoaUno = -1") > 0 Then
|
|
||||||
RegistraScript("$('#DvUnoaUno').modal();")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
GVPA_OI_UnoAUnoTableroGet.DataSource = ObjPA_O.DtResultados
|
|
||||||
End Using
|
|
||||||
|
|
||||||
GVPA_OI_UnoAUnoTableroGet.DataBind()
|
|
||||||
End Sub
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
'Using objnoti = New ClsSisNotificaciones()
|
'Using objnoti = New ClsSisNotificaciones()
|
||||||
' objnoti.ContadorCampana("Mi Mensaje", UsuarioActual.CveUsuario.ToString())
|
' objnoti.ContadorCampana("Mi Mensaje", UsuarioActual.CveUsuario.ToString())
|
||||||
'End Using
|
'End Using
|
||||||
|
|
||||||
|
Dim clientIp As String = (If(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),
|
||||||
|
Request.ServerVariables("REMOTE_ADDR"))).Split(","c)(0).Trim()
|
||||||
|
' Ruta del archivo con las IP bloqueadas
|
||||||
|
Dim path As String = Server.MapPath("/Utilerias/IPBloqueadas.txt")
|
||||||
|
|
||||||
|
If System.IO.File.Exists(path) Then
|
||||||
|
' Leer el contenido del archivo y separarlo por ";"
|
||||||
|
Dim contenido As String = System.IO.File.ReadAllText(path)
|
||||||
|
Dim ipBloqueadas As String() = contenido.Split(";"c)
|
||||||
|
' Verificar si la IP está en la lista
|
||||||
|
If ipBloqueadas.Any(Function(ip) ip.Trim() = clientIp) Then
|
||||||
|
Response.Redirect("/LogIn.aspx")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not IsNothing(Request("logout")) AndAlso Request("logout").ToString() = "1" Then
|
If Not IsNothing(Request("logout")) AndAlso Request("logout").ToString() = "1" Then
|
||||||
Usuario.CerrarSession()
|
Usuario.CerrarSession()
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -267,6 +228,59 @@ Partial Class Inicio
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Function GetFacturasCanceladasPendientesWS(objventas As ClsVentas, RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim objServicio As New Cancelacion2022.CancelacionSoapClient()
|
||||||
|
Dim resp As Cancelacion2022.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||||
|
If resp.Estado = 0 Then
|
||||||
|
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
||||||
|
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
||||||
|
Dim theDataSet As DataSet = New DataSet()
|
||||||
|
theDataSet.ReadXml(theReader)
|
||||||
|
|
||||||
|
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||||
|
Dim sb As New StringBuilder()
|
||||||
|
|
||||||
|
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||||
|
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||||
|
Next
|
||||||
|
If objventas.GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
|
||||||
|
retorno = True
|
||||||
|
End If
|
||||||
|
gvCancelaPendiente.DataSource = objventas.DtResultados
|
||||||
|
Else
|
||||||
|
If showalert Then
|
||||||
|
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("Los servicios del SAT presentan intermitencia y no se puede obtener la información de cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
Me.OnError("Los servicios del SAT presentan intermitencia y no se puede obtener la información: ", ex, "")
|
||||||
|
End Try
|
||||||
|
gvCancelaPendiente.DataBind()
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub cargaUnuaUno()
|
||||||
|
GVPA_OI_UnoAUnoTableroGet.DataSource = New System.Data.DataTable()
|
||||||
|
|
||||||
|
Using ObjPA_O As ClsOIEventos = New ClsOIEventos()
|
||||||
|
If ObjPA_O.UnoAUnoTableroGet(UsuarioActual.CveEmpresa, NowADS().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario) Then
|
||||||
|
|
||||||
|
If ObjPA_O.DtResultados.COUNT("CveUnoaUno", "CveUnoaUno = -1") > 0 Then
|
||||||
|
RegistraScript("$('#DvUnoaUno').modal();")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
GVPA_OI_UnoAUnoTableroGet.DataSource = ObjPA_O.DtResultados
|
||||||
|
End Using
|
||||||
|
|
||||||
|
GVPA_OI_UnoAUnoTableroGet.DataBind()
|
||||||
|
End Sub
|
||||||
Private Sub CargaCalendarioGraficas()
|
Private Sub CargaCalendarioGraficas()
|
||||||
If (UsuarioActual.CveRol = 1062) Or (UsuarioActual.CveUsuario = 100) Then
|
If (UsuarioActual.CveRol = 1062) Or (UsuarioActual.CveUsuario = 100) Then
|
||||||
CargaGraficas()
|
CargaGraficas()
|
||||||
|
|||||||
Reference in New Issue
Block a user