|
|
@ -61,6 +61,11 @@ namespace BlazorApp.Services
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<Item> it = await _http.GetFromJsonAsync<List<Item>>($"https://localhost:7234/api/Crafting/all/");
|
|
|
|
List<Item> it = await _http.GetFromJsonAsync<List<Item>>($"https://localhost:7234/api/Crafting/all/");
|
|
|
|
it = it.OrderBy(i => i.DisplayName).ToList();
|
|
|
|
it = it.OrderBy(i => i.DisplayName).ToList();
|
|
|
|
|
|
|
|
if ((currentPage - 1) * 10+ pageSize > it.Count)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int tmp = ((currentPage - 1) * 10 + pageSize) - it.Count;
|
|
|
|
|
|
|
|
return it.GetRange((currentPage - 1) * 10, pageSize - tmp);
|
|
|
|
|
|
|
|
}
|
|
|
|
return it.GetRange((currentPage - 1) * 10, pageSize);
|
|
|
|
return it.GetRange((currentPage - 1) * 10, pageSize);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|