parent
f0d89e4874
commit
8e96c6addd
@ -1,51 +1,48 @@
|
||||
@page "/inventory"
|
||||
@using myBlazorApp.Components
|
||||
@page "/inventory"
|
||||
@using myBlazorApp.Components
|
||||
@using System.Globalization
|
||||
@using myBlazorApp.Models;
|
||||
|
||||
|
||||
|
||||
<div class="body">
|
||||
<div class="inventory">
|
||||
<MyInventory/>
|
||||
</div>
|
||||
|
||||
<div id="ItemList">
|
||||
<div>
|
||||
<h3>List of Items</h3>
|
||||
@*SearchBar*@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ItemList" class="align-end">
|
||||
<div>
|
||||
<p>
|
||||
@using myBlazorApp.Models;
|
||||
|
||||
|
||||
|
||||
<div class="body">
|
||||
<div class="inventory">
|
||||
<MyInventory/>
|
||||
</div>
|
||||
|
||||
<div id="ItemList">
|
||||
|
||||
<div id="ItemList" class="align-end">
|
||||
<div>
|
||||
<p>
|
||||
List of items
|
||||
</p>
|
||||
@*SearchBar*@
|
||||
|
||||
</div>
|
||||
|
||||
<DataGrid TItem="Item"
|
||||
Data="@items"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalItem"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="Item" Field=""/>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" />
|
||||
</div>
|
||||
|
||||
<DataGrid TItem="Item"
|
||||
Data="@items"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalItem"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="Item" Field=""/>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="Image">
|
||||
@if (!string.IsNullOrWhiteSpace(context.ImageBase64))
|
||||
{
|
||||
<img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="min-width: 50px; max-width: 150px" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="images/default.png" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="max-width: 150px"/>
|
||||
}
|
||||
</DataGridColumn>
|
||||
</DataGrid>
|
||||
</div>
|
||||
</div>
|
||||
<DisplayTemplate>
|
||||
@if (!string.IsNullOrWhiteSpace(context.ImageBase64))
|
||||
{
|
||||
<img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="min-width: 50px; max-width: 150px" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="images/default.png" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="max-width: 150px"/>
|
||||
}
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
</DataGrid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue