...
This commit is contained in:
@@ -30,28 +30,24 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="container">
|
@if (request!=null)
|
||||||
<nav aria-label="Page navigation">
|
{
|
||||||
<ul class="pagination justify-content-center">
|
<div class="container">
|
||||||
@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>
|
<Pagination TotalPages=@request.PageCount
|
||||||
</nav>
|
ActivePageNumber="@PageIndex"
|
||||||
</div>
|
PageChanged="OnPageChangedAsync"
|
||||||
|
Alignment="Alignment.Center"
|
||||||
|
FirstLinkIcon="IconName.ChevronDoubleRight"
|
||||||
|
PreviousLinkIcon="IconName.ChevronRight"
|
||||||
|
|
||||||
|
NextLinkIcon="IconName.ChevronLeft"
|
||||||
|
LastLinkIcon="IconName. ChevronDoubleLeft" />
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
@@ -59,12 +55,16 @@
|
|||||||
public int PageIndex { get; set; }
|
public int PageIndex { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Shared.DTOs.PagingDto<QuestionDto>? request { get; set; }
|
public Shared.DTOs.PagingDto<QuestionDto>? request { get; set; }
|
||||||
|
private async Task OnPageChangedAsync(int newPageNumber)
|
||||||
|
{
|
||||||
|
request = await _hc.GetFromJsonAsync<PagingDto<QuestionDto>>($"Base/LastQuestion?PageIndex={newPageNumber}&PageSize=5");
|
||||||
|
|
||||||
|
await Task.Run(() => { PageIndex = newPageNumber; });
|
||||||
|
}
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
request = await _hc.GetFromJsonAsync<PagingDto<QuestionDto>>($"Base/LastQuestion?PageIndex={PageIndex}&PageSize=10");
|
request = await _hc.GetFromJsonAsync<PagingDto<QuestionDto>>($"Base/LastQuestion?PageIndex={PageIndex}&PageSize=5");
|
||||||
await base.OnParametersSetAsync();
|
await base.OnParametersSetAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-12">
|
<div class="col-xl-12">
|
||||||
<div class="blog-details-big-img z-index-2">
|
<div class="blog-details-big-img z-index-2">
|
||||||
<img src="img/blog/@Item?.Photo" alt="">
|
<img src="img/blog/@Item?.Photo" width="400" height="400" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -36,10 +36,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
|||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
||||||
|
|
||||||
//Home
|
//Home
|
||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||||
|
|
||||||
//farzan
|
//farzan
|
||||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||||
|
|
||||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
||||||
|
|
||||||
|
BIN
TaxPayerFull/wwwroot/img/blog/33.jpg
Normal file
BIN
TaxPayerFull/wwwroot/img/blog/33.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 KiB |
BIN
TaxPayerFull/wwwroot/img/blog/34.jpg
Normal file
BIN
TaxPayerFull/wwwroot/img/blog/34.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 369 KiB |
BIN
TaxPayerFull/wwwroot/img/blog/35.jpg
Normal file
BIN
TaxPayerFull/wwwroot/img/blog/35.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 286 KiB |
BIN
TaxPayerFull/wwwroot/img/blog/37.jpg
Normal file
BIN
TaxPayerFull/wwwroot/img/blog/37.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 298 KiB |
BIN
TaxPayerFull/wwwroot/img/blog/43.jpg
Normal file
BIN
TaxPayerFull/wwwroot/img/blog/43.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 266 KiB |
Reference in New Issue
Block a user