80 lines
2.1 KiB
C#
80 lines
2.1 KiB
C#
using global::Microsoft.AspNetCore.Components;
|
|
using MP.Data.DatabaseModels;
|
|
using MP.Data.Services;
|
|
|
|
namespace MP_TAB3.Pages
|
|
{
|
|
public partial class TechSheet
|
|
{
|
|
#region Protected Properties
|
|
|
|
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
|
protected string IdxMacc { get; set; } = "";
|
|
|
|
[Inject]
|
|
protected MessageService MsgServ { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected TabDataService TabDServ { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await ReloadData();
|
|
SetupConf();
|
|
}
|
|
|
|
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
|
{
|
|
var ListMSE = newList;
|
|
if (!string.IsNullOrEmpty(IdxMacc))
|
|
{
|
|
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
|
if (rawData != null)
|
|
{
|
|
CurrMSE = rawData;
|
|
}
|
|
}
|
|
await InvokeAsync(StateHasChanged);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private string disMessage = "Gestione schede tecniche di attrezzaggio, collaudo e verifica procedure di setup. Il modulo opzionale � attivabile su richiesta.";
|
|
|
|
private string disSubtitle = "Funzionalit� disattivata";
|
|
|
|
private string disTitle = "Scheda Tecnica";
|
|
|
|
private bool enableSchedaTecnica = false;
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Methods
|
|
|
|
private async Task ReloadData()
|
|
{
|
|
if (string.IsNullOrEmpty(IdxMacc))
|
|
{
|
|
IdxMacc = await MsgServ.IdxMaccGet();
|
|
// recupero MSE macchina....
|
|
if (!string.IsNullOrEmpty(IdxMacc))
|
|
{
|
|
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void SetupConf()
|
|
{
|
|
TabDServ.ConfigGetVal("enableSchedaTecnica", ref enableSchedaTecnica);
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |