85 lines
3.0 KiB
Plaintext
85 lines
3.0 KiB
Plaintext
@using System.Net.Http.Headers
|
|
@using System.Linq.Expressions
|
|
@using Newtonsoft.Json
|
|
@using System.Text
|
|
@using Serialize.Linq.Serializers
|
|
@using GestionPersonalWeb.Models
|
|
@using BlazorBootstrap
|
|
@using bdAntifraude.db
|
|
@using Microsoft.AspNetCore.Components
|
|
@rendermode InteractiveServer
|
|
@inject IJSRuntime JS
|
|
@inject NavigationManager NavigationManager
|
|
@inject IHttpClientFactory HttpClientFactory
|
|
@inject IHttpContextAccessor HttpContextAccessor
|
|
@inject UserState UserState
|
|
|
|
<div class="tablaTabLateral">
|
|
<div style="overflow-x:auto;" class="tablaDesk">
|
|
<Grid TItem="OTRASRETRIBUCIONES"
|
|
Class="table tablaRegPers"
|
|
Data="itmList"
|
|
AllowFiltering="false"
|
|
PageSize="10"
|
|
AllowPaging="true"
|
|
AllowSorting="true"
|
|
EmptyText="No se han encontrado datos"
|
|
Height="100"
|
|
PageSizeSelectorVisible="false"
|
|
PageSizeSelectorItems="@(new int[] { 5, 10, 20, 50 })"
|
|
Responsive="true"
|
|
PaginationItemsTextFormat="{0} - {1} de {2} elementos">
|
|
|
|
<GridColumns>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="Mes">
|
|
@context.MES
|
|
</GridColumn>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="Año">
|
|
@context.AÑO
|
|
</GridColumn>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="Importe">
|
|
@context.IMPORTE
|
|
</GridColumn>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="Seguridad Social">
|
|
@if (context.SEGURIDADSOCIAL)
|
|
{
|
|
<i class="fa-regular fa-square-check"></i>
|
|
}
|
|
</GridColumn>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="IRPF">
|
|
@if (context.IRPF)
|
|
{
|
|
<i class="fa-regular fa-square-check"></i>
|
|
}
|
|
</GridColumn>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="Cra">
|
|
@context.CRA
|
|
</GridColumn>
|
|
<GridColumn TItem="OTRASRETRIBUCIONES" HeaderText="Descripción">
|
|
@context.DESCRIPCION
|
|
</GridColumn>
|
|
</GridColumns>
|
|
</Grid>
|
|
</div>
|
|
</div>
|
|
@code {
|
|
[Parameter]
|
|
public PERSONAS Persona { get; set; } = new PERSONAS();
|
|
private HttpClient cliente = new HttpClient();
|
|
[Parameter]
|
|
public EventCallback OnPersonaActualizada { get; set; }
|
|
private List<OTRASRETRIBUCIONES> itmList = new List<OTRASRETRIBUCIONES>();
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
try
|
|
{
|
|
var listnom = Persona.OTRASRETRIBUCIONES;
|
|
foreach (OTRASRETRIBUCIONES i in listnom) { itmList.Add(i); }
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine($"Error al obtener los datos: {e.Message}");
|
|
}
|
|
}
|
|
}
|