diff --git a/MP-TAB-SERV/Components/TcHistoryFilter.razor.cs b/MP-TAB-SERV/Components/TcHistoryFilter.razor.cs index ef97bc52..e2da67f7 100644 --- a/MP-TAB-SERV/Components/TcHistoryFilter.razor.cs +++ b/MP-TAB-SERV/Components/TcHistoryFilter.razor.cs @@ -41,11 +41,7 @@ namespace MP_TAB_SERV.Components if (codArtSel != value) { codArtSel = value; - var pUpd = Task.Run(async () => - { - await ReportArt(); - }); - pUpd.Wait(); + E_CodArt.InvokeAsync(CodArtSel).ConfigureAwait(false); } } } @@ -63,22 +59,15 @@ namespace MP_TAB_SERV.Components if (idxMaccSel != value) { idxMaccSel = value; - var pUpd = Task.Run(async () => - { - await ReportMacc(); - }); - pUpd.Wait(); + E_IdxMacc.InvokeAsync(value).ConfigureAwait(false); } } } - private string idxMaccSel { get; set; } = ""; + protected bool ListArtDisabled { get => string.IsNullOrEmpty(SearchVal) || SearchVal.Length < SearchMinChar; } - protected Dictionary? ListArticoli { get; set; } = null; - protected Dictionary ListArticoliAll { get; set; } = new Dictionary(); - protected Dictionary ListMacchineAll { get => MServ.DictMacchine; set => MServ.DictMacchine = value; } protected int Num2Displ @@ -107,7 +96,6 @@ namespace MP_TAB_SERV.Components await ReloadArticoli(); }); pUpd.Wait(); - } } } @@ -160,21 +148,6 @@ namespace MP_TAB_SERV.Components await ReloadAllData(); } - protected override async Task OnParametersSetAsync() - { -#if false - // update IdxMaccSel - await ReportMacc(); - - // update SearchVal - await ReloadArticoli(); - - // updateCodArtSel - await ReportArt(); -#endif - //return base.OnParametersSetAsync(); - } - protected async Task ReloadAllData() { await ReloadArticoli(); @@ -202,16 +175,6 @@ namespace MP_TAB_SERV.Components } } - protected async Task ReportArt() - { - await E_CodArt.InvokeAsync(CodArtSel); - } - - protected async Task ReportMacc() - { - await E_IdxMacc.InvokeAsync(IdxMaccSel); - } - #endregion Protected Methods #region Private Fields @@ -223,6 +186,8 @@ namespace MP_TAB_SERV.Components #region Private Properties private string codArtSel { get; set; } = ""; + private string idxMaccSel { get; set; } = ""; + private int num2Displ { get; set; } = 20; private string searchVal { get; set; } = "";