You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KWWebInvApp/Pages/Branches.razor

41 lines
1.3 KiB
Plaintext

@page "/branches"
<h3>Branches</h3>
<PageTitle>Branches</PageTitle>
<MudText Typo="Typo.h3" GutterBottom="true">List of Branches</MudText>
@if (branchList == null)
{
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
}
else
{
<MudTable Items="branchList" Hover="true" SortLabel="Sort By" Elevation="0" Dense>
<HeaderContent>
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<BranchServices.branch, object>(x=>x.brCode)">Branch Code</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<BranchServices.branch, object>(x=>x.brDesc)">Description</MudTableSortLabel></MudTh>
<MudTh>Summary</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Temp. (C)">@context.brCode</MudTd>
<MudTd DataLabel="Temp. (F)">@context.brDesc</MudTd>
<MudTd DataLabel="Summary">@context.address</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
</PagerContent>
</MudTable>
}
@code {
public BranchServices.branch[]? branchList;
protected override async Task OnInitializedAsync()
{
BranchServices.BranchServiceClient branchServiceClient = new();
branchList = await branchServiceClient.GetDataAsync();
}
}