...
This commit is contained in:
70
TaxPayerFull/Layout/LQuestion.razor
Normal file
70
TaxPayerFull/Layout/LQuestion.razor
Normal file
@@ -0,0 +1,70 @@
|
||||
@using Shared.DTOs
|
||||
@inject HttpClient _hc
|
||||
@inject NavigationManager Navigation
|
||||
<div class="tp-faq-area pt-50">
|
||||
<div class="container p-0">
|
||||
<div class="row g-0">
|
||||
<div class="col-xl-12">
|
||||
<h4 class="sv-details-title">سوالات پر تکرار</h4>
|
||||
<div class="tp-custom-accordion">
|
||||
<div class="accordion tp-inner-font" id="accordionExample">
|
||||
|
||||
@foreach (var item in request?.list)
|
||||
{
|
||||
<ItemQuestion Item="item" />
|
||||
}
|
||||
@* <ItemQuestion item="request?.list[0]" /> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination justify-content-center">
|
||||
@for (int page = 1; page <= request?.PageCount; page++)
|
||||
{
|
||||
if (page == PageIndex)
|
||||
{
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="@Navigation.GetUriWithQueryParameter("PageIndex",page)">@(page)</a>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="@Navigation.GetUriWithQueryParameter("PageIndex",page)">@(page)</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter, SupplyParameterFromQuery]
|
||||
public int? PageIndex { get; set; }
|
||||
|
||||
QuestionDto modeltest = new QuestionDto
|
||||
{
|
||||
Answer = "ندارد",
|
||||
Category = "تست",
|
||||
ID = 1,
|
||||
Title = "دسته"
|
||||
};
|
||||
|
||||
public Shared.DTOs.PagingDto<QuestionDto>? request { get; set; } = new PagingDto<QuestionDto>(1, 1, new List<QuestionDto>()
|
||||
{
|
||||
new QuestionDto
|
||||
{
|
||||
Answer="ندارد",Category="تست",ID=1,Title="دسته"
|
||||
}
|
||||
});
|
||||
|
||||
// protected override async Task OnParametersSetAsync()
|
||||
// {
|
||||
// if (PageIndex == null) PageIndex = 1;
|
||||
// request = await _hc.GetFromJsonAsync<PagingDto<QuestionDto>>($"Base/LastQuestion?PageIndex={PageIndex ?? 1}&PageSize=6");
|
||||
// await base.OnParametersSetAsync();
|
||||
// }
|
||||
}
|
Reference in New Issue
Block a user