52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using GWMS.UI.Data;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.JSInterop;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace GWMS.UI.Pages
|
|
{
|
|
public partial class Parameters
|
|
{
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected MessageService AppMService { get; set; }
|
|
|
|
[Inject]
|
|
protected GWMSDataService DataService { get; set; }
|
|
|
|
[Inject]
|
|
protected IJSRuntime JSRuntime { get; set; }
|
|
|
|
protected int maxHourRate { get; set; } = 800;
|
|
protected int numDays { get; set; } = 7;
|
|
protected bool processRunning { get; set; } = false;
|
|
protected int stepMin { get; set; } = 30;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
AppMService.ShowSearch = false;
|
|
AppMService.PageName = "Setup Parametri";
|
|
AppMService.PageIcon = "fas fa-wrench pr-2";
|
|
}
|
|
|
|
protected async Task resetDB()
|
|
{
|
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler risimulare l'intero set di dati?"))
|
|
return;
|
|
|
|
processRunning = true;
|
|
//DataService.RegenDB(numDays, stepMin, maxHourRate);
|
|
processRunning = false;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |