From a12dbcef7dcd4361b340d73c24ad4050e58c4e3b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 27 Jan 2020 10:33:32 +0100 Subject: [PATCH 1/4] update pulizia nesting con + risposte... --- AppData/DS_App.Designer.cs | 50 +++++++++++--- AppData/DS_App.xsd | 83 +++++++++++++---------- AppData/DS_App.xss | 2 +- Jenkinsfile | 2 +- NKC_WF/Controllers/BatchProcController.cs | 2 +- NKC_WF/Web.config | 4 +- 6 files changed, 94 insertions(+), 49 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 9376b0e..9be3d3c 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -13201,7 +13201,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[13]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[14]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM v_BatchList"; @@ -13265,7 +13265,7 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[10].Connection = this.Connection; - this._commandCollection[10].CommandText = "dbo.stp_Batch_resetNesting"; + this._commandCollection[10].CommandText = "dbo.stp_Batch_resetAllNesting"; this._commandCollection[10].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -13276,13 +13276,19 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[12] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[12].Connection = this.Connection; - this._commandCollection[12].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[12].CommandText = "dbo.stp_Batch_resetTree"; this._commandCollection[12].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[13].Connection = this.Connection; + this._commandCollection[13].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[13].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13577,8 +13583,36 @@ namespace AppData.DS_AppTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int updateStatus(global::System.Nullable BatchID, global::System.Nullable Status, string EnvNum, global::System.Nullable TotalTime) { + public virtual int resetTree(global::System.Nullable Original_BatchID) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[12]; + if ((Original_BatchID.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_BatchID.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateStatus(global::System.Nullable BatchID, global::System.Nullable Status, string EnvNum, global::System.Nullable TotalTime) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[13]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index d688bee..09cbd58 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -141,10 +141,10 @@ - + - dbo.stp_Batch_resetNesting + dbo.stp_Batch_resetAllNesting @@ -162,6 +162,17 @@ + + + + dbo.stp_Batch_resetTree + + + + + + + @@ -2010,7 +2021,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2058,7 +2069,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2080,7 +2091,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2135,7 +2146,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2208,7 +2219,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2216,7 +2227,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2285,7 +2296,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2318,7 +2329,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2344,7 +2355,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2363,7 +2374,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2387,7 +2398,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2395,7 +2406,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2412,7 +2423,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2421,7 +2432,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2452,7 +2463,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2460,7 +2471,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2476,7 +2487,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2484,7 +2495,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2512,7 +2523,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2548,7 +2559,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2564,7 +2575,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2574,7 +2585,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2679,18 +2690,18 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 7409636..faee6c3 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/Jenkinsfile b/Jenkinsfile index a2a79d2..909d7a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=227']) { + withEnv(['NEXT_BUILD_NUMBER=228']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index c223ff8..214d022 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -259,7 +259,7 @@ namespace NKC_WF.Controllers if (rispNest.ProcessStatus == procStatus.completed) { // resetto le precedenti elaborazioni: elimino dati child MA NON il batch... - DataLayer.man.taBL.deleteTree(rispNest.BatchID, 0); + DataLayer.man.taBL.resetTree(rispNest.BatchID); // salvo info riguardo ai vari Bunk / Sheets / Items... ComLib.updateBunksFromNesting(rispNest.BatchID, rispNest.BunkList); // salvo info x CART & BINS previsti diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 6470fab..d161fd6 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -67,8 +67,8 @@ - - + + From fe8cd2153e997b32fa6d76535727301655d24672 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 27 Jan 2020 11:10:56 +0100 Subject: [PATCH 2/4] Fix teim in min:sec x preview + fix dimensioni --- NKC_WF/NKC_WF.csproj | 3 --- NKC_WF/SHARE_NEST/.PlaceHolder.file | 1 - NKC_WF/WebUserControls/cmp_BP_bunkList.ascx | 11 +++++----- NKC_WF/WebUserControls/cmp_BP_sheetList.ascx | 21 +++++++++++++++---- .../WebUserControls/cmp_BP_sheetList.ascx.cs | 15 +++++++++++++ NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx | 4 ++-- NKC_WF/site/BatchPreview.aspx | 4 ++-- 7 files changed, 42 insertions(+), 17 deletions(-) delete mode 100644 NKC_WF/SHARE_NEST/.PlaceHolder.file diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 790ecb7..dd9e60f 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -1053,9 +1053,6 @@ - - Always - Always diff --git a/NKC_WF/SHARE_NEST/.PlaceHolder.file b/NKC_WF/SHARE_NEST/.PlaceHolder.file deleted file mode 100644 index 5f28270..0000000 --- a/NKC_WF/SHARE_NEST/.PlaceHolder.file +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx index 05377b7..2c76bfa 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx @@ -21,15 +21,16 @@ -
- + +
+
- +
-
Sheets: <%# Eval("NumSheetsPrepared") %> / <%# Eval("NumSheets") %>
-
items: <%# Eval("NumItems") %>
+
S: <%# Eval("NumSheets") %>
+
P: <%# Eval("NumItems") %>
diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx index 908301d..f67efa8 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx @@ -18,14 +18,27 @@
- + -
- +
+
+ +
+
+ +
+
+ +
+
+
+
+ + + - diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs index eee7644..f94691b 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs @@ -82,5 +82,20 @@ namespace NKC_WF.WebUserControls { raiseEvent(); } + /// + /// Formatta in min/sec il tempo in sec decimale + /// + /// + /// + public string formatMinSec(object _timeSec) + { + int totSec = 0; + string answ = ""; + int.TryParse(_timeSec.ToString(), out totSec); + int numMin = totSec / 60; + int numSec = totSec - (60 * numMin); + answ = $"{numMin:00}:{numSec:00}"; + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index f2bca66..3debefd 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx index c0df410..cff64ef 100644 --- a/NKC_WF/site/BatchPreview.aspx +++ b/NKC_WF/site/BatchPreview.aspx @@ -7,10 +7,10 @@
-
+
-
+

