AccountTypes and ProductLines
parent
a95e36bee0
commit
1f2090ac79
@ -0,0 +1,54 @@
|
||||
@page "/AccountTypes/Index"
|
||||
|
||||
@using Gremlin_BlazorServer.Data.EntityClasses;
|
||||
@using Gremlin_BlazorServer.Services;
|
||||
@using System.Globalization;
|
||||
@using System.Diagnostics;
|
||||
|
||||
@inject AccountTypeService accountTypeService
|
||||
|
||||
<h1>AccountTypes</h1>
|
||||
|
||||
@if (accountTypes is null)
|
||||
{
|
||||
<p><em>Loading... !</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Es wurden @accountTypes.Count AccountTypes gefunden.</p>
|
||||
@if (accountTypes != null)
|
||||
{
|
||||
<DataGrid
|
||||
TItem="AccountType"
|
||||
Data="@accountTypes"
|
||||
@bind-SelectedRow="@selectedAccountType"
|
||||
TotalItems="@totalAccountTypeLines"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Bordered
|
||||
Hoverable
|
||||
Striped
|
||||
Responsive>
|
||||
<DataGridCommandColumn />
|
||||
<DataGridColumn Field="@nameof(AccountType.AccountTypeCode)" Caption="AccountTypeNumber"/>
|
||||
<DataGridColumn Field="@nameof(AccountType.AccountTypeDescription)" Caption="AccountTypeDescription" Editable />
|
||||
</DataGrid>
|
||||
|
||||
<p>AccountType @selectedAccountType.AccountTypeCode selected.</p>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
private int totalAccountTypeLines;
|
||||
public string searchAccountType = "";
|
||||
CultureInfo cultureInfo = new("de-DE");
|
||||
|
||||
AccountType selectedAccountType = new();
|
||||
List<AccountType> accountTypes = new();
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
accountTypes = await Task.Run(() => accountTypeService.GetAllAccountTypesAsync());
|
||||
selectedAccountType = accountTypes.FirstOrDefault()!;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
@page "/ProductLines/Index"
|
||||
|
||||
@using Gremlin_BlazorServer.Data.EntityClasses;
|
||||
@using Gremlin_BlazorServer.Services;
|
||||
@using System.Globalization;
|
||||
@using System.Diagnostics;
|
||||
|
||||
@inject ProductLineService productLineService
|
||||
|
||||
<h1>ProductLines</h1>
|
||||
|
||||
@if (productLines is null)
|
||||
{
|
||||
<p><em>Loading... !</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Es wurden @productLines.Count ProductLines gefunden.</p>
|
||||
@if (productLines != null)
|
||||
{
|
||||
<DataGrid
|
||||
TItem="ProductLine"
|
||||
Data="@productLines"
|
||||
@bind-SelectedRow="@selectedProductLine"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Bordered
|
||||
Hoverable
|
||||
Striped
|
||||
Responsive>
|
||||
<DataGridCommandColumn />
|
||||
<DataGridColumn Field="@nameof(ProductLine.ProductLineCode)" Caption="ProductLineNumber"/>
|
||||
<DataGridColumn Field="@nameof(ProductLine.ProductLineDescription)" Caption="ProductLineDescription" Editable />
|
||||
</DataGrid>
|
||||
|
||||
<p>ProductLine @selectedProductLine.ProductLineCode selected.</p>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
public string searchProductLine = "";
|
||||
CultureInfo cultureInfo = new("de-DE");
|
||||
|
||||
ProductLine selectedProductLine = new();
|
||||
List<ProductLine> productLines = new();
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
productLines = await Task.Run(() => productLineService.GetAllProductLinesAsync());
|
||||
selectedProductLine = productLines.FirstOrDefault()!;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue