Files
mapo-core/MP-TAB-SERV/Pages/ProdStop.razor.cs
T
zaccaria.majid 67e072d1a7 ok pagina fermate
2023-10-04 11:58:19 +02:00

54 lines
1.5 KiB
C#

using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
namespace MP_TAB_SERV.Pages
{
public partial class ProdStop
{
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
protected List<AnagEventiModel> events2show { get; set; } = new List<AnagEventiModel>();
[Inject]
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected TabDataService TabSrv { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
#endregion Protected Methods
#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);
}
}
var eventsAll = await TabSrv.AnagEventiGetAll();
if(eventsAll != null)
{
events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x=>x.Nome).ToList();
}
}
#endregion Private Methods
}
}