Move common e order compo
This commit is contained in:
+33
-37
@@ -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<BomItemDTO>().ToList();
|
||||
await IService.MassUpdateAsync(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound);
|
||||
// ...e passo al controller parent LINQ projection to base type
|
||||
List<BomItemDTO> baseList = bomDict.Cast<BomItemDTO>().ToList();
|
||||
await EC_Updated.InvokeAsync(baseList);
|
||||
SelAll = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Conversione oggetti x editing
|
||||
/// </summary>
|
||||
@@ -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
|
||||
|
||||
/// <summary>
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Salvataggio con conversion a list + ritorno a parent
|
||||
/// </summary>
|
||||
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<BomItemDTO> baseList = bomDict.Cast<BomItemDTO>().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<BomItemDTO>().ToList();
|
||||
await IService.MassUpdateAsync(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound);
|
||||
// ...e passo al controller parent LINQ projection to base type
|
||||
List<BomItemDTO> baseList = bomDict.Cast<BomItemDTO>().ToList();
|
||||
await EC_Updated.InvokeAsync(baseList);
|
||||
SelAll = false;
|
||||
}
|
||||
|
||||
private void SaveNumRec(int newNum)
|
||||
+1
-1
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user