cambios en apidenuncias

This commit is contained in:
2026-04-30 08:55:00 +02:00
parent 3b77fc827d
commit b22f02807d
295 changed files with 26359 additions and 3777 deletions

View File

@@ -0,0 +1,42 @@
Imports System.Net.Http
Imports System.Net.Http.Headers
Imports WebIntranet.ClasesDatosAdmin
Public Class CarHor
Inherits System.Web.UI.Page
Protected Async Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'If (Session("persona") Is Nothing) Then
' ("Default.aspx", False)
'Else
Dim token As String = Session("token")
Dim client As New HttpClient()
client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", token)
client.BaseAddress = New Uri(ConfigurationManager.AppSettings("SwaggerVB"))
Dim idPers = Session("persona").Personas(0).idPersona
Dim url As String = "/api/COMPLEMENTOSCARRERA/GruposEnumExtend/" & idPers
Dim puestosItems = Await UtilAntifraude.ObtenerObjeto(Of List(Of COMPLEMENTOSCARRERA))(client, url)
Dim htmlTabla = ""
If (puestosItems.Count > 0) Then
htmlTabla += "<table class='tablaPicadas'>" +
"<tr><th>Fecha inicio</th>" +
"<th>Fecha fin</th>" +
"<th>Grupo</th>" +
"<th>Tramo</th></tr>"
For Each itm As COMPLEMENTOSCARRERA In puestosItems
htmlTabla += "<tr>" +
"<td>" + If(itm.FECHAINICIO IsNot Nothing, itm.FECHAINICIO.ToString.Substring(0, 10), "") + "</td>" +
"<td>" + If(itm.FECHAFIN IsNot Nothing, itm.FECHAFIN.ToString.Substring(0, 10), "") + "</td>" +
"<td>" + itm.IDGRUPONavigation.GRUPO1 + "</td>" +
"<td>" + itm.IDTRAMONavigation.DESCRIPCION + "</td></tr>"
Next
htmlTabla += "</table>"
Else
htmlTabla += "<p style='color:red;font-weight:bold'>No se han encontrado resultados</p>"
End If
divTabla.InnerHtml = htmlTabla
End Sub
End Class