Batch preview - start | pause | stop

From 2ecb0cf203793788edeec131c0665f8144ccbbfd Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 27 Jan 2020 12:09:13 +0100 Subject: [PATCH 3/4] OK selezione da slider a elenchi... --- AppData/ComLib.cs | 136 ++++++++---------- NKC_WF/NKC_WF.csproj | 8 ++ NKC_WF/WebUserControls/cmp_BP_bunkList.ascx | 2 +- .../WebUserControls/cmp_BP_bunkList.ascx.cs | 10 ++ .../WebUserControls/cmp_BP_sheetList.ascx.cs | 11 ++ NKC_WF/WebUserControls/cmp_menuTop.ascx | 11 +- NKC_WF/WebUserControls/cmp_slider.ascx | 5 + NKC_WF/WebUserControls/cmp_slider.ascx.cs | 35 +++++ .../cmp_slider.ascx.designer.cs | 26 ++++ NKC_WF/site/BatchPreview.aspx | 6 +- NKC_WF/site/BatchPreview.aspx.cs | 24 ++++ NKC_WF/site/BatchPreview.aspx.designer.cs | 18 +++ 12 files changed, 203 insertions(+), 89 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_slider.ascx create mode 100644 NKC_WF/WebUserControls/cmp_slider.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_slider.ascx.designer.cs diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 34c9a53..66c05ca 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1482,91 +1482,71 @@ namespace AppData // files string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); string answ = File.ReadAllText(filename); - - // elenco items da foglio!!! - var tabItems = DataLayer.man.taIL.getBySheet(sheetID); - List itemsAll = new List(); - List itemsDepo = new List(); - List itemsCart = new List(); - List itemsBin = new List(); - List itemsSecOp = new List(); - - //se ho items... - if (tabItems.Count > 0) + // solo se sheet > 0... + if (sheetID > 0) { - // ciclo! - foreach (var item in tabItems) + // elenco items da foglio!!! + var tabItems = DataLayer.man.taIL.getBySheet(sheetID); + List itemsAll = new List(); + List itemsDepo = new List(); + List itemsCart = new List(); + List itemsBin = new List(); + List itemsSecOp = new List(); + + //se ho items... + if (tabItems.Count > 0) { - // aggiungoncomunque a lista generale... - itemsAll.Add(item.ItemDtmx); - // controllo SE sia stato depositato... check null su campo data - if (!item.IsOnCartDateNull()) + // ciclo! + foreach (var item in tabItems) { - itemsDepo.Add(item.ItemDtmx); - } - else if (item.ProcessesReq.Contains("PaintFlag")) - { - itemsBin.Add(item.ItemDtmx); - } - else - { - itemsCart.Add(item.ItemDtmx); - } - // controllo ANCHE postprocessing - if (item.PostProcList != "") - { - itemsSecOp.Add(item.ItemDtmx); + // aggiungoncomunque a lista generale... + itemsAll.Add(item.ItemDtmx); + // controllo SE sia stato depositato... check null su campo data + if (!item.IsOnCartDateNull()) + { + itemsDepo.Add(item.ItemDtmx); + } + else if (item.ProcessesReq.Contains("PaintFlag")) + { + itemsBin.Add(item.ItemDtmx); + } + else + { + itemsCart.Add(item.ItemDtmx); + } + // controllo ANCHE postprocessing + if (item.PostProcList != "") + { + itemsSecOp.Add(item.ItemDtmx); + } } } + + + // FIX BIN + answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); + + // FIX CART + answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); + + // FIX Scaricati + answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); + + // FIX SEC-OP + answ = updateCssByItemList(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); + + // FIXED SEL da array oggetti selezionati... + answ = updateCssByPickedItems(answ, redKeyBase, "ItemsSel", dataCacheTTL); + + + // INFINE serializzo e salvo tutti gli items trovati... + string serVal = JsonConvert.SerializeObject(itemsAll); + memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL); + + // salvo redis css! + memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL); } - - // FIX BIN - answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); - - // FIX CART - answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); - - // FIX Scaricati - answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); - - // FIX SEC-OP - answ = updateCssByItemList(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); - - // FIXED SEL da array oggetti selezionati... - answ = updateCssByPickedItems(answ, redKeyBase, "ItemsSel", dataCacheTTL); - - -#if false - string rawData = memLayer.ML.getRSV($"{redKeyBase}:ItemsSel"); - if (!string.IsNullOrEmpty(rawData)) - { - string replaceVal = ""; - // deserializzo - List selArray = JsonConvert.DeserializeObject>(rawData); - - // ciclo x cercare x ogni chiave (sessione utente) - foreach (var item in selArray) - { - replaceVal += $"#{item},"; - } - if (replaceVal.Length > 1) - { - replaceVal = replaceVal.Remove(replaceVal.Length - 1); - } - // FIX CSS! - answ = answ.Replace("#ItemsSel", replaceVal); - replaceVal = ""; - } -#endif - - // INFINE serializzo e salvo tutti gli items trovati... - string serVal = JsonConvert.SerializeObject(itemsAll); - memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL); - - // salvo redis css! - memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL); - return answ; } /// diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index dd9e60f..a15ddc2 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -395,6 +395,7 @@ + @@ -940,6 +941,13 @@ cmp_scrapList.ascx + + cmp_slider.ascx + ASPXCodeBehind + + + cmp_slider.ascx + cmp_stackBuilding.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx index 2c76bfa..fc7c144 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx @@ -2,7 +2,7 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs index d3077de..20e8b02 100644 --- a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs @@ -108,5 +108,15 @@ namespace NKC_WF.WebUserControls return answ; } } + /// + /// Num totale bunks + /// + public int numBunks + { + get + { + return grView.Rows.Count; + } + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs index f94691b..d2b1885 100644 --- a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs @@ -97,5 +97,16 @@ namespace NKC_WF.WebUserControls answ = $"{numMin:00}:{numSec:00}"; return answ; } + + /// + /// Num totale Sheets + /// + public int numSheets + { + get + { + return grView.Rows.Count; + } + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx b/NKC_WF/WebUserControls/cmp_menuTop.ascx index bd2ae86..ba1430c 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx @@ -33,19 +33,12 @@ - <%----%> - -
diff --git a/NKC_WF/WebUserControls/cmp_slider.ascx b/NKC_WF/WebUserControls/cmp_slider.ascx new file mode 100644 index 0000000..4ce3361 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_slider.ascx @@ -0,0 +1,5 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_slider.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_slider" %> + +
+ +
diff --git a/NKC_WF/WebUserControls/cmp_slider.ascx.cs b/NKC_WF/WebUserControls/cmp_slider.ascx.cs new file mode 100644 index 0000000..4523dbc --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_slider.ascx.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_slider : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void txtSlider_TextChanged(object sender, EventArgs e) + { + // segnala evento registrazione valore + raiseEvent(); + } + /// + /// valore selezionato + /// + public int selValue + { + get + { + int answ = 0; + int.TryParse(txtSlider.Text, out answ); + return answ; + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_slider.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_slider.ascx.designer.cs new file mode 100644 index 0000000..d2736d2 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_slider.ascx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_slider + { + + /// + /// Controllo txtSlider. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtSlider; + } +} diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx index cff64ef..0b0a6f6 100644 --- a/NKC_WF/site/BatchPreview.aspx +++ b/NKC_WF/site/BatchPreview.aspx @@ -3,6 +3,8 @@ <%@ Register Src="~/WebUserControls/cmp_BP_bunkList.ascx" TagPrefix="uc1" TagName="cmp_BP_bunkList" %> <%@ Register Src="~/WebUserControls/cmp_MU_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_MU_svgViewer" %> <%@ Register Src="~/WebUserControls/cmp_BP_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BP_sheetList" %> +<%@ Register Src="~/WebUserControls/cmp_slider.ascx" TagPrefix="uc1" TagName="cmp_slider" %> + @@ -11,7 +13,9 @@
-

Batch preview - start | pause | stop

+

Batch preview

+ +
diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index ca8f6ac..7c779b7 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -18,6 +18,30 @@ namespace NKC_WF.site } cmp_BP_bunkList.eh_doRefresh += Cmp_BP_bunkList_eh_doRefresh; cmp_BP_sheetList.eh_doRefresh += Cmp_BP_sheetList_eh_doRefresh; + cmp_slider.eh_doRefresh += Cmp_slider_eh_doRefresh; + } + + private void Cmp_slider_eh_doRefresh(object sender, EventArgs e) + { + // valore selezionato + int selValue = cmp_slider.selValue > 0 ? cmp_slider.selValue : 1; + // seleziono bunk da slider... è 0..100 --> riparametro + int numBunk = cmp_BP_bunkList.numBunks; + int newBunkIndex = (numBunk * selValue) / 100; + // controllo sia tra min e max... + newBunkIndex = newBunkIndex < 0 ? 0 : newBunkIndex; + newBunkIndex = newBunkIndex >= numBunk ? numBunk - 1 : newBunkIndex; + // seleziono + cmp_BP_bunkList.selIndex = newBunkIndex; + cmp_BP_sheetList.BunkId = cmp_BP_bunkList.BunkIdSel; + int numSheets = cmp_BP_sheetList.numSheets; + int newSheetIndex = (selValue % (100 / numBunk)) * numSheets / (100 / numBunk); + // controllo sia tra min e max... + newSheetIndex = newSheetIndex < 0 ? 0 : newSheetIndex; + newSheetIndex = newSheetIndex >= numSheets ? numSheets - 1 : newSheetIndex; + //seleziono + cmp_BP_sheetList.selIndex = newSheetIndex; + cmp_MU_svgViewer.SheetId = cmp_BP_sheetList.SheetIdSel; } private void Cmp_BP_sheetList_eh_doRefresh(object sender, EventArgs e) diff --git a/NKC_WF/site/BatchPreview.aspx.designer.cs b/NKC_WF/site/BatchPreview.aspx.designer.cs index 6395e3f..e2e451a 100644 --- a/NKC_WF/site/BatchPreview.aspx.designer.cs +++ b/NKC_WF/site/BatchPreview.aspx.designer.cs @@ -32,6 +32,24 @@ namespace NKC_WF.site /// protected global::NKC_WF.WebUserControls.cmp_BP_bunkList cmp_BP_bunkList; + /// + /// Controllo lblOut. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblOut; + + /// + /// Controllo cmp_slider. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_slider cmp_slider; + /// /// Controllo cmp_MU_svgViewer. /// From 75c837296f3f5056e97d697a159724c8041b56be Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 27 Jan 2020 12:21:43 +0100 Subject: [PATCH 4/4] Fix selezione <--> slider x preview --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_slider.ascx.cs | 10 +++++++++- NKC_WF/site/BatchPreview.aspx.cs | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 909d7a5..1b74429 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=228']) { + withEnv(['NEXT_BUILD_NUMBER=229']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/WebUserControls/cmp_slider.ascx.cs b/NKC_WF/WebUserControls/cmp_slider.ascx.cs index 4523dbc..e95c242 100644 --- a/NKC_WF/WebUserControls/cmp_slider.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_slider.ascx.cs @@ -11,7 +11,6 @@ namespace NKC_WF.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - } protected void txtSlider_TextChanged(object sender, EventArgs e) @@ -30,6 +29,15 @@ namespace NKC_WF.WebUserControls int.TryParse(txtSlider.Text, out answ); return answ; } + set + { + // lo imposto sapendo che è fondoscala a 100! + txtSlider.Text = value.ToString(); + } } + /// + /// Fondoscale (hard coded...) + /// + public int resolution = 100; } } \ No newline at end of file diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index 7c779b7..16168fc 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -46,14 +46,21 @@ namespace NKC_WF.site private void Cmp_BP_sheetList_eh_doRefresh(object sender, EventArgs e) { + int numBunk = cmp_BP_bunkList.numBunks; + cmp_slider.selValue = (100 * (cmp_BP_bunkList.selIndex) / numBunk) + ((cmp_BP_sheetList.selIndex * 100) / (cmp_BP_sheetList.numSheets * numBunk)); // imposto sheet sul foglio... cmp_MU_svgViewer.SheetId = cmp_BP_sheetList.SheetIdSel; } private void Cmp_BP_bunkList_eh_doRefresh(object sender, EventArgs e) { + // fix selezione slider... + int numBunk = cmp_BP_bunkList.numBunks; + cmp_slider.selValue = 100 * (cmp_BP_bunkList.selIndex) / numBunk; // aggiorno sheets cmp_BP_sheetList.BunkId = cmp_BP_bunkList.BunkIdSel; + cmp_BP_sheetList.selIndex = 0; + cmp_MU_svgViewer.SheetId = cmp_BP_sheetList.SheetIdSel; } protected int bunkIndex