cambios en apidenuncias
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
Imports System.Net.Http
|
||||
Imports System.Net.Http.Headers
|
||||
Imports WebIntranet.ClasesDatosAdmin
|
||||
|
||||
Public Class titulaciones
|
||||
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/TITULACIONES/GetWithIncludes/" & idPers
|
||||
Dim puestosItems = Await UtilAntifraude.ObtenerObjeto(Of List(Of ClasesDatosAdmin.TITULACIONES))(client, url)
|
||||
Dim htmlTabla = ""
|
||||
If puestosItems.Count > 0 Then
|
||||
htmlTabla += "<table class='tablaPicadas'>" +
|
||||
"<tr><th>Descripción</th>" +
|
||||
"<th>Centro</th>" +
|
||||
"<th>Fecha expedición</th>" +
|
||||
"<th>Fecha incripción provisional</th>" +
|
||||
"<th>Fecha incripción definitiva</th></tr>"
|
||||
For Each itm As ClasesDatosAdmin.TITULACIONES In puestosItems
|
||||
Dim ruta = "/fichero.aspx?id=" + itm.IDTITULACION.ToString() + "&cl=" + tsl5.crypt.SHA1("M3Soft." & itm.IDTITULACION.ToString) + "&t=TITULACION"
|
||||
|
||||
htmlTabla += "<tr>" +
|
||||
"<td>" + If(itm.RUTA IsNot Nothing, "<a href='" + ruta + "' target='_blank'>" + itm.DESCRIPCION + "</a>", itm.DESCRIPCION) + "</td>" +
|
||||
"<td>" + itm.CENTRO + "</td>" +
|
||||
"<td>" + If(itm.FECHA_EXPEDICION IsNot Nothing, itm.FECHA_EXPEDICION.ToString.Substring(0, 10), "") + "</td>" +
|
||||
"<td>" + If(itm.FECHA_INSCRIPCION_PROVISIONAL IsNot Nothing, itm.FECHA_INSCRIPCION_PROVISIONAL.ToString.Substring(0, 10), "") + "</td>" +
|
||||
"<td>" + If(itm.FECHA_INSCRIPCION_DEFINITIVA IsNot Nothing, itm.FECHA_INSCRIPCION_DEFINITIVA.ToString.Substring(0, 10), "") + "</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
|
||||
Reference in New Issue
Block a user