35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using EgwCoreLib.Lux.Data.DbModel.Production;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Lux.UI.Components.Compo.Planner
|
|
{
|
|
public partial class BalanceProgGroup
|
|
{
|
|
|
|
[Parameter]
|
|
public List<ProductionGroupModel>? AllRecords { get; set; } = null;
|
|
|
|
Dictionary<string, List<ProductionGroupModel>> DictGrouped = new();
|
|
|
|
protected override void OnParametersSet()
|
|
{
|
|
if (AllRecords != null )
|
|
{
|
|
// Supponendo che 'listaOriginale' sia la tua List<ProductionGroupModel>
|
|
DictGrouped = AllRecords
|
|
.GroupBy(x => x.OrderRowNav.OrderRowUID)
|
|
.ToDictionary(
|
|
g => g.Key, // La chiave del dizionario è l'OrderRowNav.OrderRowUID
|
|
g => g.ToList() // Il valore è la lista di oggetti raggruppati
|
|
);
|
|
}
|
|
}
|
|
|
|
protected string FormatEstTime(decimal totSeconds)
|
|
{
|
|
var tSpan = TimeSpan.FromSeconds((double)totSeconds);
|
|
string answ = EgwCoreLib.Lux.Core.DtUtils.FormatDateTime(tSpan);
|
|
return answ;
|
|
}
|
|
}
|
|
} |