cambios en apidenuncias
This commit is contained in:
66
.codex-links/WebIntranet/selModo.aspx.vb
Normal file
66
.codex-links/WebIntranet/selModo.aspx.vb
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports System.Threading.Tasks
|
||||
Imports WebIntranet.Models
|
||||
|
||||
Public Class selModo
|
||||
Inherits System.Web.UI.Page
|
||||
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||
If Session("Persona") Is Nothing Then
|
||||
Response.Redirect("default.aspx")
|
||||
End If
|
||||
Dim sessionUsuario As String = Session("usuario")
|
||||
If Session("persona").Personas(0).Roll <> "SUPERVISORDETODO" Then
|
||||
btnSituacionPersonal.Visible = False
|
||||
End If
|
||||
If Session("mostrarAviso") IsNot Nothing Then
|
||||
Session.Remove("mostrarAviso")
|
||||
IncidenciasPendientesDiv.InnerHtml = " <div class='popupIncPendientes'>
|
||||
<i class='fas fa-times fa-lg' style='justify-content: end; display: flex;position: absolute;right: 20px;top: 15px;cursor:pointer' onclick='CerrarNotificacion()' ></i>
|
||||
<p style='width:100%; margin-top: 15px;'>Tienes " + Session("nuIncidenciasPendientes").ToString + " incidencias pendientes de revisión</p>
|
||||
<div style='display: inline-flex; justify-content: end; align-items: end; height:80%'>
|
||||
<input type='button' value='GESTIONAR'style='margin-right: 10px;' onclick=""window.location.href = '/listSolicitudesComunicaciones.aspx?pnd=true'"" class='btnAzul'/>
|
||||
<input type='button' value='CONTINUAR'style='' onclick='CerrarNotificacion()' class='btnGris'/></div> </div>"
|
||||
IncidenciasPendientesDiv.Style.Item("display") = "flex"
|
||||
End If
|
||||
|
||||
End Sub
|
||||
<System.Web.Services.WebMethod()>
|
||||
Public Shared Function listaUsuariosSeleccionados(usuarios As String) As String
|
||||
|
||||
If UtilAntifraude.CheckCred() = False Then
|
||||
Return "ERROR--1"
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
Dim usuariosSeleccionados As List(Of String) = HttpContext.Current.Session("usuariosSeleccionados")
|
||||
Dim sessionUsuario As String = HttpContext.Current.Session("usuario")
|
||||
Dim sessionPersona As ResultadoIdentificacion = HttpContext.Current.Session("Persona")
|
||||
If usuarios = "MODOPROPIO" Then
|
||||
Dim listUs As List(Of String) = sessionUsuario.Split(",").ToList
|
||||
usuariosSeleccionados = listUs
|
||||
Else
|
||||
Dim listUs As List(Of String) = usuarios.Split(",").ToList
|
||||
Dim nuevaListUsus As New List(Of String)
|
||||
For Each itm As String In listUs
|
||||
Dim usuaanadir = sessionPersona.Personas.Where(Function(x) x.Dni = itm)
|
||||
If usuaanadir.Count > 0 Then
|
||||
nuevaListUsus.Add(usuaanadir.First.Dni)
|
||||
End If
|
||||
Next
|
||||
usuariosSeleccionados = nuevaListUsus
|
||||
End If
|
||||
End Function
|
||||
Protected Sub Unnamed_ServerClick(sender As Object, e As EventArgs)
|
||||
If UtilAntifraude.CheckCred() = False Then
|
||||
Response.Redirect("/Default.aspx")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim usuariosSeleccionados As List(Of String) = HttpContext.Current.Session("usuariosSeleccionados")
|
||||
Dim sessionUsuario As String = HttpContext.Current.Session("usuario")
|
||||
Dim listUs As List(Of String) = sessionUsuario.Split(",").ToList
|
||||
usuariosSeleccionados = listUs
|
||||
Session.Add("usuariosSeleccionados", usuariosSeleccionados)
|
||||
Session.Add("modo", "PROPIO")
|
||||
Session.Add("avisoBorradores", True)
|
||||
Response.Redirect("/home.aspx")
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user