From 3c45e71312f826300d0e48a67e480bc7aee3bcea Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 13 Dec 2024 15:44:19 +0100 Subject: [PATCH] Fix rebalance --- NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs index 4976458..8cf99b1 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs @@ -971,7 +971,11 @@ namespace NKC_WF.WebUserControls directAssign = true; StartSet.OrderSet = OrderedList.OrderByDescending(x => x.Value).Take(num2proc).ToDictionary(t => t.Key, t => t.Value); // tolgo ordini lunghi tra quelli da processare - OrderedList = OrderedList.Take(OrderedList.Count - num2proc).ToDictionary(t => t.Key, t => t.Value); + foreach (var ordTaken in StartSet.OrderSet) + { + OrderedList.Remove(ordTaken.Key); + } + //OrderedList = OrderedList.OrderBy(x => x.Value).Take(OrderedList.Count - num2proc).ToDictionary(t => t.Key, t => t.Value); // imposto nuovi target secondo sia abilitato int idx = 0; SetNe01.TargetValue -= enable01 ? StartSet.OrderSet.Skip(idx++).FirstOrDefault().Value : 0;