...
This commit is contained in:
@@ -30,28 +30,24 @@
|
||||
|
||||
</div>
|
||||
<br />
|
||||
@if (request!=null)
|
||||
{
|
||||
<div class="container">
|
||||
<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>
|
||||
}
|
||||
|
||||
<Pagination TotalPages=@request.PageCount
|
||||
ActivePageNumber="@PageIndex"
|
||||
PageChanged="OnPageChangedAsync"
|
||||
Alignment="Alignment.Center"
|
||||
FirstLinkIcon="IconName.ChevronDoubleRight"
|
||||
PreviousLinkIcon="IconName.ChevronRight"
|
||||
|
||||
NextLinkIcon="IconName.ChevronLeft"
|
||||
LastLinkIcon="IconName. ChevronDoubleLeft" />
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
@@ -59,12 +55,16 @@
|
||||
public int PageIndex { 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()
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<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>
|
||||
|
@@ -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/") });
|
||||
|
||||
//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
|
||||
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");
|
||||
|
||||
|
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