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.
40 lines
940 B
40 lines
940 B
using Blazored.LocalStorage;
|
|
using Blazorise.DataGrid;
|
|
using Microsoft.AspNetCore.Components;
|
|
using TutoBlazer.Models;
|
|
|
|
namespace TutoBlazer.Pages
|
|
{
|
|
public partial class List
|
|
{
|
|
private List<Item> items;
|
|
|
|
private int totalItem;
|
|
|
|
[Inject]
|
|
public IDataService DataService { get; set; }
|
|
|
|
[Inject]
|
|
public IWebHostEnvironment WebHostEnvironment { get; set; }
|
|
|
|
private async Task OnReadData(DataGridReadDataEventArgs<Item> e)
|
|
{
|
|
if (e.CancellationToken.IsCancellationRequested)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (!e.CancellationToken.IsCancellationRequested)
|
|
{
|
|
items = await DataService.List(e.Page, e.PageSize);
|
|
totalItem = await DataService.Count();
|
|
}
|
|
}
|
|
|
|
private void OnDelete(int id)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|