You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BlazorApp/Sources/BlazorT/Composants/InventoryItemTR.razor

38 lines
1.3 KiB

@using BlazorT.Composants
@using BlazorT.Models;
@using BlazorStrap.V5
<BSDataTableRow ondragover="event.preventDefault();"
draggable="true"
@ondragstart="@OnDragStart"
@ondrop="@OnDrop"
@ondragenter="@OnDragEnter"
@ondragleave="@OnDragLeave">
<BSTD>
@Item.Id
</BSTD>
<BSTD>
<DisplayTemplate>
@if (!string.IsNullOrWhiteSpace(Item.ImageBase64))
{
<img src="data:image/png;base64, @(Item.ImageBase64)" class="img-thumbnail" title="@Item.DisplayName" alt="@Item.DisplayName" style="min-width: 50px; max-width: 150px" />
}
else
{
<img src="images/default.png" class="img-thumbnail" title="@Item.DisplayName" alt="@Item.DisplayName" style="max-width: 150px" />
}
</DisplayTemplate>
</BSTD>
<BSTD>
@Item.Name
</BSTD>
<BSTD>
<DisplayTemplate>
<a href="Edit/@(Item.Id)" class="btn btn-primary"><i class="fa fa-edit"></i> Editer</a>
<button type="button" class="btn btn-primary" @onclick="() => OnDeleteAsync(Item.Id)"><i class="fa fa-trash"></i> Supprimer</button>
</DisplayTemplate>
</BSTD>
</BSDataTableRow>