Merge branch 'master' of https://codefirst.iut.uca.fr/git/theo.renaud/Projet_blazor
continuous-integration/drone/push Build is failing Details

master
Lou VALADE 2 years ago
commit c91426d333

@ -65,7 +65,6 @@
<div class="col-12"> <div class="col-12">
<div>@Localizer["Logs"]</div> <div>@Localizer["Logs"]</div>
<div class="actions" id="actions"> <div class="actions" id="actions">
</div> </div>
</div> </div>

@ -20,6 +20,7 @@
Responsive> Responsive>
</DataGrid> </DataGrid>
<button type="button" class="btn btn-danger" @onclick="() => SortItem()"><i class="fa fa-trash"></i> Supprimer</button>
<p> <p>
<b>CurrentCulture</b>: @CultureInfo.CurrentCulture <b>CurrentCulture</b>: @CultureInfo.CurrentCulture

@ -40,14 +40,18 @@ namespace BlazorApp1.Pages
if (!e.CancellationToken.IsCancellationRequested) if (!e.CancellationToken.IsCancellationRequested)
{ {
Items = await DataService.List(e.Page, e.PageSize); Items = await DataService.List(e.Page, e.PageSize);
SortItem2(Items);
totalItem = await DataService.Count(); totalItem = await DataService.Count();
} }
} }
private List<Item> SortItem() private List<Item> SortItem2(List<Item> i)
{ {
List<Item> ListeOrder = new List<Item>(); i.OrderBy(i => i.DisplayName).ToList();
ListeOrder = (List<Item>)ListeOrder.OrderBy(Item => Item.DisplayName); return i;
return ListeOrder; }
private void SortItem()
{
SortItem2((List<Item>)Items);
} }
} }
} }

Loading…
Cancel
Save