...
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
@using Shared.DTOs.Serch
|
||||
@inject HttpClientController hc;
|
||||
<PageTitle>مشتری</PageTitle>
|
||||
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -78,13 +80,12 @@
|
||||
|
||||
@* pagination *@
|
||||
<nav aria-label="Page navigation">
|
||||
<br />
|
||||
<ul class="pagination justify-content-center">
|
||||
@for (int page = 1; page <= request?.PageCount; page++)
|
||||
{
|
||||
if (page == PageIndex)
|
||||
{
|
||||
<li class="page-item disabled">
|
||||
<li class="page-item active">
|
||||
<a class="page-link" href="@hc._nav.GetUriWithQueryParameter("PageIndex",page)">@(page)</a>
|
||||
</li>
|
||||
}
|
||||
@@ -95,15 +96,21 @@
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@layout PanelLayout
|
||||
@code {
|
||||
|
||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||
|
||||
|
||||
// alert
|
||||
AlertColor alertColor = AlertColor.Primary;
|
||||
IconName alertIconName = IconName.CheckCircleFill;
|
||||
@@ -112,6 +119,7 @@
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
|
||||
if (PageIndex == null) PageIndex = 1;
|
||||
await LoadCus(PageIndex.Value);
|
||||
await base.OnParametersSetAsync();
|
||||
@@ -139,6 +147,7 @@
|
||||
}
|
||||
public async Task LoadCus(int pi)
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
var rsp = await hc.Post<ItemSerchGetCustomer>("Customer/GetAll", new ItemSerchGetCustomer()
|
||||
{
|
||||
PageIndex=pi
|
||||
@@ -155,5 +164,6 @@
|
||||
{
|
||||
ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
PreloadService.Hide();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user