48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using LiMan.DB.DTO;
|
|
using LiMan.UI.Data;
|
|
using Microsoft.AspNetCore.Components;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LiMan.UI.Components
|
|
{
|
|
public partial class InstallInfoStats
|
|
{
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected LiManDataService LMDService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await ReloadData();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Properties
|
|
|
|
private DateTime DtFine { get; set; } = DateTime.Today.AddHours(DateTime.Now.Hour);
|
|
private DateTime DtInizio { get; set; } = DateTime.Today.AddMonths(-1);
|
|
private InstallStatusDTO InfoStats { get; set; } = new InstallStatusDTO();
|
|
|
|
private bool isLoading { get; set; } = false;
|
|
|
|
#endregion Private Properties
|
|
|
|
#region Private Methods
|
|
|
|
private async Task ReloadData()
|
|
{
|
|
isLoading = true;
|
|
InfoStats = await LMDService.InstallStatusGetInfo(DtInizio, DtFine);
|
|
isLoading = false;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |