diff --git a/NKC_WF/BaseUserControl.cs b/NKC_WF/BaseUserControl.cs
index d21285f..71b1324 100644
--- a/NKC_WF/BaseUserControl.cs
+++ b/NKC_WF/BaseUserControl.cs
@@ -261,7 +261,6 @@ namespace NKC_WF
///
public void raiseReset()
{
- // se qualcuno ascolta sollevo evento nuovo valore...
if (eh_doReset != null)
{
eh_doReset(this, new EventArgs());
diff --git a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx
index b169af8..0e08ba9 100644
--- a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx
+++ b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx
@@ -9,6 +9,9 @@
+
+
+
@@ -67,10 +61,12 @@
@@ -90,10 +86,12 @@
diff --git a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs
index 2ecd192..66ae87b 100644
--- a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.cs
@@ -57,6 +57,7 @@ namespace NKC_WF.WebUserControls
fixChildBatch();
fixRatio();
checkDisplayMode();
+ fixEnabled();
raiseReset();
}
@@ -395,6 +396,84 @@ namespace NKC_WF.WebUserControls
lastRatio03 = 0;
doUpdate();
}
+ protected void lbtToggle01_Click(object sender, EventArgs e)
+ {
+ enable01 = !enable01;
+ fixEnabled();
+ }
+
+ private void fixEnabled()
+ {
+ lbtToggle01.CssClass = enable01 ? "btn btn-dark" : "btn btn-secondary";
+ lbtToggle02.CssClass = enable02 ? "btn btn-dark" : "btn btn-secondary";
+ lbtToggle03.CssClass = enable03 ? "btn btn-dark" : "btn btn-secondary";
+ cmp_orderExtListNE01.enableMove = enable01 && movEnabled;
+ cmp_orderExtListNE02.enableMove = enable02&& movEnabled;
+ cmp_orderExtListNE03.enableMove = enable03&& movEnabled;
+ }
+
+ protected void lbtToggle02_Click(object sender, EventArgs e)
+ {
+ enable02 = !enable02;
+ fixEnabled();
+ }
+ protected void lbtToggle03_Click(object sender, EventArgs e)
+ {
+ enable03 = !enable03;
+ fixEnabled();
+ }
+
+ private bool movEnabled
+ {
+ get
+ {
+ int numEnab = 0;
+ numEnab += enable01 ? 1 : 0;
+ numEnab += enable02 ? 1 : 0;
+ numEnab += enable03 ? 1 : 0;
+ return numEnab == 2;
+ }
+ }
+
+ private bool enable01
+ {
+ get
+ {
+ bool answ = false;
+ bool.TryParse(hfEnabled01.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfEnabled01.Value = $"{value}";
+ }
+ }
+ private bool enable02
+ {
+ get
+ {
+ bool answ = false;
+ bool.TryParse(hfEnabled02.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfEnabled02.Value = $"{value}";
+ }
+ }
+ private bool enable03
+ {
+ get
+ {
+ bool answ = false;
+ bool.TryParse(hfEnabled03.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfEnabled03.Value = $"{value}";
+ }
+ }
protected void Page_Load(object sender, EventArgs e)
{
@@ -404,6 +483,7 @@ namespace NKC_WF.WebUserControls
fixChildBatch();
fixRatio();
checkDisplayMode();
+ fixEnabled();
}
cmp_orderExtListNE01.eh_doRefresh += Cmp_orderExtListNE01_eh_doRefresh;
cmp_orderExtListNE02.eh_doRefresh += Cmp_orderExtListNE02_eh_doRefresh;
@@ -414,7 +494,6 @@ namespace NKC_WF.WebUserControls
#region Private Fields
- private int numMach = 3;
#endregion Private Fields
@@ -609,7 +688,15 @@ namespace NKC_WF.WebUserControls
stopWatch.Stop();
Log.Instance.Info($"Rebalance executed | R01: {Ratio01} | R02: {Ratio02} | R03: {Ratio03} | maxDepth: {maxDepth} | elapsed ms: {stopWatch.ElapsedMilliseconds}");
}
- fixRatio();
+ //fixRatio();
+ // calcolo min/max..
+ var actMax = totTime01 > totTime02 ? totTime01 : totTime02;
+ var actMin = totTime01 < totTime02 ? totTime01 : totTime02;
+ actMax = totTime03 > actMax ? totTime03 : actMax;
+ actMin = totTime03 < actMin ? totTime03 : actMin;
+ enable01 = (totTime01 == actMin || totTime01 == actMax);
+ enable02 = (totTime02 == actMin || totTime02 == actMax);
+ enable03 = (totTime03 == actMin || totTime03 == actMax);
}
#endregion Private Methods
diff --git a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.designer.cs
index e8cfb31..bedfb85 100644
--- a/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.designer.cs
+++ b/NKC_WF/WebUserControls/cmp_batchDetailSplit.ascx.designer.cs
@@ -77,6 +77,33 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.HiddenField hfLastRatio03;
+ ///
+ /// hfEnabled01 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfEnabled01;
+
+ ///
+ /// hfEnabled02 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfEnabled02;
+
+ ///
+ /// hfEnabled03 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfEnabled03;
+
///
/// lbtBalance control.
///
@@ -104,6 +131,15 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.Label lblNumOrd01;
+ ///
+ /// lbtToggle01 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtToggle01;
+
///
/// txtRatio01 control.
///
@@ -149,6 +185,15 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.Label lblNumOrd02;
+ ///
+ /// lbtToggle02 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtToggle02;
+
///
/// txtRatio02 control.
///
@@ -194,6 +239,15 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.Label lblNumOrd03;
+ ///
+ /// lbtToggle03 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtToggle03;
+
///
/// txtRatio03 control.
///
diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx b/NKC_WF/WebUserControls/cmp_orderExtList.ascx
index 9575c1e..78987c3 100644
--- a/NKC_WF/WebUserControls/cmp_orderExtList.ascx
+++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx
@@ -12,7 +12,7 @@
-
+
diff --git a/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs
index 8b7319b..bdc9006 100644
--- a/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_orderExtList.ascx.cs
@@ -40,7 +40,11 @@ namespace NKC_WF.WebUserControls
}
set
{
- hfMoveEnab.Value = $"{value}";
+ if (hfMoveEnab.Value != $"{value}")
+ {
+ hfMoveEnab.Value = $"{value}";
+ grView.DataBind();
+ }
}
}