Imports System.Net.Http Imports System.Net.Http.Headers Imports WebIntranet.ClasesDatosAdmin Public Class Puestos 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 ' Response.Redirect("~/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/VIDA_ADMINISTRATIVA/puestospersona/" & idPers Dim puestosItems = Await UtilAntifraude.ObtenerObjeto(Of List(Of PuestoPersona))(client, url) Dim htmlTabla = "" If (puestosItems.Count > 0) Then htmlTabla += "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" For Each itm As PuestoPersona In puestosItems htmlTabla += "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" Next htmlTabla += "
Puesto de trabajoNivelClase personalGrupoFecha inicioFecha finCaracter OcupaciónAñosMesesDías
" + itm.Puesto + "" + itm.Nivel + "" + itm.Adscripcion + "" + itm.Grupo + "" + If(Not itm.FechaToPo = Nothing, itm.FechaToPo.ToString("dd/MM/yyyy"), "") + "" + If(Not itm.FechaCese = Nothing, itm.FechaCese.ToString("dd/MM/yyyy"), "") + "" + itm.CaracterOcu + "" + itm.AnosSer.ToString + "" + itm.MesesSer.ToString + "" + itm.DiasSer.ToString + "
" Else htmlTabla += "

No se han encontrado resultados

" End If divTablaPuestos.InnerHtml = htmlTabla 'End If End Sub End Class