Files
mapo-core/MP-TAB-SERV/Pages/MachineDetail.razor.cs
T
2023-10-02 20:17:17 +02:00

64 lines
1.8 KiB
C#

using global::System;
using global::System.Collections.Generic;
using global::System.Linq;
using global::System.Threading.Tasks;
using global::Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using MP_TAB_SERV;
using MP_TAB_SERV.Shared;
using MP_TAB_SERV.Components;
using MP.Data;
using MP.Data.DatabaseModels;
using MP.Data.DTO;
using NLog;
using MP.Data.Services;
namespace MP_TAB_SERV.Pages
{
public partial class MachineDetail
{
protected string IdxMacc { get; set; } = "";
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
#if false
protected override async Task OnParametersSetAsync()
{
//await ReloadData();
//return base.OnParametersSetAsync();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
//await ReloadData();
//await InvokeAsync(StateHasChanged);
// return base.OnAfterRenderAsync(firstRender);
}
#endif
private async Task ReloadData()
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
}
protected MappaStatoExpl? CurrMSE { get; set; } = null;
}
}