|
|
|
@ -31,19 +31,17 @@ namespace BlazorApp.Components
|
|
|
|
|
|
|
|
|
|
private int totalItem;
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
public bool IsSorted { get; set; }
|
|
|
|
|
=======
|
|
|
|
|
|
|
|
|
|
private int PageSize { get; set; }
|
|
|
|
|
private int CurrentPage { get; set; }
|
|
|
|
|
|
|
|
|
|
private bool IsSorted { get; set; }
|
|
|
|
|
private int CurrentPage { get; set; }
|
|
|
|
|
|
|
|
|
|
>>>>>>> ffa1fa821cc019ca5b6c2b58235c7474e8f62dd1
|
|
|
|
|
|
|
|
|
|
public InventoryComp()
|
|
|
|
|
{
|
|
|
|
|
Actions = new ObservableCollection<CraftingAction>();
|
|
|
|
|
|
|
|
|
|
Actions.CollectionChanged += OnActionsCollectionChanged;
|
|
|
|
|
|
|
|
|
|
this.InventoryItems = new List<Item>(new Item[18]);
|
|
|
|
@ -60,19 +58,6 @@ namespace BlazorApp.Components
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
if (!e.CancellationToken.IsCancellationRequested && IsSorted ==false)
|
|
|
|
|
{
|
|
|
|
|
Items = await DataService.List(e.Page, e.PageSize);
|
|
|
|
|
totalItem = await DataService.Count();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Items = await DataService.SortedList(e.Page, e.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
=======
|
|
|
|
|
if (!e.CancellationToken.IsCancellationRequested && !IsSorted)
|
|
|
|
|
{
|
|
|
|
|
Items = await DataService.List(e.Page, e.PageSize);
|
|
|
|
@ -86,25 +71,14 @@ namespace BlazorApp.Components
|
|
|
|
|
PageSize = e.PageSize;
|
|
|
|
|
Items = await DataService.SortedList(CurrentPage, PageSize);
|
|
|
|
|
}
|
|
|
|
|
>>>>>>> ffa1fa821cc019ca5b6c2b58235c7474e8f62dd1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task SortByName()
|
|
|
|
|
{
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
if (IsSorted)
|
|
|
|
|
{
|
|
|
|
|
IsSorted = false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
IsSorted = true;
|
|
|
|
|
=======
|
|
|
|
|
if (!IsSorted)
|
|
|
|
|
{
|
|
|
|
|
IsSorted = true;
|
|
|
|
|
Items = await DataService.SortedList(CurrentPage, PageSize);
|
|
|
|
|
>>>>>>> ffa1fa821cc019ca5b6c2b58235c7474e8f62dd1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|