using Microsoft.AspNetCore.Components; using MP.Land.Data; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MP.Land.Pages { public partial class UpdateManager { #region Private Fields private List 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 /// /// Cicla su tutti i record ed effettua il download /// protected void DownloadAll() { } protected override void OnInitialized() { AppMService.ShowSearch = false; AppMService.PageName = "Update Manager"; AppMService.PageIcon = "fas fa-download 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 } }