diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs index 948949c0..7a6daa12 100644 --- a/MP.SPEC/Components/ListODL.razor.cs +++ b/MP.SPEC/Components/ListODL.razor.cs @@ -7,7 +7,6 @@ using MP.SPEC.Data; using MP.SPEC.Services; using NLog; - namespace MP.SPEC.Components { public partial class ListODL : IDisposable @@ -85,6 +84,21 @@ namespace MP.SPEC.Components #region Protected Methods + /// + /// Verifica se sia un articolo di tipo "KIT" x mostrare show dettaglio + /// + /// + /// + protected bool CheckIsKit(string CodArticolo) + { + bool answ = false; + if (ListArtKit != null && ListArtKit.Count > 0) + { + answ = ListArtKit.Count(x => x.CodArticolo == CodArticolo) > 0; + } + return answ; + } + /// /// Registra chiusura ODL alla data indicata /// @@ -103,7 +117,7 @@ namespace MP.SPEC.Components // RESETTO task x setComm, setArt, SetPzComm await MpIoApiCall.addTask2Exe(currRecord.IdxMacchina, "setArt", ""); await MpIoApiCall.addTask2Exe(currRecord.IdxMacchina, "setComm", ""); - await MpIoApiCall.addTask2Exe(currRecord.IdxMacchina, "setPzComm",""); + await MpIoApiCall.addTask2Exe(currRecord.IdxMacchina, "setPzComm", ""); // richiesto anche sync DB await MpIoApiCall.callSyncDb(currRecord.IdxMacchina); @@ -179,6 +193,19 @@ namespace MP.SPEC.Components return answ; } + protected void KitToggleDetail(string? selCodArt) + { + if (!string.IsNullOrEmpty(selCodArt)) + { + ListKitTemplate = MDService.TemplateKitFilt(selCodArt, ""); + } + else + { + ListKitTemplate = null; + } + showKitDetail = !showKitDetail; + } + protected override async Task OnInitializedAsync() { ListStati = await MDService.AnagStatiComm(); @@ -268,6 +295,12 @@ namespace MP.SPEC.Components /// private string KeyFolderMan = "OP_ODL_FOLDER"; + /// + /// Elenco articoli tipo KIT + /// + private List? ListArtKit; + + private List? ListKitTemplate = null; private List? ListOdlStats; private List? ListRecords; @@ -276,6 +309,7 @@ namespace MP.SPEC.Components private List? SearchRecords; + private bool showKitDetail = false; private ODLExpModel? statRecord = null; #endregion Private Fields @@ -336,7 +370,7 @@ namespace MP.SPEC.Components ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); await Task.Delay(1); #if false - await InvokeAsync(StateHasChanged); + await InvokeAsync(StateHasChanged); #endif isLoading = false; } @@ -369,40 +403,5 @@ namespace MP.SPEC.Components } #endregion Private Methods - - /// - /// Verifica se sia un articolo di tipo "KIT" x mostrare show dettaglio - /// - /// - /// - protected bool CheckIsKit(string CodArticolo) - { - bool answ = false; - if (ListArtKit != null && ListArtKit.Count > 0) - { - answ = ListArtKit.Count(x => x.CodArticolo == CodArticolo) > 0; - } - return answ; - } - protected void KitToggleDetail(string? selCodArt) - { - if (!string.IsNullOrEmpty(selCodArt)) - { - ListKitTemplate = MDService.TemplateKitFilt(selCodArt, ""); - } - else - { - ListKitTemplate = null; - } - showKitDetail = !showKitDetail; - } - - /// - /// Elenco articoli tipo KIT - /// - private List? ListArtKit; - - private List? ListKitTemplate = null; - private bool showKitDetail = false; } } \ No newline at end of file diff --git a/MP.SPEC/Components/ListPODL.razor.cs b/MP.SPEC/Components/ListPODL.razor.cs index 0b2babfd..f11ff3d5 100644 --- a/MP.SPEC/Components/ListPODL.razor.cs +++ b/MP.SPEC/Components/ListPODL.razor.cs @@ -175,7 +175,6 @@ namespace MP.SPEC.Components showKitDetail = !showKitDetail; } - protected override async Task OnInitializedAsync() { ListStati = await MDService.AnagStatiComm(); @@ -346,8 +345,8 @@ namespace MP.SPEC.Components private List? ListArtKit; private List? ListKitTemplate = null; - private List? ListRecords; private List? ListPOdlKit; + private List? ListRecords; /// /// Elenco stati