parent
4bfa49f0c2
commit
1c3dcf10cf
@ -1,36 +1,28 @@
|
||||
@page "/list"
|
||||
@using Models
|
||||
|
||||
<h3>List</h3>
|
||||
|
||||
@if (items != null)
|
||||
{
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Display Name</th>
|
||||
<th>Stack Size</th>
|
||||
<th>Maximum Durability</th>
|
||||
<th>Enchant Categories</th>
|
||||
<th>Repair With</th>
|
||||
<th>Created Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in items)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id</td>
|
||||
<td>@item.DisplayName</td>
|
||||
<td>@item.StackSize</td>
|
||||
<td>@item.MaxDurability</td>
|
||||
<td>@(string.Join(", ", item.EnchantCategories))</td>
|
||||
<td>@(string.Join(", ", item.RepairWith))</td>
|
||||
<td>@item.CreatedDate.ToShortDateString()</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
}
|
||||
<DataGrid TItem="Item"
|
||||
Data="@items"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalItem"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="#" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="Stack size" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.MaxDurability)" Caption="Maximum durability" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.EnchantCategories)" Caption="Enchant categories">
|
||||
<DisplayTemplate>
|
||||
@(string.Join(", ", ((Item)context).EnchantCategories))
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.RepairWith)" Caption="Repair with">
|
||||
<DisplayTemplate>
|
||||
@(string.Join(", ", ((Item)context).RepairWith))
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.CreatedDate)" Caption="Created date" DisplayFormat="{0:d}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" />
|
||||
</DataGrid>
|
Loading…
Reference in new issue