diff --git a/Lux.UI/Components/Compo/EditBom.razor b/Lux.UI/Components/Compo/Common/EditBom.razor similarity index 100% rename from Lux.UI/Components/Compo/EditBom.razor rename to Lux.UI/Components/Compo/Common/EditBom.razor diff --git a/Lux.UI/Components/Compo/EditBom.razor.cs b/Lux.UI/Components/Compo/Common/EditBom.razor.cs similarity index 96% rename from Lux.UI/Components/Compo/EditBom.razor.cs rename to Lux.UI/Components/Compo/Common/EditBom.razor.cs index 06ab8229..ee34e6a4 100644 --- a/Lux.UI/Components/Compo/EditBom.razor.cs +++ b/Lux.UI/Components/Compo/Common/EditBom.razor.cs @@ -6,7 +6,7 @@ using EgwCoreLib.Lux.Data.Services.Items; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Common { public partial class EditBom { @@ -26,29 +26,8 @@ namespace Lux.UI.Components.Compo #endregion Public Properties - #region Protected Properties - - protected bool showMassEditSave - { - get => bomDict != null && bomDict.Any(x => x.isSelected); - } - - #endregion Protected Properties - #region Protected Methods - protected async Task ForceItemPrice() - { - isLoading = true; - // chiamo metodo update x i soli valori selezionati... - var list2upd = bomDict.Where(x => x.isSelected).Cast().ToList(); - await IService.MassUpdateAsync(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound); - // ...e passo al controller parent LINQ projection to base type - List baseList = bomDict.Cast().ToList(); - await EC_Updated.InvokeAsync(baseList); - SelAll = false; - } - /// /// Conversione oggetti x editing /// @@ -86,6 +65,20 @@ namespace Lux.UI.Components.Compo #endregion Protected Methods + #region Protected Classes + + protected class BomDtoSel : BomItemDTO + { + #region Public Properties + + public bool isSelected { get; set; } = false; + public int numRow { get; set; } = 1; + + #endregion Public Properties + } + + #endregion Protected Classes + #region Private Fields /// @@ -121,20 +114,6 @@ namespace Lux.UI.Components.Compo #endregion Private Fields - #region Protected Classes - - protected class BomDtoSel : BomItemDTO - { - #region Public Properties - - public bool isSelected { get; set; } = false; - public int numRow { get; set; } = 1; - - #endregion Public Properties - } - - #endregion Protected Classes - #region Private Properties [Inject] @@ -185,6 +164,11 @@ namespace Lux.UI.Components.Compo } } + private bool showMassEditSave + { + get => bomDict != null && bomDict.Any(x => x.isSelected); + } + private bool ShowVolume { get => CurrRowRec.Envir == Constants.EXECENVIRONMENTS.BEAM || CurrRowRec.Envir == Constants.EXECENVIRONMENTS.WALL; @@ -248,7 +232,7 @@ namespace Lux.UI.Components.Compo /// /// Salvataggio con conversion a list + ritorno a parent /// - private async Task DoSave() + private Task DoSave() { isLoading = true; // aggiorno l'oggetto nel mio dizionario @@ -261,7 +245,19 @@ namespace Lux.UI.Components.Compo DoCancel(); // ...e passo al controller parent LINQ projection to base type List baseList = bomDict.Cast().ToList(); + return EC_Updated.InvokeAsync(baseList); + } + + private async Task ForceItemPrice() + { + isLoading = true; + // chiamo metodo update x i soli valori selezionati... + var list2upd = bomDict.Where(x => x.isSelected).Cast().ToList(); + await IService.MassUpdateAsync(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound); + // ...e passo al controller parent LINQ projection to base type + List baseList = bomDict.Cast().ToList(); await EC_Updated.InvokeAsync(baseList); + SelAll = false; } private void SaveNumRec(int newNum) diff --git a/Lux.UI/Components/Compo/EditJob.razor b/Lux.UI/Components/Compo/Common/EditJob.razor similarity index 100% rename from Lux.UI/Components/Compo/EditJob.razor rename to Lux.UI/Components/Compo/Common/EditJob.razor diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor b/Lux.UI/Components/Compo/Order/OrderRowMan.razor similarity index 100% rename from Lux.UI/Components/Compo/OrderRowMan.razor rename to Lux.UI/Components/Compo/Order/OrderRowMan.razor diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor.cs b/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs similarity index 99% rename from Lux.UI/Components/Compo/OrderRowMan.razor.cs rename to Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs index 50004d6f..5a3b6d98 100644 --- a/Lux.UI/Components/Compo/OrderRowMan.razor.cs +++ b/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs @@ -22,7 +22,7 @@ using WebWindowComplex; using WebWindowComplex.DTO; using static EgwCoreLib.Lux.Core.Enums; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Order { public partial class OrderRowMan : IDisposable { diff --git a/Lux.UI/Components/_Imports.razor b/Lux.UI/Components/_Imports.razor index bf78c609..d7da4442 100644 --- a/Lux.UI/Components/_Imports.razor +++ b/Lux.UI/Components/_Imports.razor @@ -21,11 +21,13 @@ @using Lux.UI.Components.Compo @* @using Lux.UI.Components.Compo.Base *@ @using Lux.UI.Components.Compo.Charts +@using Lux.UI.Components.Compo.Common @using Lux.UI.Components.Compo.Config @using Lux.UI.Components.Compo.FileMan @using Lux.UI.Components.Compo.Item @using Lux.UI.Components.Compo.JobTask @using Lux.UI.Components.Compo.Offer +@using Lux.UI.Components.Compo.Order @using Lux.UI.Components.Compo.Planner @using Lux.UI.Components.Compo.WorkLoad @using Radzen