Files
mapo-core/MP.Land/Pages/Index.razor.cs
T
Samuele Locatelli 4f4cd7bf2f Ok singolo download
2021-09-20 19:21:42 +02:00

67 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MP.Land.Data;
using MP.Land.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Configuration;
using MP.AppAuth.Models;
namespace MP.Land.Pages
{
public partial class Index
{
#region Private Fields
private List<MP.AppAuth.Models.UpdMan> ListRecords;
#endregion Private Fields
#region Protected Fields
protected int totalCount = 0;
#endregion Protected Fields
#region Protected Properties
[Inject]
protected MessageService AppMService { get; set; }
[Inject]
protected AppAuthService DataService { get; set; }
#endregion Protected Properties
#region Protected Methods
protected override void OnInitialized()
{
AppMService.ShowSearch = false;
AppMService.PageName = "Home";
AppMService.PageIcon = "fas fa-home pr-2";
}
protected override async Task OnInitializedAsync()
{
await ReloadAllData();
}
protected async Task ReloadAllData()
{
await ReloadData();
}
protected async Task ReloadData()
{
// importante altrimenti NON mostra update UI
await Task.Delay(1);
ListRecords = await DataService.UpdManList();
totalCount = ListRecords.Count();
await Task.Delay(1);
}
#endregion Protected Methods
}
}