diff --git a/MP.SPEC/Components/Fermate/ListMacc.razor b/MP.SPEC/Components/Fermate/ListMacc.razor index f52b22b4..4c6f5bfc 100644 --- a/MP.SPEC/Components/Fermate/ListMacc.razor +++ b/MP.SPEC/Components/Fermate/ListMacc.razor @@ -10,9 +10,9 @@ - @*
- Edit Massivo Fermi -
*@ +
+ +
diff --git a/MP.SPEC/Components/Fermate/ListMacc.razor.cs b/MP.SPEC/Components/Fermate/ListMacc.razor.cs index 76739c96..79d40697 100644 --- a/MP.SPEC/Components/Fermate/ListMacc.razor.cs +++ b/MP.SPEC/Components/Fermate/ListMacc.razor.cs @@ -8,12 +8,14 @@ namespace MP.SPEC.Components.Fermate #region Public Properties [Parameter] - public List ListMSE { get; set; } = null!; - + public EventCallback EC_ReqRefresh { get; set; } [Parameter] public EventCallback> EC_Selected { get; set; } + [Parameter] + public List ListMSE { get; set; } = null!; + #endregion Public Properties #region Protected Properties @@ -89,6 +91,15 @@ namespace MP.SPEC.Components.Fermate await ReloadData(); } + /// + /// Richiesta update + /// + /// + protected async Task RaiseRefresh() + { + await EC_ReqRefresh.InvokeAsync(true); + } + protected async Task SetNumRec(int newNum) { numRecord = newNum; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index d43bcc16..c00fd578 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -41,8 +41,8 @@ - - + + @@ -52,7 +52,7 @@ - + diff --git a/MP.SPEC/Pages/RepStop.razor b/MP.SPEC/Pages/RepStop.razor index 96e5d612..4b12028d 100644 --- a/MP.SPEC/Pages/RepStop.razor +++ b/MP.SPEC/Pages/RepStop.razor @@ -24,7 +24,7 @@ {
- +
@if (showFermate) diff --git a/MP.SPEC/Pages/RepStop.razor.cs b/MP.SPEC/Pages/RepStop.razor.cs index 2d6a6000..310c96d2 100644 --- a/MP.SPEC/Pages/RepStop.razor.cs +++ b/MP.SPEC/Pages/RepStop.razor.cs @@ -25,6 +25,9 @@ namespace MP.SPEC.Pages [Inject] protected SharedMemService SMServ { get; set; } = null!; + [Inject] + protected TabDataService TabDServ { get; set; } = null!; + #endregion Protected Properties #region Protected Methods @@ -59,6 +62,11 @@ namespace MP.SPEC.Pages showFermate = listSelezione.Count > 0; } + private async Task DoReload(bool forceReload) + { + CurrMSE = await MDService.MseGetAll(true); + } + /// /// Gestione selezione evento da registrare x le macchine selezionate /// @@ -81,22 +89,22 @@ namespace MP.SPEC.Pages { var rigaStato = MDService.StatoMacchina(idxMacc); // processo evento... - - DateTime adesso = DateTime.Now.Floor(TimeSpan.FromSeconds(1)); - EventListModel newRec = new EventListModel() - { - IdxMacchina = idxMacc, - InizioStato = adesso, - IdxTipo = selEv.IdxEv, - CodArticolo = rigaStato.CodArticolo, - Value = "DRT", - MatrOpr = 1, // rivedere!!! - pallet = rigaStato.pallet - }; - // FORZO con metodo TAB - await TabDServ.EvListInsert(newRec, tipoInputEvento.barcode); - // resetta il microstato in modo da ricevere successive info HW - await TabDServ.resetMicrostatoMacchina(idxMacc); + + DateTime adesso = DateTime.Now.Floor(TimeSpan.FromSeconds(1)); + EventListModel newRec = new EventListModel() + { + IdxMacchina = idxMacc, + InizioStato = adesso, + IdxTipo = selEv.IdxEv, + CodArticolo = rigaStato.CodArticolo, + Value = "DRT", + MatrOpr = 1, // rivedere!!! + pallet = rigaStato.pallet + }; + // FORZO con metodo TAB + await TabDServ.EvListInsert(newRec, tipoInputEvento.barcode); + // resetta il microstato in modo da ricevere successive info HW + await TabDServ.resetMicrostatoMacchina(idxMacc); } var ListMSE = await MDService.MseGetAll(true); @@ -106,8 +114,6 @@ namespace MP.SPEC.Pages } } - [Inject] - protected TabDataService TabDServ { get; set; } = null!; private async Task ReloadData() { CurrMSE = await MDService.MseGetAll(false);