From 515441e4e3c1049d1807285785d4d2de0a187eeb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 24 Apr 2025 16:23:42 +0200 Subject: [PATCH] Aggiunto chk x calcolare anche ultimo foglio in statistiche OEE materiali --- .../WebUserControls/cmp_batchDetailMongo.ascx | 6 ++++-- .../cmp_batchDetailMongo.ascx.cs | 17 +++++++++++++---- .../cmp_batchDetailMongo.ascx.designer.cs | 9 +++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx b/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx index 74a3d2d..c32f440 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx @@ -3,7 +3,9 @@
- +
@@ -17,7 +19,7 @@
-
+
diff --git a/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.cs index 8e8df86..bdd6379 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.cs @@ -188,11 +188,15 @@ namespace NKC_WF.WebUserControls { // ordino le medie workRatio.Sort(); - // controllo di averne + di 1... - if (workRatio.Count > materialsList.Count * 2) + // filtro i valori + bassi solo se richiesto in conf + if (!chkExcludeMin.Checked) { - // elimino le + basse quanti materiali ci sono... - workRatio.RemoveRange(0, materialsList.Count); + // controllo di averne + di 1... + if (workRatio.Count > materialsList.Count * 2) + { + // elimino le + basse quanti materiali ci sono... + workRatio.RemoveRange(0, materialsList.Count); + } } double avgRatio = workRatio.Average(); double minRatio = workRatio.Min(); @@ -260,5 +264,10 @@ namespace NKC_WF.WebUserControls } #endregion Protected Methods + + protected void chkExcludeMin_CheckedChanged(object sender, EventArgs e) + { + updateMongoData(BatchId); + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.designer.cs index e84bc49..9c825b5 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetailMongo.ascx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF.WebUserControls public partial class cmp_batchDetailMongo { + /// + /// chkExcludeMin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkExcludeMin; + /// /// lblMatDet control. ///