70 lines
1.7 KiB
C#
70 lines
1.7 KiB
C#
using GPW.CORE.Data.DbModels;
|
|
using GPW.CORE.Smart.Data;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace GPW.CORE.Smart.Components.Compo
|
|
{
|
|
public partial class TimbUser
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public int IdxDipCurr { get; set; } = 0;
|
|
|
|
[Parameter]
|
|
public List<TimbratureModel>? ListTimbRich { get; set; } = null;
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Methods
|
|
|
|
/// <summary>
|
|
/// Aggiorno e riporto update
|
|
/// </summary>
|
|
protected async void DoUpdate(bool forceReload)
|
|
{
|
|
if (forceReload)
|
|
{
|
|
isLoading = true;
|
|
await InvokeAsync(StateHasChanged);
|
|
// richiesta rilettura dati...
|
|
ListTimbRich = null;
|
|
await Task.Delay(1);
|
|
await ReloadData();
|
|
await Task.Delay(1);
|
|
isLoading = false;
|
|
await ReqReload.InvokeAsync(true);
|
|
}
|
|
}
|
|
|
|
[Parameter]
|
|
public EventCallback<bool> ReqReload { get; set; }
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
await ReloadData();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Properties
|
|
|
|
[Inject]
|
|
private CoreSmartDataService CDService { get; set; } = null!;
|
|
|
|
private bool isLoading { get; set; } = false;
|
|
|
|
#endregion Private Properties
|
|
|
|
#region Private Methods
|
|
|
|
private async Task ReloadData()
|
|
{
|
|
isLoading = true;
|
|
await Task.Delay(1);
|
|
isLoading = false;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |