diff --git a/MP-TAB3/Components/ControlsMan.razor.cs b/MP-TAB3/Components/ControlsMan.razor.cs index 86a2e55d..0dde48ce 100644 --- a/MP-TAB3/Components/ControlsMan.razor.cs +++ b/MP-TAB3/Components/ControlsMan.razor.cs @@ -10,6 +10,9 @@ namespace MP_TAB3.Components { #region Public Properties + [Parameter] + public EventCallback E_MachSel { get; set; } + [Parameter] public EventCallback E_Updated { get; set; } @@ -131,6 +134,7 @@ namespace MP_TAB3.Components await doUpdate(); isProcessing = false; await Task.Delay(1); + await E_MachSel.InvokeAsync(selIdxMacc); } protected async Task SetOdl(int selIdxOdl) diff --git a/MP-TAB3/Components/DeclarMan.razor.cs b/MP-TAB3/Components/DeclarMan.razor.cs index 89ab5bda..05c8f7a1 100644 --- a/MP-TAB3/Components/DeclarMan.razor.cs +++ b/MP-TAB3/Components/DeclarMan.razor.cs @@ -11,6 +11,9 @@ namespace MP_TAB3.Components { #region Public Properties + [Parameter] + public EventCallback E_MachSel { get; set; } + [Parameter] public MappaStatoExpl? RecMSE { get; set; } = null; @@ -44,15 +47,11 @@ namespace MP_TAB3.Components protected List ListComplete { get; set; } = new List(); protected List ListPaged { get; set; } = new List(); - protected void SetEdit(RegistroDichiarazioniModel selRec) - { - CurrRec = selRec; - } + [Inject] + protected MessageService MServ { get; set; } = null!; [Inject] protected SharedMemService SMServ { get; set; } = null!; - [Inject] - protected MessageService MServ { get; set; } = null!; [Inject] protected TabDataService TabDServ { get; set; } = null!; @@ -96,6 +95,11 @@ namespace MP_TAB3.Components UpdateTable(); } + protected void SetEdit(RegistroDichiarazioniModel selRec) + { + CurrRec = selRec; + } + protected async Task SetMacc(string selIdxMacc) { isProcessing = true; @@ -104,6 +108,7 @@ namespace MP_TAB3.Components await doUpdate(); isProcessing = false; await Task.Delay(1); + await E_MachSel.InvokeAsync(selIdxMacc); } protected async Task SetOdl(int selIdxOdl) @@ -139,8 +144,6 @@ namespace MP_TAB3.Components #region Private Fields - private RegistroDichiarazioniModel? CurrRec { get; set; } = null; - private static Logger Log = LogManager.GetCurrentClassLogger(); private bool isProcessing = false; private int NumRecPage = 10; @@ -153,7 +156,7 @@ namespace MP_TAB3.Components #region Private Properties private Periodo CurrPeriodo { get; set; } = new Periodo(); - + private RegistroDichiarazioniModel? CurrRec { get; set; } = null; private string IdxMaccSel { get; set; } = ""; private int IdxOdl { get; set; } = 0; diff --git a/MP-TAB3/Components/ProdConfirm.razor b/MP-TAB3/Components/ProdConfirm.razor index 5a3359ee..7a1437d5 100644 --- a/MP-TAB3/Components/ProdConfirm.razor +++ b/MP-TAB3/Components/ProdConfirm.razor @@ -92,81 +92,81 @@ } -@if (!confProdActive) -{ -
-
- Dati Globali ODL -
-
-
-
- [A] NUOVI Pz.Prod -
-
- @if (isProcessing) - { - - } - else - { - @numPzProdotti2Rec - } -
+
+
+ Dati Globali ODL +
+
+
+
+ [A] NUOVI Pz.Prod
-
-
-
-
- Pz Prodotti TOT [A+B+C] -
-
- @if (isProcessing) - { - - } - else - { - @numPzProdotti - } -
-
-
-
-
-
- [B] Scarti VERS. -
-
- @if (isProcessing) - { - - } - else - { - @numPzScaConf - } -
-
-
-
-
-
- [C] Pz Buoni VERS. -
-
- @if (isProcessing) - { - - } - else - { - @numPzBuoniConf - } -
+
+ @if (isProcessing) + { + + } + else + { + @numPzProdotti2Rec + }
+
+
+
+ Pz Prodotti TOT [A+B+C] +
+
+ @if (isProcessing) + { + + } + else + { + @numPzProdotti + } +
+
+
+
+
+
+ [B] Scarti VERS. +
+
+ @if (isProcessing) + { + + } + else + { + @numPzScaConf + } +
+
+
+
+
+
+ [C] Pz Buoni VERS. +
+
+ @if (isProcessing) + { + + } + else + { + @numPzBuoniConf + } +
+
+
+
+@if (!confProdActive) +{
Reg. SCARTI diff --git a/MP-TAB3/Components/ScrapMan.razor.cs b/MP-TAB3/Components/ScrapMan.razor.cs index ede443d8..de7c088a 100644 --- a/MP-TAB3/Components/ScrapMan.razor.cs +++ b/MP-TAB3/Components/ScrapMan.razor.cs @@ -10,47 +10,20 @@ namespace MP_TAB3.Components { #region Public Properties + [Parameter] + public EventCallback E_MachSel { get; set; } + [Parameter] public MappaStatoExpl? RecMSE { get; set; } = null; #endregion Public Properties - #region Public Methods - - /// - /// Aggiorno valori produzione alla data richiesta... - /// - /// - protected async Task ReloadData() - { - isProcessing = true; - await Task.Delay(1); - if (!string.IsNullOrEmpty(IdxMaccSel)) - { - ListComplete = await TabDServ.RegScartiGetFilt(IdxMaccSel, IdxOdl, CurrPeriodo.Inizio, CurrPeriodo.Fine, false); - TotalCount = ListComplete.Count; - // esegue paginazione - UpdateTable(); - } - isProcessing = false; - await Task.Delay(1); - } - - protected async Task ForceReload(bool DoClose) - { - if (DoClose) - { - selItem = null; - } - await ReloadData(); - } - - #endregion Public Methods - #region Protected Properties protected bool enableScarti { get; set; } = true; + protected List ListComplete { get; set; } = new List(); + protected List ListPaged { get; set; } = new List(); [Inject] @@ -66,6 +39,15 @@ namespace MP_TAB3.Components #region Protected Methods + protected async Task ForceReload(bool DoClose) + { + if (DoClose) + { + selItem = null; + } + await ReloadData(); + } + protected override async Task OnInitializedAsync() { await Task.Delay(1); @@ -90,6 +72,25 @@ namespace MP_TAB3.Components } } + /// + /// Aggiorno valori produzione alla data richiesta... + /// + /// + protected async Task ReloadData() + { + isProcessing = true; + await Task.Delay(1); + if (!string.IsNullOrEmpty(IdxMaccSel)) + { + ListComplete = await TabDServ.RegScartiGetFilt(IdxMaccSel, IdxOdl, CurrPeriodo.Inizio, CurrPeriodo.Fine, false); + TotalCount = ListComplete.Count; + // esegue paginazione + UpdateTable(); + } + isProcessing = false; + await Task.Delay(1); + } + protected void SaveNumRec(int newNum) { NumRecPage = newNum; @@ -115,6 +116,7 @@ namespace MP_TAB3.Components await ReloadData(); isProcessing = false; await Task.Delay(1); + await E_MachSel.InvokeAsync(selIdxMacc); } protected async Task SetOdl(int selIdxOdl) diff --git a/MP-TAB3/Pages/Controls.razor b/MP-TAB3/Pages/Controls.razor index 8f7e5fe9..8a35b6c9 100644 --- a/MP-TAB3/Pages/Controls.razor +++ b/MP-TAB3/Pages/Controls.razor @@ -8,6 +8,6 @@ else { - - + + } diff --git a/MP-TAB3/Pages/Controls.razor.cs b/MP-TAB3/Pages/Controls.razor.cs index 007c7f29..192b6cd9 100644 --- a/MP-TAB3/Pages/Controls.razor.cs +++ b/MP-TAB3/Pages/Controls.razor.cs @@ -18,6 +18,13 @@ namespace MP_TAB3.Pages #region Protected Methods + protected async Task ForceReload() + { + IsLoading = true; + await Task.Delay(50); + IsLoading = false; + } + protected override async Task OnInitializedAsync() { await ReloadData(); @@ -41,16 +48,20 @@ namespace MP_TAB3.Pages await InvokeAsync(StateHasChanged); } - protected async Task ForceReload() + protected void SetMacc(string selIdxMacc) { - IsLoading = true; - await Task.Delay(50); - IsLoading = false; + IdxMaccSubSel = selIdxMacc; } - private bool IsLoading = false; #endregion Protected Methods + #region Private Fields + + private string IdxMaccSubSel = ""; + private bool IsLoading = false; + + #endregion Private Fields + #region Private Methods private async Task ReloadData() diff --git a/MP-TAB3/Pages/Declarations.razor b/MP-TAB3/Pages/Declarations.razor index 5a45a974..bdb96323 100644 --- a/MP-TAB3/Pages/Declarations.razor +++ b/MP-TAB3/Pages/Declarations.razor @@ -8,6 +8,6 @@ else { - - + + } diff --git a/MP-TAB3/Pages/Declarations.razor.cs b/MP-TAB3/Pages/Declarations.razor.cs index dbb966f7..30e3a328 100644 --- a/MP-TAB3/Pages/Declarations.razor.cs +++ b/MP-TAB3/Pages/Declarations.razor.cs @@ -41,8 +41,19 @@ namespace MP_TAB3.Pages await InvokeAsync(StateHasChanged); } + protected void SetMacc(string selIdxMacc) + { + IdxMaccSubSel = selIdxMacc; + } + #endregion Protected Methods + #region Private Fields + + private string IdxMaccSubSel = ""; + + #endregion Private Fields + #region Private Methods private async Task ReloadData() diff --git a/MP-TAB3/Pages/Scrap.razor b/MP-TAB3/Pages/Scrap.razor index 65c20614..6ffaf1a3 100644 --- a/MP-TAB3/Pages/Scrap.razor +++ b/MP-TAB3/Pages/Scrap.razor @@ -8,6 +8,6 @@ else { - - + + } diff --git a/MP-TAB3/Pages/Scrap.razor.cs b/MP-TAB3/Pages/Scrap.razor.cs index 0b7e29fc..76d40e31 100644 --- a/MP-TAB3/Pages/Scrap.razor.cs +++ b/MP-TAB3/Pages/Scrap.razor.cs @@ -59,5 +59,11 @@ namespace MP_TAB3.Pages } #endregion Private Methods + + protected void SetMacc(string selIdxMacc) + { + IdxMaccSubSel = selIdxMacc; + } + private string IdxMaccSubSel = ""; } } \ No newline at end of file