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.

45 lines
1.1 KiB

using BlazorAppClean.Models;
using Blazorise.DataGrid;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using BlazorAppClean.Modals;
using BlazorAppClean.Models;
using BlazorAppClean.Services;
using Blazored.LocalStorage;
using Blazored.Modal;
using Blazored.Modal.Services;
using Blazorise.DataGrid;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using Blazorise;
namespace BlazorAppClean.Components
{
public partial class InventoryComponent
{
[Inject]
public IDataService DataService { get; set; }
private int totalItem;
public List<Item> Items { get; set; } = new List<Item>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
base.OnAfterRenderAsync(firstRender);
if (!firstRender)
{
return;
}
Items = await DataService.getAll();
totalItem = await DataService.Count();
StateHasChanged();
}
}
}