From a93ece75be5b4756d5207e5e2ae4367c1a2a601e Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 16 Jan 2020 20:51:27 +0100 Subject: [PATCH 01/37] Aggiunta salvataggio in mongoDB delle risposte nesting (TESTARE!!!) --- AppData/ComLib.cs | 72 ++++++++++++++++++++++- NKC_WF/Controllers/BatchProcController.cs | 8 +++ NKC_WF/Web.config | 2 + 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 8550c92..11a7cb0 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using MongoDB.Driver; +using Newtonsoft.Json; using Newtonsoft.Json.Converters; using NKC_SDK; using SteamWare; @@ -12,6 +13,75 @@ namespace AppData /// public class ComLib { + /// + /// Database corrente MongoDB + /// + IMongoDatabase database; + /// + /// Init classe ComLib + /// + public ComLib() + { + database = memLayer.ML.getMongoDatabase("NKC"); + } + /// + /// Classe impiego sstatico ComLib... + /// + public static ComLib man = new ComLib(); + + /// + /// Salva una risposta ricevuta x STIMA + /// + /// Stringa della risposta JSON ricevuta dal nesting + /// + public bool saveEstAnsw(nestReplyBatchInitial nestAnsw) + { + bool answ = false; + try + { + var collRawData = database.GetCollection("EstimationArchive"); + collRawData.InsertOne(nestAnsw); + answ = true; + } + catch + { } + return answ; + } + /// + /// Salva una risposta ricevuta x NESTING + /// + /// Stringa della risposta JSON ricevuta dal nesting + /// + public bool saveNestAnsw(nestReplyBatchFinal nestAnsw) + { + bool answ = false; + try + { + var collRawData = database.GetCollection("NestingArchive"); + collRawData.InsertOne(nestAnsw); + answ = true; + } + catch + { } + return answ; + } + + //public object getEstAnsw(int BatchId) + //{ + // List answ = null; + + // var collNAA = database.GetCollection("NestAnswArchive"); + // // oggetto filtraggio x nest answ + // var builderNAA = Builders.Filter; + // var filtBatchId = builderNAA.Eq(u => u.BatchID, BatchId); + + // var datiCorrenti = collNAA.Find(filtBatchId); + // foreach (var item in datiCorrenti) + // { + + // } + // return answ; + //} /// /// Wrapper traduzione termini diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index d77d04d..c08bf1b 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -133,6 +133,10 @@ namespace NKC_WF.Controllers int bStatus = 0; // deserializzo come BatchreqIniziale (stima) nestReplyBatchInitial rispStima = JsonConvert.DeserializeObject(content); + + // 2020.01.16 salvo su mongoDb la risposta... + ComLib.man.saveEstAnsw(rispStima); + // recupero info sul batch /KIT specifico x capire se sia di tipo "validation" bool isValidation = false; var tabOrd = DataLayer.man.taOL.getByBatch(rispStima.BatchID); @@ -222,6 +226,10 @@ namespace NKC_WF.Controllers { // deserializzo come BatchreqFinale nestReplyBatchFinal rispNest = JsonConvert.DeserializeObject(content); + + // 2020.01.16 salvo su mongoDb la risposta... + ComLib.man.saveNestAnsw(rispNest); + // calcolo status del batch... int bStatus = 2; switch (rispNest.ProcessStatus) diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 2e173a8..47a909f 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -69,6 +69,8 @@ + + From f8a870e324d501513eb0bccb3727d5798a7c5f3a Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 17 Jan 2020 09:57:34 +0100 Subject: [PATCH 02/37] Aggiunta nuova gestioen salvataggio (con delete vecchio) e recupero dati nesting archiviati --- AppData/ComLib.cs | 73 ++++++++++++++++++++++++++++++++++++++++++++++ NKC_SDK/Objects.cs | 25 ++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 11a7cb0..6e8eb1d 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -13,6 +13,8 @@ namespace AppData /// public class ComLib { + #region Gestione persistenza risposte via REST da NESTING + /// /// Database corrente MongoDB /// @@ -39,8 +41,15 @@ namespace AppData bool answ = false; try { + // definisco filtro + var filtBuilder = Builders.Filter; + var filter = filtBuilder.Eq("BatchID", nestAnsw.BatchID); var collRawData = database.GetCollection("EstimationArchive"); + // elimino old + collRawData.DeleteMany(filter); + // aggiungo collRawData.InsertOne(nestAnsw); + answ = true; } catch @@ -57,7 +66,13 @@ namespace AppData bool answ = false; try { + // definisco filtro + var filtBuilder = Builders.Filter; + var filter = filtBuilder.Eq("BatchID", nestAnsw.BatchID); var collRawData = database.GetCollection("NestingArchive"); + // elimino old + collRawData.DeleteMany(filter); + // aggiungo collRawData.InsertOne(nestAnsw); answ = true; } @@ -65,6 +80,48 @@ namespace AppData { } return answ; } + /// + /// Recupero risposta stima salvata + /// + /// + /// + public nestReplyBatchInitial geEstAnsw(int BatchID) + { + nestReplyBatchInitial answ = null; + try + { + // definisco filtro + var filtBuilder = Builders.Filter; + var filter = filtBuilder.Eq("BatchID", BatchID); + var collRawData = database.GetCollection("EstimationArchive"); + // recupero + answ = collRawData.Find(filter).FirstOrDefault(); + } + catch + { } + return answ; + } + /// + /// Recupero risposta nesting salvata + /// + /// + /// + public nestReplyBatchFinal getNestAnsw(int BatchID) + { + nestReplyBatchFinal answ = null; + try + { + // definisco filtro + var filtBuilder = Builders.Filter; + var filter = filtBuilder.Eq("BatchID", BatchID); + var collRawData = database.GetCollection("NestingArchive"); + // recupero + answ = collRawData.Find(filter).FirstOrDefault(); + } + catch + { } + return answ; + } //public object getEstAnsw(int BatchId) //{ @@ -83,6 +140,22 @@ namespace AppData // return answ; //} + /// + /// restitusice ultima chiamata REST registrata su REDIS + /// + /// + public static string lastRestAnsw() + { + string answ = ""; + // recupero ultima call + string redKey = $"{ComLib.redNestAnsw}:LAST_CALL"; + answ = memLayer.ML.getRSV(redKey); + return answ; + } + + + #endregion + /// /// Wrapper traduzione termini /// diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index 65891d7..dc14518 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -162,6 +162,31 @@ namespace NKC_SDK /// public double EstimatedWorktime { get; set; } = 0; /// + /// Superficie WORK (lavorata/tagliata) del foglio lavorato (= somma area dei pezzi disposti) + /// + public double SurfaceWork { get; set; } = 0; + /// + /// Superficie totale del foglio lavorato (= materiale) + /// + public double SurfaceTotal { get; set; } = 1; + /// + /// Resa (OEE) dell'impiego del materiale + /// + public double SurfaceOEE + { + get + { + double answ = 0; + try + { + answ = SurfaceWork / SurfaceTotal; + } + catch + { } + return answ; + } + } + /// /// Programma x printing /// public string PrintProgram { get; set; } = ""; From c6efdd9e42c00b19290b73a77690a61e4e3c842c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 17 Jan 2020 09:57:50 +0100 Subject: [PATCH 03/37] Aggiunta button x salvare last answ --- NKC_WF/WebUserControls/cmp_devUtils.ascx | 13 +++++--- NKC_WF/WebUserControls/cmp_devUtils.ascx.cs | 32 +++++++++++++++++++ .../cmp_devUtils.ascx.designer.cs | 9 ++++++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_devUtils.ascx b/NKC_WF/WebUserControls/cmp_devUtils.ascx index 8ce0259..a68b48c 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx @@ -1,9 +1,14 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_devUtils.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_devUtils" %>
-
+
Reset
Stack building
- Reset
Nesting Calls
-
-
\ No newline at end of file +
+ Reset
Nesting Calls
+
+
+ SAVE
LAST Call
+
+
+ diff --git a/NKC_WF/WebUserControls/cmp_devUtils.ascx.cs b/NKC_WF/WebUserControls/cmp_devUtils.ascx.cs index 11c63b7..a5f0309 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx.cs @@ -1,4 +1,6 @@ using AppData; +using Newtonsoft.Json; +using NKC_SDK; using System; namespace NKC_WF.WebUserControls @@ -19,5 +21,35 @@ namespace NKC_WF.WebUserControls { DataLayer.man.taBL.resetNesting(-9999); } + + protected void lbtSaveLastAnsw_Click(object sender, EventArgs e) + { + string content = ComLib.lastRestAnsw(); + + // deserializzo. + baseNestAnsw batchProcAnsw = JsonConvert.DeserializeObject(content); + + // se non nullo... + if (batchProcAnsw != null) + { + if (batchProcAnsw.OrderType == oType.BatchRequest) + { + if (batchProcAnsw.ProcType == 1) + { + // deserializzo come BatchreqIniziale (stima) + nestReplyBatchInitial rispStima = JsonConvert.DeserializeObject(content); + // 2020.01.16 salvo su mongoDb la risposta... + ComLib.man.saveEstAnsw(rispStima); + } + else + { + // deserializzo come BatchreqFinale + nestReplyBatchFinal rispNest = JsonConvert.DeserializeObject(content); + // 2020.01.16 salvo su mongoDb la risposta... + ComLib.man.saveNestAnsw(rispNest); + } + } + } + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs index e1f2490..9e4cc58 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs @@ -31,5 +31,14 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.LinkButton lbtResetNest; + + /// + /// Controllo lbtSaveLastAnsw. + /// + /// + /// 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.LinkButton lbtSaveLastAnsw; } } From 158c60a930b446c5ac0d6e4de3bce6c312c4e5ea Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 17 Jan 2020 11:46:02 +0100 Subject: [PATCH 04/37] Update output stima/nest x dati su MongoDB --- AppData/ComLib.cs | 7 +- Jenkinsfile | 2 +- NKC_WF/Web.config | 1 + NKC_WF/WebUserControls/cmp_batchDetail.ascx | 9 ++- .../WebUserControls/cmp_batchDetail.ascx.cs | 28 +++++++ .../cmp_batchDetail.ascx.designer.cs | 75 +++++++++++-------- 6 files changed, 85 insertions(+), 37 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 6e8eb1d..80ad5b0 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -85,7 +85,7 @@ namespace AppData /// /// /// - public nestReplyBatchInitial geEstAnsw(int BatchID) + public nestReplyBatchInitial getEstAnsw(int BatchID) { nestReplyBatchInitial answ = null; try @@ -95,7 +95,7 @@ namespace AppData var filter = filtBuilder.Eq("BatchID", BatchID); var collRawData = database.GetCollection("EstimationArchive"); // recupero - answ = collRawData.Find(filter).FirstOrDefault(); + answ = collRawData.Find(filter).Project("{_id: 0}").FirstOrDefault(); } catch { } @@ -114,9 +114,10 @@ namespace AppData // definisco filtro var filtBuilder = Builders.Filter; var filter = filtBuilder.Eq("BatchID", BatchID); + FindOptions opz = new FindOptions { ShowRecordId = false }; var collRawData = database.GetCollection("NestingArchive"); // recupero - answ = collRawData.Find(filter).FirstOrDefault(); + answ = collRawData.Find(filter).Project("{_id: 0}").FirstOrDefault(); } catch { } diff --git a/Jenkinsfile b/Jenkinsfile index d524078..1e0ddab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=183']) { + withEnv(['NEXT_BUILD_NUMBER=187']) { // env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 47a909f..838a0a3 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -71,6 +71,7 @@ + diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index ae5cfb7..92c56d7 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -64,7 +64,8 @@
- min + + min
@@ -78,3 +79,9 @@ + +
+
+ +
+
diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 8985c52..c7e2c34 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -1,6 +1,8 @@ using AppData; using NKC_SDK; +using SteamWare; using System; +using System.Text; namespace NKC_WF.WebUserControls { @@ -18,6 +20,32 @@ namespace NKC_WF.WebUserControls { hfBatchId.Value = value.ToString(); frmView.DataBind(); + if (memLayer.ML.CRB("enableMongo")) + { + // cerco da lista salvataggi Estim/Nest... + var estimAnsw = ComLib.man.getEstAnsw(value); + var nestAnsw = ComLib.man.getNestAnsw(value); + StringBuilder sb = new StringBuilder(); + if (estimAnsw != null) + { + try + { + sb.AppendLine($"ESTIM: EnvNum: {estimAnsw.EnvNum} | Worktime: {estimAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {estimAnsw.ProcessingRuntime / 60:N2} min | Parts #: {estimAnsw.PartList.Count}"); + } + catch + { } + } + if (nestAnsw != null) + { + try + { + sb.AppendLine($"NEST: EnvNum: {nestAnsw.EnvNum} | Worktime: {nestAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {nestAnsw.ProcessingRuntime / 60:N2} min | Bunks #: {nestAnsw.BunkList.Count} | Carts #: {nestAnsw.CartList.Count}"); + } + catch + { } + } + lblTestJson.Text = sb.Replace("\r\n", "
").ToString(); + } } get { diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index a37a0b4..aa15521 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -7,36 +7,47 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF.WebUserControls { - - - public partial class cmp_batchDetail { - - /// - /// Controllo frmView. - /// - /// - /// 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.FormView frmView; - - /// - /// Controllo hfBatchId. - /// - /// - /// 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.HiddenField hfBatchId; - - /// - /// Controllo ods. - /// - /// - /// 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.ObjectDataSource ods; - } +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_batchDetail + { + + /// + /// Controllo frmView. + /// + /// + /// 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.FormView frmView; + + /// + /// Controllo hfBatchId. + /// + /// + /// 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.HiddenField hfBatchId; + + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; + + /// + /// Controllo lblTestJson. + /// + /// + /// 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 lblTestJson; + } } From 761dc55ad5f6f10384312594dbe7c7d68fabef9a Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 17 Jan 2020 12:18:37 +0100 Subject: [PATCH 05/37] Fix visualizzaizone dettagli batch --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_batchDetail.ascx | 2 +- NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1e0ddab..7656f64 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=187']) { + withEnv(['NEXT_BUILD_NUMBER=188']) { // env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.7.${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_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index 92c56d7..26215d0 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -81,7 +81,7 @@
-
+
diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index c7e2c34..62512d3 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -26,6 +26,7 @@ namespace NKC_WF.WebUserControls var estimAnsw = ComLib.man.getEstAnsw(value); var nestAnsw = ComLib.man.getNestAnsw(value); StringBuilder sb = new StringBuilder(); + sb.AppendLine("DEBUG INFO:"); if (estimAnsw != null) { try From 5278c225503bb541eb7a7450ab7660c9199c45d8 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 17 Jan 2020 12:19:28 +0100 Subject: [PATCH 06/37] Aggiunta cancellazione ensting discarded --- NKC_WF/WebUserControls/cmp_batchList.ascx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index a1cc7de..47d315e 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -79,7 +79,7 @@
- +
From f36d2bad7b687d6c8b594db9e4c51a8ef96d8e0d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 17 Jan 2020 18:43:58 +0100 Subject: [PATCH 07/37] OK SIM + gestione bunk / load con prod SIMULATO --- AppData/DS_App.Designer.cs | 142 ++++++++++------ AppData/DS_App.xsd | 87 +++++----- AppData/DS_App.xss | 12 +- AppData/DataLayer.cs | 9 +- AppData/reportPrinter.cs | 12 +- Jenkinsfile | 8 +- NKC_WF/Web.Prod.config | 1 + NKC_WF/Web.config | 2 + NKC_WF/WebUserControls/cmp_batchList.ascx | 2 +- .../WebUserControls/cmp_stackBuilding.ascx.cs | 2 +- NKC_WF/WebUserControls/cmp_stackLoading.ascx | 10 ++ .../WebUserControls/cmp_stackLoading.ascx.cs | 23 +++ .../cmp_stackLoading.ascx.designer.cs | 156 ++++++++++-------- 13 files changed, 288 insertions(+), 178 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index a4ffc6c..c6239cf 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -13384,73 +13384,79 @@ 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[9]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[10]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_SheetList"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_Sheets_getByItemID"; + this._commandCollection[1].CommandText = "dbo.stp_Sheets_AdvanceInStack"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_Sheets_getByMLStatus"; + this._commandCollection[2].CommandText = "dbo.stp_Sheets_getByItemID"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].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[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShStatusStart", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShStatusEnd", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_Sheets_getByStack"; + this._commandCollection[3].CommandText = "dbo.stp_Sheets_getByMLStatus"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShStatusStart", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShStatusEnd", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_Sheets_getNextByStack"; + this._commandCollection[4].CommandText = "dbo.stp_Sheets_getByStack"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_Sheets_insert"; + this._commandCollection[5].CommandText = "dbo.stp_Sheets_getNextByStack"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].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[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkTimeEst", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrintFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CncFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DrawFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_Sheets_resetPrepared"; + this._commandCollection[6].CommandText = "dbo.stp_Sheets_insert"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MatID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkTimeEst", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrintFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CncFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DrawFilePath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; - this._commandCollection[7].CommandText = "dbo.stp_Sheets_setPrepared"; + this._commandCollection[7].CommandText = "dbo.stp_Sheets_resetPrepared"; this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_Sheets_updDate"; + this._commandCollection[8].CommandText = "dbo.stp_Sheets_setPrepared"; this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[9].Connection = this.Connection; + this._commandCollection[9].CommandText = "dbo.stp_Sheets_updDate"; + this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[9].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[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SheetID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrntEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WrkEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UnlEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13482,7 +13488,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.SheetListDataTable getByItemID(global::System.Nullable ItemID) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((ItemID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); } @@ -13499,7 +13505,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.SheetListDataTable getByMLStatus(global::System.Nullable BatchID, global::System.Nullable ShStatusStart, global::System.Nullable ShStatusEnd) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((BatchID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -13528,23 +13534,6 @@ namespace AppData.DS_AppTableAdapters { [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.SheetListDataTable getByStack(global::System.Nullable StackID) { - this.Adapter.SelectCommand = this.CommandCollection[3]; - if ((StackID.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); - } - else { - this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; - } - DS_App.SheetListDataTable dataTable = new DS_App.SheetListDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.SheetListDataTable getNextByStack(global::System.Nullable StackID) { this.Adapter.SelectCommand = this.CommandCollection[4]; if ((StackID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); @@ -13561,8 +13550,25 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.SheetListDataTable insertAndReturn(global::System.Nullable SheetIndex, global::System.Nullable MatID, global::System.Nullable WrkTimeEst, global::System.Nullable StackID, string PrintFilePath, string CncFilePath, string DrawFilePath) { + public virtual DS_App.SheetListDataTable getNextByStack(global::System.Nullable StackID) { this.Adapter.SelectCommand = this.CommandCollection[5]; + if ((StackID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.SheetListDataTable dataTable = new DS_App.SheetListDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.SheetListDataTable insertAndReturn(global::System.Nullable SheetIndex, global::System.Nullable MatID, global::System.Nullable WrkTimeEst, global::System.Nullable StackID, string PrintFilePath, string CncFilePath, string DrawFilePath) { + this.Adapter.SelectCommand = this.CommandCollection[6]; if ((SheetIndex.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SheetIndex.Value)); } @@ -13613,10 +13619,10 @@ 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 resetPrepared(global::System.Nullable SheetID) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; - if ((SheetID.HasValue == true)) { - command.Parameters[1].Value = ((int)(SheetID.Value)); + public virtual int advanceInStack(global::System.Nullable StackID) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((StackID.HasValue == true)) { + command.Parameters[1].Value = ((int)(StackID.Value)); } else { command.Parameters[1].Value = global::System.DBNull.Value; @@ -13641,7 +13647,7 @@ 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 setPrepared(global::System.Nullable SheetID) { + public virtual int resetPrepared(global::System.Nullable SheetID) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(SheetID.Value)); @@ -13669,8 +13675,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 updateDate(global::System.Nullable Original_SheetID, global::System.Nullable PrntStart, global::System.Nullable PrntEnd, global::System.Nullable WrkStart, global::System.Nullable WrkEnd, global::System.Nullable UnlStart, global::System.Nullable UnlEnd) { + public virtual int setPrepared(global::System.Nullable SheetID) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; + if ((SheetID.HasValue == true)) { + command.Parameters[1].Value = ((int)(SheetID.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 updateDate(global::System.Nullable Original_SheetID, global::System.Nullable PrntStart, global::System.Nullable PrntEnd, global::System.Nullable WrkStart, global::System.Nullable WrkEnd, global::System.Nullable UnlStart, global::System.Nullable UnlEnd) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[9]; if ((Original_SheetID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_SheetID.Value)); } diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 206d6b7..86dae85 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -62,7 +62,7 @@ - + dbo.stp_Batch_deleteTree @@ -130,7 +130,7 @@ - + dbo.stp_Batch_redoPartValid @@ -142,7 +142,7 @@ - + dbo.stp_Batch_resetNesting @@ -153,7 +153,7 @@ - + dbo.stp_Batch_resetPartUnValid @@ -164,7 +164,7 @@ - + dbo.stp_Batch_updateStatus @@ -336,6 +336,17 @@ FROM v_SheetList + + + + dbo.stp_Sheets_AdvanceInStack + + + + + + + @@ -2009,7 +2020,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2057,7 +2068,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2079,7 +2090,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2134,7 +2145,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2207,7 +2218,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2215,7 +2226,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2284,7 +2295,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2317,7 +2328,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2340,7 +2351,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2356,7 +2367,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2380,7 +2391,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2388,7 +2399,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2405,7 +2416,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2414,7 +2425,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2445,7 +2456,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2453,7 +2464,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2469,7 +2480,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2477,7 +2488,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2505,7 +2516,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2541,7 +2552,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2557,7 +2568,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2655,18 +2666,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 aa024bb..70e51e0 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,11 +4,11 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + @@ -24,9 +24,9 @@ - - - + + + diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs index 1bbd424..9f352e3 100644 --- a/AppData/DataLayer.cs +++ b/AppData/DataLayer.cs @@ -207,7 +207,14 @@ namespace AppData if (checkDoc(tipoDoc, keyParam)) { answ = reportPrinter.obj.stampaCartellino(tipoDoc, keyParam, printer); - logger.lg.scriviLog(string.Format(" | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.INFO); + if (answ) + { + logger.lg.scriviLog(string.Format(" | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.INFO); + } + else + { + logger.lg.scriviLog(string.Format("ERRORE | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.ERROR); + } } else { diff --git a/AppData/reportPrinter.cs b/AppData/reportPrinter.cs index d4827df..99d231c 100644 --- a/AppData/reportPrinter.cs +++ b/AppData/reportPrinter.cs @@ -182,26 +182,28 @@ namespace AppData LocalReport report = new LocalReport(); report.EnableExternalImages = true; string deviceInfo = ""; + string repoBasePath = utils.getPath(memLayer.ML.cdv("ReportBasePath")); + repoBasePath = repoBasePath.Replace("\\site", ""); switch (tipoReport) { case reportRichiesto.cartLabel: - report.ReportPath = string.Format(@"{0}\CartLabel.rdlc", utils.getPath(memLayer.ML.cdv("ReportBasePath"))); + report.ReportPath = string.Format(@"{0}\CartLabel.rdlc", repoBasePath); report.DataSources.Add(new ReportDataSource(memLayer.ML.cdv("ReportDS_DocCart"), caricaDati(tipoReport, keyParam))); break; case reportRichiesto.paintLabelPre: - report.ReportPath = string.Format(@"{0}\PaintPreLabel.rdlc", utils.getPath(memLayer.ML.cdv("ReportBasePath"))); + report.ReportPath = string.Format(@"{0}\PaintPreLabel.rdlc", repoBasePath); report.DataSources.Add(new ReportDataSource(memLayer.ML.cdv("ReportDS_DocPaintPre"), caricaDati(tipoReport, keyParam))); break; case reportRichiesto.paintLabelPost: - report.ReportPath = string.Format(@"{0}\PaintPreLabel.rdlc", utils.getPath(memLayer.ML.cdv("ReportBasePath"))); + report.ReportPath = string.Format(@"{0}\PaintPreLabel.rdlc", repoBasePath); report.DataSources.Add(new ReportDataSource(memLayer.ML.cdv("ReportDS_DocPaintPre"), caricaDati(tipoReport, keyParam))); break; case reportRichiesto.partLabel: - report.ReportPath = string.Format(@"{0}\PartLabel.rdlc", utils.getPath(memLayer.ML.cdv("ReportBasePath"))); + report.ReportPath = string.Format(@"{0}\PartLabel.rdlc", repoBasePath); report.DataSources.Add(new ReportDataSource(memLayer.ML.cdv("ReportDS_DocPart"), caricaDati(tipoReport, keyParam))); break; case reportRichiesto.stackLabel: - report.ReportPath = string.Format(@"{0}\StackLabel.rdlc", utils.getPath(memLayer.ML.cdv("ReportBasePath"))); + report.ReportPath = string.Format(@"{0}\StackLabel.rdlc", repoBasePath); report.DataSources.Add(new ReportDataSource(memLayer.ML.cdv("ReportDS_DocStack"), caricaDati(tipoReport, keyParam))); break; } diff --git a/Jenkinsfile b/Jenkinsfile index 7656f64..fe88b7a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,10 +17,10 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=188']) { - // env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) - env.versionNumber = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') - env.versionNumberBeta = VersionNumber(versionNumberString : '0.7.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') + withEnv(['NEXT_BUILD_NUMBER=193']) { + // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) + env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') + env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'NKC' } } diff --git a/NKC_WF/Web.Prod.config b/NKC_WF/Web.Prod.config index 031e1f5..e08e2d6 100644 --- a/NKC_WF/Web.Prod.config +++ b/NKC_WF/Web.Prod.config @@ -4,6 +4,7 @@ + diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 838a0a3..c411594 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -44,6 +44,8 @@ + + diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index 47d315e..44172d7 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -79,7 +79,7 @@
- +
diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs index 2ac2927..c9d03e8 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs @@ -58,7 +58,7 @@ namespace NKC_WF.WebUserControls cmp_barcode.showOutput("text-warning", "Item - ignored"); break; case codeType.Material: - // verifico SE il materiale SIA quello dello sheet richeisto dallos tack corrente... + // verifico SE il materiale SIA quello dello sheet richiesto dallo stack/bunk corrente... DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); // se tab vuota --> HO FINITO!!!! if (nextTbl.Count == 0) diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx b/NKC_WF/WebUserControls/cmp_stackLoading.ascx index 7748f45..b3fb81a 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx @@ -3,6 +3,16 @@ <%@ Register Src="~/WebUserControls/cmp_stackNextloading.ascx" TagPrefix="uc1" TagName="cmp_stackNextloading" %>
+
+
+
+

Testing PROD

+
+
+ AVANZA prod +
+
+
diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs index 58a9273..cafddeb 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs @@ -1,5 +1,6 @@ using AppData; using NKC_SDK; +using SteamWare; using System; namespace NKC_WF.WebUserControls @@ -176,6 +177,8 @@ namespace NKC_WF.WebUserControls { lblLoaded.Visible = StackId != 0; frmView.Visible = !lblLoaded.Visible; + // fix div di simulazione + divSim.Visible = memLayer.ML.CRB("enableSimProd"); } public void doUpdate() @@ -192,5 +195,25 @@ namespace NKC_WF.WebUserControls cmp_stackNextloading.BatchId = BatchIdCurr; raiseEvent(); } + + protected void lbtAdvanceProd_Click(object sender, EventArgs e) + { + // chiama stored x cambiare dt dei vari processi governati dal prod... + var currStack = DataLayer.man.taSTL.getCurrByBatch(BatchIdCurr); + if (currStack != null) + { + if (currStack.Count > 0) + { + int stackIdCurr = currStack[0].StackID; + DataLayer.man.taSHL.advanceInStack(stackIdCurr); + } + doUpdate(); + } + } + + protected void lbtAdvanceBunk_Click(object sender, EventArgs e) + { + // simula invio barcode del PROSSIMO BUNK (SE necessario) + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs index d4803e5..865ffe1 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs @@ -7,72 +7,92 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF.WebUserControls { - - - public partial class cmp_stackLoading { - - /// - /// Controllo hfBarcode. - /// - /// - /// 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.HiddenField hfBarcode; - - /// - /// Controllo hfStackId. - /// - /// - /// 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.HiddenField hfStackId; - - /// - /// Controllo lblLoaded. - /// - /// - /// 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 lblLoaded; - - /// - /// Controllo frmView. - /// - /// - /// 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.FormView frmView; - - /// - /// Controllo ods. - /// - /// - /// 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.ObjectDataSource ods; - - /// - /// Controllo cmp_barcode. - /// - /// - /// 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_barcode cmp_barcode; - - /// - /// Controllo cmp_stackNextloading. - /// - /// - /// 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_stackNextloading cmp_stackNextloading; - } +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_stackLoading + { + + /// + /// Controllo divSim. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSim; + + /// + /// Controllo lbtAdvanceProd. + /// + /// + /// 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.LinkButton lbtAdvanceProd; + + /// + /// Controllo hfBarcode. + /// + /// + /// 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.HiddenField hfBarcode; + + /// + /// Controllo hfStackId. + /// + /// + /// 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.HiddenField hfStackId; + + /// + /// Controllo lblLoaded. + /// + /// + /// 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 lblLoaded; + + /// + /// Controllo frmView. + /// + /// + /// 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.FormView frmView; + + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; + + /// + /// Controllo cmp_barcode. + /// + /// + /// 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_barcode cmp_barcode; + + /// + /// Controllo cmp_stackNextloading. + /// + /// + /// 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_stackNextloading cmp_stackNextloading; + } } From f0b543440af09d04624ebcc0607c69a06018a03f Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:11:38 +0100 Subject: [PATCH 08/37] Update struttura colori --- NKC_WF/Content/SheetColor.css | 12 ++++++------ NKC_WF/Content/SheetColor.less | 6 +++--- NKC_WF/Content/SheetColor.min.css | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index 9d2539f..3680df5 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -1,20 +1,20 @@ /* ANIMAZIONE */ .strokeThick { - stroke-width: 5px !important; + stroke-width: 50px !important; } /* Animazione per richiamo attenzione*/ .flashStroke { stroke: blue; /* Safari 4.0 - 8.0 */ -webkit-animation-name: blueFlash; - -webkit-animation-duration: 0.5s; + -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ animation-name: blueFlash; - animation-duration: 0.5s; + animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; animation-iteration-count: infinite; @@ -81,19 +81,19 @@ stroke: blue; /* Safari 4.0 - 8.0 */ -webkit-animation-name: blueFlash; - -webkit-animation-duration: 0.5s; + -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ animation-name: blueFlash; - animation-duration: 0.5s; + animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; animation-iteration-count: infinite; animation-direction: alternate; - stroke-width: 5px !important; + stroke-width: 50px !important; } #BLK-BIN { fill: #28a745; diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index b4330c0..2437d38 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -1,5 +1,5 @@ /* ANIMAZIONE */ -@borderThick: 5px; +@borderThick: 50px; .strokeThick { stroke-width: @borderThick !important; @@ -9,14 +9,14 @@ stroke: blue; /* Safari 4.0 - 8.0 */ -webkit-animation-name: blueFlash; - -webkit-animation-duration: 0.5s; + -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ animation-name: blueFlash; - animation-duration: 0.5s; + animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; animation-iteration-count: infinite; diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index f6b23d9..840c089 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -.strokeThick{stroke-width:5px !important;}.flashStroke{stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{stroke:#c4dbff;}25%{stroke:#9dc4ff;}50%{stroke:#5ca5ff;}75%{stroke:#1b82ff;}100%{stroke:#005ccc;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.5s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.5s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:5px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file +.strokeThick{stroke-width:50px !important;}.flashStroke{stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{stroke:#c4dbff;}25%{stroke:#9dc4ff;}50%{stroke:#5ca5ff;}75%{stroke:#1b82ff;}100%{stroke:#005ccc;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:50px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file From 75210a9ae70d56b682eef04ad85c9bb8947e6e09 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:12:00 +0100 Subject: [PATCH 09/37] Spostato visualizzaizone svg in componente interno (da prendere da DB!!!) --- NKC_WF/WebUserControls/cmp_svgViewer.ascx | 22 +++++++++ NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs | 20 ++++++++ .../cmp_svgViewer.ascx.designer.cs | 26 ++++++++++ NKC_WF/site/MachineUnload.aspx | 39 +++------------ NKC_WF/site/MachineUnload.aspx.cs | 7 --- NKC_WF/site/MachineUnload.aspx.designer.cs | 48 ++++++++++--------- 6 files changed, 99 insertions(+), 63 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_svgViewer.ascx create mode 100644 NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_svgViewer.ascx new file mode 100644 index 0000000..f08d903 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_svgViewer.ascx @@ -0,0 +1,22 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_svgViewer.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_svgViewer" %> + +
+ +
+ + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs new file mode 100644 index 0000000..25b6527 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_svgViewer : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + string filename = Server.MapPath("~/Images/test.svg"); + string answ = File.ReadAllText(filename); + svgTable.InnerHtml = answ; + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs new file mode 100644 index 0000000..fa20881 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_svgViewer.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_svgViewer + { + + /// + /// Controllo svgTable. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable; + } +} diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index 1eabd98..1a3a4a4 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -1,37 +1,9 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MachineUnload.aspx.cs" Inherits="NKC_WF.MachineUnload" %> - - <%-- - - - - - --%> - <%-- - - - - - --%> -
- -
- +<%@ Register Src="~/WebUserControls/cmp_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_svgViewer" %> + +
@@ -283,8 +255,9 @@
- - + + <%-- + --%>
diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 219215e..aacc82a 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -7,14 +7,7 @@ namespace NKC_WF { protected void Page_Load(object sender, EventArgs e) { - string filename = Server.MapPath("~/Images/test.svg"); - string answ = File.ReadAllText(filename); - svgTable.InnerHtml = answ; } - protected void timReloadCss_Tick(object sender, EventArgs e) - { - - } } } \ No newline at end of file diff --git a/NKC_WF/site/MachineUnload.aspx.designer.cs b/NKC_WF/site/MachineUnload.aspx.designer.cs index b6f5512..7058661 100644 --- a/NKC_WF/site/MachineUnload.aspx.designer.cs +++ b/NKC_WF/site/MachineUnload.aspx.designer.cs @@ -7,27 +7,29 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF { - - - public partial class MachineUnload { - - /// - /// Controllo upnlDrawings. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.UpdatePanel upnlDrawings; - - /// - /// Controllo svgTable. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable; - } +namespace NKC_WF +{ + + + public partial class MachineUnload + { + + /// + /// Controllo upnlDrawings. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.UpdatePanel upnlDrawings; + + /// + /// Controllo cmp_svgViewer. + /// + /// + /// 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_svgViewer cmp_svgViewer; + } } From 34a680a18555f825671f5b64a61ad3fb823f9c17 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:12:13 +0100 Subject: [PATCH 10/37] pulizia e test nuovo svg (fix x ora) --- .../Batch/B20190916.0/ST0000001/SH0000002.svg | 25 ---- NKC_WF/Images/test.svg | 107 ++++++++++++++---- .../ST0000001/SH0000001.svg => test_a.svg} | 0 3 files changed, 83 insertions(+), 49 deletions(-) delete mode 100644 NKC_WF/Images/Batch/B20190916.0/ST0000001/SH0000002.svg rename NKC_WF/Images/{Batch/B20190916.0/ST0000001/SH0000001.svg => test_a.svg} (100%) diff --git a/NKC_WF/Images/Batch/B20190916.0/ST0000001/SH0000002.svg b/NKC_WF/Images/Batch/B20190916.0/ST0000001/SH0000002.svg deleted file mode 100644 index 1f44c04..0000000 --- a/NKC_WF/Images/Batch/B20190916.0/ST0000001/SH0000002.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - IT000001 - - - - - - IT000002 - - - IT000003 - - - - - - - - - - - \ No newline at end of file diff --git a/NKC_WF/Images/test.svg b/NKC_WF/Images/test.svg index 1f44c04..fb0c2a2 100644 --- a/NKC_WF/Images/test.svg +++ b/NKC_WF/Images/test.svg @@ -1,25 +1,84 @@ - - - - IT000001 - - - - - - IT000002 - - - IT000003 - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + 2 + + + diff --git a/NKC_WF/Images/Batch/B20190916.0/ST0000001/SH0000001.svg b/NKC_WF/Images/test_a.svg similarity index 100% rename from NKC_WF/Images/Batch/B20190916.0/ST0000001/SH0000001.svg rename to NKC_WF/Images/test_a.svg From 08860ceefb0e7fb74e12a2351b4d06076c789ba2 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:12:35 +0100 Subject: [PATCH 11/37] Update gen --- Jenkinsfile | 2 +- NKC_WF/NKC_WF.csproj | 23 ++++-- .../WebUserControls/cmp_batchDetail.ascx.cs | 80 ++++++++++++++++++- 3 files changed, 95 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fe88b7a..dbede6a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=193']) { + withEnv(['NEXT_BUILD_NUMBER=195']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 6b4a835..d2160fe 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -233,8 +233,15 @@ + + SheetColor.less + + + SheetColor.css + + @@ -256,12 +263,6 @@ fonts.css - - SheetColor.less - - - SheetColor.css - @@ -271,7 +272,7 @@ - + @@ -312,6 +313,7 @@ + @@ -825,6 +827,13 @@ cmp_stackNextloading.ascx + + cmp_svgViewer.ascx + ASPXCodeBehind + + + cmp_svgViewer.ascx + cmp_taktList.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 62512d3..b5e9dc6 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -2,6 +2,7 @@ using NKC_SDK; using SteamWare; using System; +using System.Collections.Generic; using System.Text; namespace NKC_WF.WebUserControls @@ -29,18 +30,93 @@ namespace NKC_WF.WebUserControls sb.AppendLine("DEBUG INFO:"); if (estimAnsw != null) { + // elenchi x ricerca duplicati + List partListEstim = new List(); + List partListEstimDupl = new List(); try { - sb.AppendLine($"ESTIM: EnvNum: {estimAnsw.EnvNum} | Worktime: {estimAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {estimAnsw.ProcessingRuntime / 60:N2} min | Parts #: {estimAnsw.PartList.Count}"); + foreach (var part in estimAnsw.PartList) + { + if (partListEstim.Contains(part.PartId)) + { + partListEstimDupl.Add(part.PartId); + } + else + { + partListEstim.Add(part.PartId); + } + } + } + catch + { } + try + { + sb.AppendLine($"ESTIM: EnvNum: {estimAnsw.EnvNum} | Worktime: {estimAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {estimAnsw.ProcessingRuntime / 60:N2} min | Parts #: {estimAnsw.PartList.Count} | Distinct Part # {partListEstim.Count}"); + // se ho duplicati indico: + if (partListEstimDupl.Count > 0) + { + sb.AppendLine("---------------------"); + sb.AppendLine($"ESTIM: FOUND {partListEstimDupl.Count} duplicate:"); + foreach (var partId in partListEstimDupl) + { + sb.AppendLine($"{partId}"); + } + sb.AppendLine("---------------------"); + } } catch { } } if (nestAnsw != null) { + // elenchi x ricerca duplicati + List partListNest = new List(); + List partListNestDupl = new List(); try { - sb.AppendLine($"NEST: EnvNum: {nestAnsw.EnvNum} | Worktime: {nestAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {nestAnsw.ProcessingRuntime / 60:N2} min | Bunks #: {nestAnsw.BunkList.Count} | Carts #: {nestAnsw.CartList.Count}"); + foreach (var bunk in nestAnsw.BunkList) + { + foreach (var sheet in bunk.SheetList) + { + foreach (var part in sheet.PartList) + { + if (partListNest.Contains(part.PartId)) + { + partListNestDupl.Add(part.PartId); + } + else + { + partListNest.Add(part.PartId); + } + } + } + } + } + catch + { } + //il tot delle part è in bunk > Sheet > part + int totPartNum = 0; + foreach (var bunk in nestAnsw.BunkList) + { + foreach (var sheet in bunk.SheetList) + { + totPartNum += sheet.PartList.Count; + } + } + try + { + sb.AppendLine($"NEST: EnvNum: {nestAnsw.EnvNum} | Worktime: {nestAnsw.EstimatedWorktime / 60:N2} min | Processing Runtime {nestAnsw.ProcessingRuntime / 60:N2} min | Bunks #: {nestAnsw.BunkList.Count} | Carts #: {nestAnsw.CartList.Count} | Parts #: {totPartNum}"); + // se ho duplicati indico: + if (partListNestDupl.Count > 0) + { + sb.AppendLine("---------------------"); + sb.AppendLine($"ESTIM: FOUND {partListNestDupl.Count} duplicate:"); + foreach (var partId in partListNestDupl) + { + sb.AppendLine($"{partId}"); + } + sb.AppendLine("---------------------"); + } } catch { } From 474778da8e0a4fb952e91d3bbc82eba677a52597 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:40:31 +0100 Subject: [PATCH 12/37] pulizia dati --- NKC_WF/Images/Test11.svg | 25 -- NKC_WF/Images/test_b.svg | 45 --- NKC_WF/Images/test_bis.svg | 111 ------ NKC_WF/Images/test_quadrato.svg | 658 -------------------------------- 4 files changed, 839 deletions(-) delete mode 100644 NKC_WF/Images/Test11.svg delete mode 100644 NKC_WF/Images/test_b.svg delete mode 100644 NKC_WF/Images/test_bis.svg delete mode 100644 NKC_WF/Images/test_quadrato.svg diff --git a/NKC_WF/Images/Test11.svg b/NKC_WF/Images/Test11.svg deleted file mode 100644 index 6a88b42..0000000 --- a/NKC_WF/Images/Test11.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Part 1 - - - - - - Part 2 - - - Part 3 - - - - - - - - - - - \ No newline at end of file diff --git a/NKC_WF/Images/test_b.svg b/NKC_WF/Images/test_b.svg deleted file mode 100644 index ed10a30..0000000 --- a/NKC_WF/Images/test_b.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/NKC_WF/Images/test_bis.svg b/NKC_WF/Images/test_bis.svg deleted file mode 100644 index 2508d79..0000000 --- a/NKC_WF/Images/test_bis.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NKC_WF/Images/test_quadrato.svg b/NKC_WF/Images/test_quadrato.svg deleted file mode 100644 index 047d55b..0000000 --- a/NKC_WF/Images/test_quadrato.svg +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 2eba6f022218c8d03cae374dc124385ec9506d85 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:40:53 +0100 Subject: [PATCH 13/37] Aggiunto segnaposto "nodata" da usare... --- NKC_WF/Images/{test_no.svg => NoData.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename NKC_WF/Images/{test_no.svg => NoData.svg} (100%) diff --git a/NKC_WF/Images/test_no.svg b/NKC_WF/Images/NoData.svg similarity index 100% rename from NKC_WF/Images/test_no.svg rename to NKC_WF/Images/NoData.svg From de8c9659e2a8d919044bde28533c3050fed99177 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:41:06 +0100 Subject: [PATCH 14/37] Continuata selezione in unload macchina --- NKC_WF/NKC_WF.csproj | 6 +- NKC_WF/Web.config | 2 + NKC_WF/WebUserControls/cmp_svgViewer.ascx | 5 +- NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs | 56 +++++++++++++++++-- .../cmp_svgViewer.ascx.designer.cs | 9 +++ NKC_WF/site/MachineUnload.aspx | 1 + NKC_WF/site/MachineUnload.aspx.cs | 31 +++++++++- NKC_WF/site/MachineUnload.aspx.designer.cs | 9 +++ 8 files changed, 107 insertions(+), 12 deletions(-) diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index d2160fe..01d06bf 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -268,12 +268,8 @@ - - - - + - diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index c411594..afd11a6 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -63,6 +63,8 @@ + + diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_svgViewer.ascx index f08d903..dce4502 100644 --- a/NKC_WF/WebUserControls/cmp_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_svgViewer.ascx @@ -5,7 +5,7 @@
- \ No newline at end of file + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs index 25b6527..8d0234c 100644 --- a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs @@ -1,4 +1,6 @@ -using System; +using AppData; +using SteamWare; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -10,11 +12,57 @@ namespace NKC_WF.WebUserControls { public partial class cmp_svgViewer : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + public void doUpdate() + { + // recupero ID del foglio corrente + int sheetId = 0; + string answ = ""; + string filename = ""; + try + { + var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); + if (sheetList.Count > 0) + { + sheetId = sheetList[0].SheetID; + // lo leggo da file + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); + filename = sheetList[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); + // NON DOVREBEB SERVIRE MAP se è già share di rete... anche se è su MEDESIMA macchina + //filename = Server.MapPath(filename); + answ = File.ReadAllText(filename); + } + } + catch + { } + if (answ == "") + { + // leggo SVG DI DEFAULT che indica NON PRESENTE... + filename = Server.MapPath("~/Images/NoData.svg"); + answ = File.ReadAllText(filename); + } + // update componente svg! + svgTable.InnerHtml = answ; + } protected void Page_Load(object sender, EventArgs e) { - string filename = Server.MapPath("~/Images/test.svg"); - string answ = File.ReadAllText(filename); - svgTable.InnerHtml = answ; } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs index fa20881..24e6393 100644 --- a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs @@ -22,5 +22,14 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl svgTable; + + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; } } diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index 1a3a4a4..b9f9c12 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -4,6 +4,7 @@ +
diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index aacc82a..f0b0701 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -7,7 +7,36 @@ namespace NKC_WF { protected void Page_Load(object sender, EventArgs e) { + if (!Page.IsPostBack) + { + doUpdate(); + } + } + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + /// + /// Aggiorna componente principale e child components + /// + private void doUpdate() + { + //!!!FIXME!!! fare calcolo del VERO batch corrente... + BatchId = 242; // fixed x test! + // aggiorno child + cmp_svgViewer.BatchId = BatchId; } - } } \ No newline at end of file diff --git a/NKC_WF/site/MachineUnload.aspx.designer.cs b/NKC_WF/site/MachineUnload.aspx.designer.cs index 7058661..139ec91 100644 --- a/NKC_WF/site/MachineUnload.aspx.designer.cs +++ b/NKC_WF/site/MachineUnload.aspx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF public partial class MachineUnload { + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; + /// /// Controllo upnlDrawings. /// From a4403b49384cbd09e53bcc97dab0decc72cb155d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 18 Jan 2020 17:57:07 +0100 Subject: [PATCH 15/37] Abbozzata suddivisione in componenti x MachineUnload --- Jenkinsfile | 2 +- NKC_WF/NKC_WF.csproj | 42 +- NKC_WF/WebUserControls/cmp_MU_bins.ascx | 92 ++++ NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs | 17 + .../cmp_MU_bins.ascx.designer.cs | 17 + NKC_WF/WebUserControls/cmp_MU_carts.ascx | 92 ++++ NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs | 17 + .../cmp_MU_carts.ascx.designer.cs | 17 + NKC_WF/WebUserControls/cmp_MU_stats.ascx | 124 +++++ NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 17 + .../cmp_MU_stats.ascx.designer.cs | 17 + .../WebUserControls/cmp_MU_suggestions.ascx | 64 +++ .../cmp_MU_suggestions.ascx.cs | 17 + .../cmp_MU_suggestions.ascx.designer.cs | 17 + ...p_svgViewer.ascx => cmp_MU_svgViewer.ascx} | 2 +- ...iewer.ascx.cs => cmp_MU_svgViewer.ascx.cs} | 3 +- ...r.cs => cmp_MU_svgViewer.ascx.designer.cs} | 2 +- NKC_WF/site/MachineUnload.aspx | 443 +----------------- NKC_WF/site/MachineUnload.aspx.cs | 2 +- NKC_WF/site/MachineUnload.aspx.designer.cs | 40 +- 20 files changed, 604 insertions(+), 440 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_MU_bins.ascx create mode 100644 NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_carts.ascx create mode 100644 NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_stats.ascx create mode 100644 NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_suggestions.ascx create mode 100644 NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.designer.cs rename NKC_WF/WebUserControls/{cmp_svgViewer.ascx => cmp_MU_svgViewer.ascx} (89%) rename NKC_WF/WebUserControls/{cmp_svgViewer.ascx.cs => cmp_MU_svgViewer.ascx.cs} (94%) rename NKC_WF/WebUserControls/{cmp_svgViewer.ascx.designer.cs => cmp_MU_svgViewer.ascx.designer.cs} (96%) diff --git a/Jenkinsfile b/Jenkinsfile index dbede6a..7233ce2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=195']) { + withEnv(['NEXT_BUILD_NUMBER=197']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 01d06bf..634b45d 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -299,6 +299,10 @@ + + + + @@ -309,7 +313,7 @@ - + @@ -753,6 +757,34 @@ cmp_ML_ShDet.ascx + + cmp_MU_carts.ascx + ASPXCodeBehind + + + cmp_MU_carts.ascx + + + cmp_MU_stats.ascx + ASPXCodeBehind + + + cmp_MU_stats.ascx + + + cmp_MU_bins.ascx + ASPXCodeBehind + + + cmp_MU_bins.ascx + + + cmp_MU_suggestions.ascx + ASPXCodeBehind + + + cmp_MU_suggestions.ascx + cmp_numRow.ascx ASPXCodeBehind @@ -823,12 +855,12 @@ cmp_stackNextloading.ascx - - cmp_svgViewer.ascx + + cmp_MU_svgViewer.ascx ASPXCodeBehind - - cmp_svgViewer.ascx + + cmp_MU_svgViewer.ascx cmp_taktList.ascx diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx b/NKC_WF/WebUserControls/cmp_MU_bins.ascx new file mode 100644 index 0000000..e8553a2 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx @@ -0,0 +1,92 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_bins.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_bins" %> + +
+
BINS
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodD/T%
BIN0000850/50100%
BIN0000950/50100%
BIN0001050/50100%
BIN0001150/50100%
BIN0001212/5024%
BIN0001310/5020%
BIN000141/502%
BIN000150/500%
BIN000160/500%
BIN000170/500%
BIN000180/500%
BIN000190/500%
BIN000200/500%
BIN000210/500%
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs new file mode 100644 index 0000000..c1caa0c --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs @@ -0,0 +1,17 @@ +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_MU_bins : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs new file mode 100644 index 0000000..0c0dfba --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// 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_MU_bins + { + } +} diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx b/NKC_WF/WebUserControls/cmp_MU_carts.ascx new file mode 100644 index 0000000..c5a955d --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx @@ -0,0 +1,92 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_carts.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_carts" %> + +
+
CARTS
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodD/T%
CR0000750/50100%
CR0000850/50100%
CR0000950/50100%
CR0001050/50100%
CR0001150/50100%
CR0001212/5024%
CR0001310/5020%
CR000140/500%
CR000150/500%
CR000160/500%
CR000170/500%
CR000180/500%
CR000190/500%
CR000200/500%
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs new file mode 100644 index 0000000..99da0a5 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs @@ -0,0 +1,17 @@ +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_MU_carts : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs new file mode 100644 index 0000000..904580f --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// 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_MU_carts + { + } +} diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx new file mode 100644 index 0000000..4ece5a3 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -0,0 +1,124 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_stats.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_stats" %> + + +
+
+
+
BINS
+
+ + + + + + + + + + + + + + + +
WAITWIPDONE
1235
+
+
+
+
+
+
SHEET SH00000123
+
+ + + + + + + + + + + + + + + +
DONETOTRATIO
52520%
+
+
+
+
+
+
+
+
BUNK ST00000A2
+
+ + + + + + + + + + + + + + + +
DONETOTRATIO
31225%
+
+
+
+
+
+
+
+
SHIFT B20190916.0
+
+ + + + + + + + + + + + + + + +
DONETOTRATIO
2540%
+
+
+
+
+
+
CARTS
+
+ + + + + + + + + + + + + + + +
WAITWIPDONE
2426
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs new file mode 100644 index 0000000..c6cf7bf --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -0,0 +1,17 @@ +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_MU_stats : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs new file mode 100644 index 0000000..93aede4 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// 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_MU_stats + { + } +} diff --git a/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx new file mode 100644 index 0000000..d250e45 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx @@ -0,0 +1,64 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_suggestions.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_suggestions" %> + +
+
+
+
TO BIN
+
+
+
+ BIN00010 +
+
+ +
+
+ IT000002 +
+
+
+
+
+
+
+
+
+
+
+
+
+
TO CART
+
+
+
+ IT000001 +
+
+ +
+
+ CR00007 +
+
+
+
+
+
+
+
TO CART
+
+
+
+ IT000003 +
+
+ +
+
+ CR00012 +
+
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.cs new file mode 100644 index 0000000..cc34ba7 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.cs @@ -0,0 +1,17 @@ +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_MU_suggestions : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.designer.cs new file mode 100644 index 0000000..827bf22 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// 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_MU_suggestions + { + } +} diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx similarity index 89% rename from NKC_WF/WebUserControls/cmp_svgViewer.ascx rename to NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index dce4502..6696e5c 100644 --- a/NKC_WF/WebUserControls/cmp_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_svgViewer.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_svgViewer" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_svgViewer.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_svgViewer" %>
diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs similarity index 94% rename from NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs rename to NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index 8d0234c..b0b2b7b 100644 --- a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -10,7 +10,7 @@ using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { - public partial class cmp_svgViewer : System.Web.UI.UserControl + public partial class cmp_MU_svgViewer : System.Web.UI.UserControl { /// /// Batch corrente... @@ -37,6 +37,7 @@ namespace NKC_WF.WebUserControls string filename = ""; try { + // FORSE 5/5?!? var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); if (sheetList.Count > 0) { diff --git a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs similarity index 96% rename from NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs rename to NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs index 24e6393..131f885 100644 --- a/NKC_WF/WebUserControls/cmp_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs @@ -11,7 +11,7 @@ namespace NKC_WF.WebUserControls { - public partial class cmp_svgViewer + public partial class cmp_MU_svgViewer { /// diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index b9f9c12..e6f488f 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -1,450 +1,37 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MachineUnload.aspx.cs" Inherits="NKC_WF.MachineUnload" %> -<%@ Register Src="~/WebUserControls/cmp_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_svgViewer" %> +<%@ Register Src="~/WebUserControls/cmp_MU_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_MU_svgViewer" %> +<%@ Register Src="~/WebUserControls/cmp_MU_stats.ascx" TagPrefix="uc1" TagName="cmp_MU_stats" %> +<%@ Register Src="~/WebUserControls/cmp_MU_suggestions.ascx" TagPrefix="uc1" TagName="cmp_MU_suggestions" %> +<%@ Register Src="~/WebUserControls/cmp_MU_bins.ascx" TagPrefix="uc1" TagName="cmp_MU_bins" %> +<%@ Register Src="~/WebUserControls/cmp_MU_carts.ascx" TagPrefix="uc1" TagName="cmp_MU_carts" %> + + + + - +

<%: traduci("MachineUnload") %>

-
-
-
-
BINS
-
- - - - - - - - - - - - - - - -
WAITWIPDONE
1235
-
-
-
-
-
-
SHEET SH00000123
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
52520%
-
-
-
-
-
-
-
-
BUNK ST00000A2
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
31225%
-
-
-
-
-
-
-
-
SHIFT B20190916.0
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
2540%
-
-
-
-
-
-
CARTS
-
- - - - - - - - - - - - - - - -
WAITWIPDONE
2426
-
-
-
-
+
-
-
BINS
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodD/T%
BIN0000750/50100%
BIN0000850/50100%
BIN0000950/50100%
BIN0001050/50100%
BIN0001150/50100%
BIN0001212/5024%
BIN0001310/5020%
BIN000141/502%
BIN000150/500%
BIN000160/500%
BIN000170/500%
BIN000180/500%
BIN000190/500%
BIN000200/500%
BIN000210/500%
BIN000220/500%
BIN000230/500%
BIN000240/500%
BIN000250/500%
BIN000260/500%
-
-
-
-
+
- - <%-- - --%> +
-
-
CARTS
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodD/T%
CR0000650/50100%
CR0000750/50100%
CR0000850/50100%
CR0000950/50100%
CR0001050/50100%
CR0001150/50100%
CR0001212/5024%
CR0001310/5020%
CR000140/500%
CR000150/500%
CR000160/500%
CR000170/500%
CR000180/500%
CR000190/500%
CR000200/500%
CR000210/500%
CR000220/500%
CR000230/500%
CR000240/500%
CR000250/500%
-
-
-
-
-
-
-
-
-
-
TO BIN
-
-
-
- BIN00010 -
-
- -
-
- IT000002 -
-
-
-
-
-
-
-
-
-
-
-
-
-
TO CART
-
-
-
- IT000001 -
-
- -
-
- CR00007 -
-
-
-
-
-
-
-
TO CART
-
-
-
- IT000003 -
-
- -
-
- CR00012 -
-
-
-
+
+
diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index f0b0701..a097a87 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -36,7 +36,7 @@ namespace NKC_WF //!!!FIXME!!! fare calcolo del VERO batch corrente... BatchId = 242; // fixed x test! // aggiorno child - cmp_svgViewer.BatchId = BatchId; + cmp_MU_svgViewer.BatchId = BatchId; } } } \ No newline at end of file diff --git a/NKC_WF/site/MachineUnload.aspx.designer.cs b/NKC_WF/site/MachineUnload.aspx.designer.cs index 139ec91..14b0e32 100644 --- a/NKC_WF/site/MachineUnload.aspx.designer.cs +++ b/NKC_WF/site/MachineUnload.aspx.designer.cs @@ -33,12 +33,48 @@ namespace NKC_WF protected global::System.Web.UI.UpdatePanel upnlDrawings; /// - /// Controllo cmp_svgViewer. + /// Controllo cmp_MU_stats. /// /// /// 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_svgViewer cmp_svgViewer; + protected global::NKC_WF.WebUserControls.cmp_MU_stats cmp_MU_stats; + + /// + /// Controllo cmp_MU_bins. + /// + /// + /// 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_MU_bins cmp_MU_bins; + + /// + /// Controllo cmp_MU_svgViewer. + /// + /// + /// 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_MU_svgViewer cmp_MU_svgViewer; + + /// + /// Controllo cmp_MU_carts. + /// + /// + /// 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_MU_carts cmp_MU_carts; + + /// + /// Controllo cmp_MU_suggestions. + /// + /// + /// 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_MU_suggestions cmp_MU_suggestions; } } From 798f98c71467d3cd5ff39ac792636ce08ecb4b40 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 10:38:23 +0100 Subject: [PATCH 16/37] Inizio gestione selezione cart da Batch --- AppData/DS_App.Designer.cs | 403 +++++++----------- AppData/DS_App.xsd | 133 +++--- AppData/DS_App.xss | 38 +- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_MU_carts.ascx | 3 + .../cmp_MU_carts.ascx.designer.cs | 18 + 6 files changed, 262 insertions(+), 335 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index c6239cf..3ad13a0 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -4546,12 +4546,18 @@ namespace AppData { private global::System.Data.DataColumn columnCartID; + private global::System.Data.DataColumn columnBatchID; + private global::System.Data.DataColumn columnCartIndex; private global::System.Data.DataColumn columnCartDtmx; private global::System.Data.DataColumn columnCreationDate; + private global::System.Data.DataColumn columnTotItem; + + private global::System.Data.DataColumn columnTotItemLoad; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public CartsDataTable() { @@ -4593,6 +4599,14 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn BatchIDColumn { + get { + return this.columnBatchID; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public global::System.Data.DataColumn CartIndexColumn { @@ -4617,6 +4631,22 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TotItemColumn { + get { + return this.columnTotItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TotItemLoadColumn { + get { + return this.columnTotItemLoad; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -4654,13 +4684,16 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public CartsRow AddCartsRow(int CartIndex, string CartDtmx, System.DateTime CreationDate) { + public CartsRow AddCartsRow(int BatchID, int CartIndex, string CartDtmx, System.DateTime CreationDate, int TotItem, int TotItemLoad) { CartsRow rowCartsRow = ((CartsRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, + BatchID, CartIndex, CartDtmx, - CreationDate}; + CreationDate, + TotItem, + TotItemLoad}; rowCartsRow.ItemArray = columnValuesArray; this.Rows.Add(rowCartsRow); return rowCartsRow; @@ -4691,9 +4724,12 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] internal void InitVars() { this.columnCartID = base.Columns["CartID"]; + this.columnBatchID = base.Columns["BatchID"]; this.columnCartIndex = base.Columns["CartIndex"]; this.columnCartDtmx = base.Columns["CartDtmx"]; this.columnCreationDate = base.Columns["CreationDate"]; + this.columnTotItem = base.Columns["TotItem"]; + this.columnTotItemLoad = base.Columns["TotItemLoad"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4701,12 +4737,18 @@ namespace AppData { private void InitClass() { this.columnCartID = new global::System.Data.DataColumn("CartID", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCartID); + this.columnBatchID = new global::System.Data.DataColumn("BatchID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBatchID); this.columnCartIndex = new global::System.Data.DataColumn("CartIndex", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCartIndex); this.columnCartDtmx = new global::System.Data.DataColumn("CartDtmx", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCartDtmx); this.columnCreationDate = new global::System.Data.DataColumn("CreationDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCreationDate); + this.columnTotItem = new global::System.Data.DataColumn("TotItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTotItem); + this.columnTotItemLoad = new global::System.Data.DataColumn("TotItemLoad", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTotItemLoad); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCartID}, true)); this.columnCartID.AutoIncrement = true; @@ -10494,6 +10536,22 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int BatchID { + get { + try { + return ((int)(this[this.tableCarts.BatchIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'BatchID\' nella tabella \'Carts\' è DBNull.", e); + } + } + set { + this[this.tableCarts.BatchIDColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public int CartIndex { @@ -10532,6 +10590,50 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int TotItem { + get { + try { + return ((int)(this[this.tableCarts.TotItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'TotItem\' nella tabella \'Carts\' è DBNull.", e); + } + } + set { + this[this.tableCarts.TotItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int TotItemLoad { + get { + try { + return ((int)(this[this.tableCarts.TotItemLoadColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'TotItemLoad\' nella tabella \'Carts\' è DBNull.", e); + } + } + set { + this[this.tableCarts.TotItemLoadColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsBatchIDNull() { + return this.IsNull(this.tableCarts.BatchIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetBatchIDNull() { + this[this.tableCarts.BatchIDColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsCartDtmxNull() { @@ -10544,6 +10646,30 @@ namespace AppData { this[this.tableCarts.CartDtmxColumn] = global::System.Convert.DBNull; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTotItemNull() { + return this.IsNull(this.tableCarts.TotItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTotItemNull() { + this[this.tableCarts.TotItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTotItemLoadNull() { + return this.IsNull(this.tableCarts.TotItemLoadColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTotItemLoadNull() { + this[this.tableCarts.TotItemLoadColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public KitListRow[] GetKitListRows() { @@ -16898,42 +17024,13 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Carts"; tableMapping.ColumnMappings.Add("CartID", "CartID"); + tableMapping.ColumnMappings.Add("BatchID", "BatchID"); tableMapping.ColumnMappings.Add("CartIndex", "CartIndex"); tableMapping.ColumnMappings.Add("CartDtmx", "CartDtmx"); tableMapping.ColumnMappings.Add("CreationDate", "CreationDate"); + tableMapping.ColumnMappings.Add("TotItem", "TotItem"); + tableMapping.ColumnMappings.Add("TotItemLoad", "TotItemLoad"); this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [Carts] WHERE (([CartID] = @Original_CartID) AND ([CartIndex] = @Orig" + - "inal_CartIndex) AND ((@IsNull_CartDtmx = 1 AND [CartDtmx] IS NULL) OR ([CartDtmx" + - "] = @Original_CartDtmx)) AND ([CreationDate] = @Original_CreationDate))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CartID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CartIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartIndex", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CartDtmx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartDtmx", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CartDtmx", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartDtmx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [Carts] ([CartIndex], [CreationDate]) VALUES (@CartIndex, @CreationDa" + - "te);\r\nSELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID " + - "= SCOPE_IDENTITY())"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartIndex", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [Carts] SET [CartIndex] = @CartIndex, [CreationDate] = @CreationDate WHERE (([CartID] = @Original_CartID) AND ([CartIndex] = @Original_CartIndex) AND ((@IsNull_CartDtmx = 1 AND [CartDtmx] IS NULL) OR ([CartDtmx] = @Original_CartDtmx)) AND ([CreationDate] = @Original_CreationDate)); -SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @CartID)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartIndex", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CartID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CartIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartIndex", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CartDtmx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartDtmx", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CartDtmx", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CartDtmx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "CartID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16946,29 +17043,35 @@ SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @Car [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[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT *\r\nFROM Carts"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_CartDetail"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_CART_getByItemID"; + this._commandCollection[1].CommandText = "dbo.stp_CART_getByBatch"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].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[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_CART_getByKey"; + this._commandCollection[2].CommandText = "dbo.stp_CART_getByItemID"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_CART_insert"; + this._commandCollection[3].CommandText = "dbo.stp_CART_getByKey"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_CART_insert"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CartIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16999,8 +17102,25 @@ SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @Car [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.CartsDataTable getByItemID(global::System.Nullable ItemID) { + public virtual DS_App.CartsDataTable getByBatch(global::System.Nullable BatchID) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.CartsDataTable dataTable = new DS_App.CartsDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.CartsDataTable getByItemID(global::System.Nullable ItemID) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((ItemID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); } @@ -17017,7 +17137,7 @@ SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @Car [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.CartsDataTable getByKey(global::System.Nullable CartID) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((CartID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CartID.Value)); } @@ -17034,7 +17154,7 @@ SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @Car [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.CartsDataTable insertAndReturn(global::System.Nullable CartIndex) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((CartIndex.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CartIndex.Value)); } @@ -17045,133 +17165,6 @@ SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @Car this.Adapter.Fill(dataTable); return dataTable; } - - [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 Update(DS_App.CartsDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [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 Update(DS_App dataSet) { - return this.Adapter.Update(dataSet, "Carts"); - } - - [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 Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [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 Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_CartID, int Original_CartIndex, string Original_CartDtmx, System.DateTime Original_CreationDate) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CartID)); - this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_CartIndex)); - if ((Original_CartDtmx == null)) { - this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_CartDtmx)); - } - this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_CreationDate)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int CartIndex, System.DateTime CreationDate) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CartIndex)); - this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(CreationDate)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } - } - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int CartIndex, System.DateTime CreationDate, int Original_CartID, int Original_CartIndex, string Original_CartDtmx, System.DateTime Original_CreationDate, int CartID) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CartIndex)); - this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(CreationDate)); - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_CartID)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_CartIndex)); - if ((Original_CartDtmx == null)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_CartDtmx)); - } - this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_CreationDate)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(CartID)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } - } - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int CartIndex, System.DateTime CreationDate, int Original_CartID, int Original_CartIndex, string Original_CartDtmx, System.DateTime Original_CreationDate) { - return this.Update(CartIndex, CreationDate, Original_CartID, Original_CartIndex, Original_CartDtmx, Original_CreationDate, Original_CartID); - } } /// @@ -20872,8 +20865,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt private BinsTableAdapter _binsTableAdapter; - private CartsTableAdapter _cartsTableAdapter; - private OffOrd2ItemTableAdapter _offOrd2ItemTableAdapter; private KitListTableAdapter _kitListTableAdapter; @@ -20977,20 +20968,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public CartsTableAdapter CartsTableAdapter { - get { - return this._cartsTableAdapter; - } - set { - this._cartsTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + @@ -21156,10 +21133,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt && (this._binsTableAdapter.Connection != null))) { return this._binsTableAdapter.Connection; } - if (((this._cartsTableAdapter != null) - && (this._cartsTableAdapter.Connection != null))) { - return this._cartsTableAdapter.Connection; - } if (((this._offOrd2ItemTableAdapter != null) && (this._offOrd2ItemTableAdapter.Connection != null))) { return this._offOrd2ItemTableAdapter.Connection; @@ -21224,9 +21197,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt if ((this._binsTableAdapter != null)) { count = (count + 1); } - if ((this._cartsTableAdapter != null)) { - count = (count + 1); - } if ((this._offOrd2ItemTableAdapter != null)) { count = (count + 1); } @@ -21274,15 +21244,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(updatedRows); } } - if ((this._cartsTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Carts.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._cartsTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._materialsTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -21418,14 +21379,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allAddedRows.AddRange(addedRows); } } - if ((this._cartsTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Carts.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._cartsTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._materialsTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -21644,14 +21597,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(deletedRows); } } - if ((this._cartsTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Carts.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._cartsTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._orderListTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.OrderList.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -21724,11 +21669,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } - if (((this._cartsTableAdapter != null) - && (this.MatchTableAdapterConnection(this._cartsTableAdapter.Connection) == false))) { - throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + - "a stessa stringa di connessione."); - } if (((this._offOrd2ItemTableAdapter != null) && (this.MatchTableAdapterConnection(this._offOrd2ItemTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + @@ -21852,15 +21792,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt adaptersWithAcceptChangesDuringUpdate.Add(this._binsTableAdapter.Adapter); } } - if ((this._cartsTableAdapter != null)) { - revertConnections.Add(this._cartsTableAdapter, this._cartsTableAdapter.Connection); - this._cartsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._cartsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._cartsTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._cartsTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._cartsTableAdapter.Adapter); - } - } if ((this._offOrd2ItemTableAdapter != null)) { revertConnections.Add(this._offOrd2ItemTableAdapter, this._offOrd2ItemTableAdapter.Connection); this._offOrd2ItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); @@ -22020,10 +21951,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt this._binsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._binsTableAdapter])); this._binsTableAdapter.Transaction = null; } - if ((this._cartsTableAdapter != null)) { - this._cartsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._cartsTableAdapter])); - this._cartsTableAdapter.Transaction = null; - } if ((this._offOrd2ItemTableAdapter != null)) { this._offOrd2ItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._offOrd2ItemTableAdapter])); this._offOrd2ItemTableAdapter.Transaction = null; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 86dae85..084da89 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -336,7 +336,7 @@ FROM v_SheetList - + dbo.stp_Sheets_AdvanceInStack @@ -410,7 +410,7 @@ FROM v_SheetList - + dbo.stp_Sheets_resetPrepared @@ -421,7 +421,7 @@ FROM v_SheetList - + dbo.stp_Sheets_setPrepared @@ -432,7 +432,7 @@ FROM v_SheetList - + dbo.stp_Sheets_updDate @@ -1086,61 +1086,37 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI - - - - DELETE FROM [Carts] WHERE (([CartID] = @Original_CartID) AND ([CartIndex] = @Original_CartIndex) AND ((@IsNull_CartDtmx = 1 AND [CartDtmx] IS NULL) OR ([CartDtmx] = @Original_CartDtmx)) AND ([CreationDate] = @Original_CreationDate)) - - - - - - - - - - - - INSERT INTO [Carts] ([CartIndex], [CreationDate]) VALUES (@CartIndex, @CreationDate); -SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = SCOPE_IDENTITY()) - - - - - - + SELECT * -FROM Carts +FROM v_CartDetail - - - UPDATE [Carts] SET [CartIndex] = @CartIndex, [CreationDate] = @CreationDate WHERE (([CartID] = @Original_CartID) AND ([CartIndex] = @Original_CartIndex) AND ((@IsNull_CartDtmx = 1 AND [CartDtmx] IS NULL) OR ([CartDtmx] = @Original_CartDtmx)) AND ([CreationDate] = @Original_CreationDate)); -SELECT CartID, CartIndex, CartDtmx, CreationDate FROM Carts WHERE (CartID = @CartID) - - - - - - - - - - - - + + + + + + + dbo.stp_CART_getByBatch + + + + + + + @@ -2020,7 +1996,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2068,7 +2044,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2090,7 +2066,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2145,7 +2121,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2218,7 +2194,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2226,7 +2202,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2295,7 +2271,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2328,7 +2304,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2351,10 +2327,11 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + + @@ -2364,10 +2341,12 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt + + - + @@ -2391,7 +2370,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2399,7 +2378,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2416,7 +2395,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2425,7 +2404,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2456,7 +2435,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2464,7 +2443,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2480,7 +2459,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2488,7 +2467,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2516,7 +2495,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2552,7 +2531,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2568,7 +2547,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2666,18 +2645,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 70e51e0..ebf93c0 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -6,27 +6,27 @@ --> - - - + + + - + - + - - + + - - - - - - + + + + + + @@ -92,11 +92,11 @@ - 694 - 369 + 699 + 340 - 694 + 699 313 @@ -113,7 +113,7 @@ - + 1129 @@ -149,7 +149,7 @@ - + 131 @@ -161,7 +161,7 @@ - + 352 diff --git a/Jenkinsfile b/Jenkinsfile index 7233ce2..3cc3eff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=197']) { + withEnv(['NEXT_BUILD_NUMBER=198']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${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_MU_carts.ascx b/NKC_WF/WebUserControls/cmp_MU_carts.ascx index c5a955d..664866b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx @@ -5,6 +5,9 @@
+ + + diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs index 904580f..b5795db 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs @@ -13,5 +13,23 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_carts { + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; } } From 04fc45e69e4c645cf72b90837b58c7d4ba20042a Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 12:21:03 +0100 Subject: [PATCH 17/37] OK tab CARTS --- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_MU_carts.ascx | 116 +++++------------- NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs | 61 +++++++++ .../cmp_MU_carts.ascx.designer.cs | 9 ++ .../WebUserControls/cmp_batchDetail.ascx.cs | 2 +- NKC_WF/site/MachineUnload.aspx.cs | 1 + 6 files changed, 105 insertions(+), 86 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3cc3eff..9e96255 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=198']) { + withEnv(['NEXT_BUILD_NUMBER=199']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${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_MU_carts.ascx b/NKC_WF/WebUserControls/cmp_MU_carts.ascx index 664866b..b43a043 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx @@ -5,90 +5,38 @@
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodD/T%
CR0000750/50100%
CR0000850/50100%
CR0000950/50100%
CR0001050/50100%
CR0001150/50100%
CR0001212/5024%
CR0001310/5020%
CR000140/500%
CR000150/500%
CR000160/500%
CR000170/500%
CR000180/500%
CR000190/500%
CR000200/500%
+ + + + + + + No Record + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs index 99da0a5..3ae371e 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs @@ -9,9 +9,70 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_carts : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } protected void Page_Load(object sender, EventArgs e) { } + public void doUpdate() + { + grView.DataBind(); + } + /// + /// Calcola il rapporto tra 2 valori + /// + /// + /// + /// + public double getRatio(object _dividendo, object _divisore) + { + double ratio = 0; + double dividendo = 0; + double divisore = 1; + double.TryParse(_dividendo.ToString(), out dividendo); + double.TryParse(_divisore.ToString(), out divisore); + ratio = dividendo / divisore; + return ratio; + } + /// + /// determina CSS x colore testo da perc svuotamento... + /// + /// + /// + /// + public string getCssCart(object _dividendo, object _divisore) + { + double ratio = getRatio(_dividendo, _divisore); + string answ = "text-dark"; + if (ratio == 0) + { + answ = "text-danger"; + } + else if (ratio == 1) + { + answ = "text-success"; + } + else + { + answ = "text-warning"; + } + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs index b5795db..d70d0cd 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.designer.cs @@ -31,5 +31,14 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; } } diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index b5e9dc6..be55c32 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -110,7 +110,7 @@ namespace NKC_WF.WebUserControls if (partListNestDupl.Count > 0) { sb.AppendLine("---------------------"); - sb.AppendLine($"ESTIM: FOUND {partListNestDupl.Count} duplicate:"); + sb.AppendLine($"NEST: FOUND {partListNestDupl.Count} duplicate:"); foreach (var partId in partListNestDupl) { sb.AppendLine($"{partId}"); diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index a097a87..4a6897e 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -37,6 +37,7 @@ namespace NKC_WF BatchId = 242; // fixed x test! // aggiorno child cmp_MU_svgViewer.BatchId = BatchId; + cmp_MU_carts.BatchId = BatchId; } } } \ No newline at end of file From 0fcda26e925312b217d77a0d050046a48c1a8d2b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 12:22:32 +0100 Subject: [PATCH 18/37] Inizio sistemazione BIN --- NKC_WF/WebUserControls/cmp_MU_bins.ascx | 34 +++++++++++ NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs | 61 +++++++++++++++++++ .../cmp_MU_bins.ascx.designer.cs | 27 ++++++++ 3 files changed, 122 insertions(+) diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx b/NKC_WF/WebUserControls/cmp_MU_bins.ascx index e8553a2..4c5c821 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx @@ -5,6 +5,40 @@
+ + + + + + + No Record + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs index c1caa0c..347ca0c 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs @@ -9,9 +9,70 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_bins : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } protected void Page_Load(object sender, EventArgs e) { } + public void doUpdate() + { + grView.DataBind(); + } + /// + /// Calcola il rapporto tra 2 valori + /// + /// + /// + /// + public double getRatio(object _dividendo, object _divisore) + { + double ratio = 0; + double dividendo = 0; + double divisore = 1; + double.TryParse(_dividendo.ToString(), out dividendo); + double.TryParse(_divisore.ToString(), out divisore); + ratio = dividendo / divisore; + return ratio; + } + /// + /// determina CSS x colore testo da perc svuotamento... + /// + /// + /// + /// + public string getCssCart(object _dividendo, object _divisore) + { + double ratio = getRatio(_dividendo, _divisore); + string answ = "text-dark"; + if (ratio == 0) + { + answ = "text-danger"; + } + else if (ratio == 1) + { + answ = "text-success"; + } + else + { + answ = "text-warning"; + } + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs index 0c0dfba..f4fc38b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs @@ -13,5 +13,32 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_bins { + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; + + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; } } From 295172b3b227bd2fc0050e1b0380d4b345bcf571 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 12:35:06 +0100 Subject: [PATCH 19/37] Fix visualizzazione errore stima/nest --- Jenkinsfile | 2 +- NKC_WF/site/MachineUnload.aspx.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9e96255..eafc8a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=199']) { + withEnv(['NEXT_BUILD_NUMBER=200']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 4a6897e..786cdfc 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -37,6 +37,7 @@ namespace NKC_WF BatchId = 242; // fixed x test! // aggiorno child cmp_MU_svgViewer.BatchId = BatchId; + cmp_MU_bins.BatchId = BatchId; cmp_MU_carts.BatchId = BatchId; } } From 82a87a81520f5cf092ea32d272499c8e9e1837b5 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 12:35:49 +0100 Subject: [PATCH 20/37] Inizio fix BIN --- Jenkinsfile | 2 +- .../WebUserControls/cmp_batchDetail.ascx.cs | 39 ++++++++++++++++--- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index eafc8a2..f1651ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=200']) { + withEnv(['NEXT_BUILD_NUMBER=201']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${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_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index be55c32..29e1013 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -28,11 +28,13 @@ namespace NKC_WF.WebUserControls var nestAnsw = ComLib.man.getNestAnsw(value); StringBuilder sb = new StringBuilder(); sb.AppendLine("DEBUG INFO:"); + // elenchi x ricerca duplicati + List partListEstim = new List(); + List partListEstimDupl = new List(); + List partListNest = new List(); + List partListNestDupl = new List(); if (estimAnsw != null) { - // elenchi x ricerca duplicati - List partListEstim = new List(); - List partListEstimDupl = new List(); try { foreach (var part in estimAnsw.PartList) @@ -69,9 +71,6 @@ namespace NKC_WF.WebUserControls } if (nestAnsw != null) { - // elenchi x ricerca duplicati - List partListNest = new List(); - List partListNestDupl = new List(); try { foreach (var bunk in nestAnsw.BunkList) @@ -117,6 +116,34 @@ namespace NKC_WF.WebUserControls } sb.AppendLine("---------------------"); } + // s enon corrispondono + if (partListEstim.Count != partListNest.Count) + { + sb.AppendLine("---------------------"); + if (partListEstim.Count > partListNest.Count) + { + sb.AppendLine($"EST OK | NEST missing:"); + foreach (var partId in partListEstim) + { + if (!partListNest.Contains(partId)) + { + sb.AppendLine($"{partId}"); + } + } + } + else + { + sb.AppendLine($"EST missing | NEST OK:"); + foreach (var partId in partListNest) + { + if (!partListEstim.Contains(partId)) + { + sb.AppendLine($"{partId}"); + } + } + } + sb.AppendLine("---------------------"); + } } catch { } From daf7c6d0b9a4c0533da2088c9e09ce4faa8ed0ae Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 13:41:27 +0100 Subject: [PATCH 21/37] COmpletato gestione BIN e dettagli relativi --- AppData/ComLib.cs | 1 - AppData/DS_App.Designer.cs | 450 ++++++++------------ AppData/DS_App.xsd | 65 +-- AppData/DS_App.xss | 6 +- Jenkinsfile | 2 +- NKC_WF/WebUserControls/cmp_MU_bins.ascx | 95 +---- NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs | 6 +- NKC_WF/WebUserControls/cmp_MU_carts.ascx | 8 +- NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs | 6 +- 9 files changed, 205 insertions(+), 434 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 80ad5b0..35bf8b1 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -918,7 +918,6 @@ namespace AppData { case "AssemblyCell": case "PaintFlag": - case "RoundEdge": // se contiene YES aggiungo... if (currOpt.Value.ToLower() == "yes") { diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 3ad13a0..1f704aa 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -4231,6 +4231,12 @@ namespace AppData { private global::System.Data.DataColumn columnCreationDate; + private global::System.Data.DataColumn columnBatchID; + + private global::System.Data.DataColumn columnTotItem; + + private global::System.Data.DataColumn columnTotItemLoad; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public BinsDataTable() { @@ -4304,6 +4310,30 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn BatchIDColumn { + get { + return this.columnBatchID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TotItemColumn { + get { + return this.columnTotItem; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TotItemLoadColumn { + get { + return this.columnTotItemLoad; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -4341,14 +4371,17 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public BinsRow AddBinsRow(int BinIndex, string BinDtmx, string BinDtmxProc, System.DateTime CreationDate) { + public BinsRow AddBinsRow(int BinIndex, string BinDtmx, string BinDtmxProc, System.DateTime CreationDate, int BatchID, int TotItem, int TotItemLoad) { BinsRow rowBinsRow = ((BinsRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, BinIndex, BinDtmx, BinDtmxProc, - CreationDate}; + CreationDate, + BatchID, + TotItem, + TotItemLoad}; rowBinsRow.ItemArray = columnValuesArray; this.Rows.Add(rowBinsRow); return rowBinsRow; @@ -4383,6 +4416,9 @@ namespace AppData { this.columnBinDtmx = base.Columns["BinDtmx"]; this.columnBinDtmxProc = base.Columns["BinDtmxProc"]; this.columnCreationDate = base.Columns["CreationDate"]; + this.columnBatchID = base.Columns["BatchID"]; + this.columnTotItem = base.Columns["TotItem"]; + this.columnTotItemLoad = base.Columns["TotItemLoad"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4398,6 +4434,12 @@ namespace AppData { base.Columns.Add(this.columnBinDtmxProc); this.columnCreationDate = new global::System.Data.DataColumn("CreationDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCreationDate); + this.columnBatchID = new global::System.Data.DataColumn("BatchID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnBatchID); + this.columnTotItem = new global::System.Data.DataColumn("TotItem", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTotItem); + this.columnTotItemLoad = new global::System.Data.DataColumn("TotItemLoad", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTotItemLoad); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnBinID}, true)); this.columnBinID.AutoIncrement = true; @@ -4411,6 +4453,9 @@ namespace AppData { this.columnBinDtmx.MaxLength = 10; this.columnBinDtmxProc.ReadOnly = true; this.columnBinDtmxProc.MaxLength = 10; + this.columnBatchID.ReadOnly = true; + this.columnTotItem.ReadOnly = true; + this.columnTotItemLoad.ReadOnly = true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10463,6 +10508,54 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int BatchID { + get { + try { + return ((int)(this[this.tableBins.BatchIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'BatchID\' nella tabella \'Bins\' è DBNull.", e); + } + } + set { + this[this.tableBins.BatchIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int TotItem { + get { + try { + return ((int)(this[this.tableBins.TotItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'TotItem\' nella tabella \'Bins\' è DBNull.", e); + } + } + set { + this[this.tableBins.TotItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int TotItemLoad { + get { + try { + return ((int)(this[this.tableBins.TotItemLoadColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'TotItemLoad\' nella tabella \'Bins\' è DBNull.", e); + } + } + set { + this[this.tableBins.TotItemLoadColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsBinDtmxNull() { @@ -10499,6 +10592,42 @@ namespace AppData { this[this.tableBins.CreationDateColumn] = global::System.Convert.DBNull; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsBatchIDNull() { + return this.IsNull(this.tableBins.BatchIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetBatchIDNull() { + this[this.tableBins.BatchIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTotItemNull() { + return this.IsNull(this.tableBins.TotItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTotItemNull() { + this[this.tableBins.TotItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTotItemLoadNull() { + return this.IsNull(this.tableBins.TotItemLoadColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTotItemLoadNull() { + this[this.tableBins.TotItemLoadColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public BinListRow[] GetBinListRows() { @@ -16585,43 +16714,10 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat tableMapping.ColumnMappings.Add("BinDtmx", "BinDtmx"); tableMapping.ColumnMappings.Add("BinDtmxProc", "BinDtmxProc"); tableMapping.ColumnMappings.Add("CreationDate", "CreationDate"); + tableMapping.ColumnMappings.Add("BatchID", "BatchID"); + tableMapping.ColumnMappings.Add("TotItem", "TotItem"); + tableMapping.ColumnMappings.Add("TotItemLoad", "TotItemLoad"); this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [Bins] WHERE (([BinID] = @Original_BinID) AND ([BinIndex] = @Original_BinIndex) AND ((@IsNull_BinDtmx = 1 AND [BinDtmx] IS NULL) OR ([BinDtmx] = @Original_BinDtmx)) AND ((@IsNull_BinDtmxProc = 1 AND [BinDtmxProc] IS NULL) OR ([BinDtmxProc] = @Original_BinDtmxProc)) AND ((@IsNull_CreationDate = 1 AND [CreationDate] IS NULL) OR ([CreationDate] = @Original_CreationDate)))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinIndex", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_BinDtmx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmx", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinDtmx", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_BinDtmxProc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmxProc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinDtmxProc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmxProc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CreationDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [Bins] ([BinIndex], [CreationDate]) VALUES (@BinIndex, @CreationDate)" + - ";\r\nSELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (B" + - "inID = SCOPE_IDENTITY())"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinIndex", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [Bins] SET [BinIndex] = @BinIndex, [CreationDate] = @CreationDate WHERE (([BinID] = @Original_BinID) AND ([BinIndex] = @Original_BinIndex) AND ((@IsNull_BinDtmx = 1 AND [BinDtmx] IS NULL) OR ([BinDtmx] = @Original_BinDtmx)) AND ((@IsNull_BinDtmxProc = 1 AND [BinDtmxProc] IS NULL) OR ([BinDtmxProc] = @Original_BinDtmxProc)) AND ((@IsNull_CreationDate = 1 AND [CreationDate] IS NULL) OR ([CreationDate] = @Original_CreationDate))); -SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinID = @BinID)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinIndex", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinIndex", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinIndex", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_BinDtmx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmx", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinDtmx", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_BinDtmxProc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmxProc", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BinDtmxProc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BinDtmxProc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CreationDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "BinID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16634,29 +16730,35 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI [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[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT *\r\nFROM Bins"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_binDetail"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_BIN_getByItemID"; + this._commandCollection[1].CommandText = "dbo.stp_BIN_getByBatch"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].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[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_BIN_getByKey"; + this._commandCollection[2].CommandText = "dbo.stp_BIN_getByItemID"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ItemID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_BIN_insert"; + this._commandCollection[3].CommandText = "dbo.stp_BIN_getByKey"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_BIN_insert"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BinIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16687,8 +16789,25 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.BinsDataTable getByItemID(global::System.Nullable ItemID) { + public virtual DS_App.BinsDataTable getByBatch(global::System.Nullable BatchID) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.BinsDataTable dataTable = new DS_App.BinsDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.BinsDataTable getByItemID(global::System.Nullable ItemID) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((ItemID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ItemID.Value)); } @@ -16705,7 +16824,7 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.BinsDataTable getByKey(global::System.Nullable BinID) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((BinID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BinID.Value)); } @@ -16722,7 +16841,7 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.BinsDataTable insertAndReturn(global::System.Nullable BinIndex) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((BinIndex.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BinIndex.Value)); } @@ -16733,173 +16852,6 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI this.Adapter.Fill(dataTable); return dataTable; } - - [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 Update(DS_App.BinsDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [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 Update(DS_App dataSet) { - return this.Adapter.Update(dataSet, "Bins"); - } - - [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 Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [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 Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_BinID, int Original_BinIndex, string Original_BinDtmx, string Original_BinDtmxProc, global::System.Nullable Original_CreationDate) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_BinID)); - this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_BinIndex)); - if ((Original_BinDtmx == null)) { - this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_BinDtmx)); - } - if ((Original_BinDtmxProc == null)) { - this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_BinDtmxProc)); - } - if ((Original_CreationDate.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_CreationDate.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int BinIndex, global::System.Nullable CreationDate) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(BinIndex)); - if ((CreationDate.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(CreationDate.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } - } - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int BinIndex, global::System.Nullable CreationDate, int Original_BinID, int Original_BinIndex, string Original_BinDtmx, string Original_BinDtmxProc, global::System.Nullable Original_CreationDate, int BinID) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(BinIndex)); - if ((CreationDate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(CreationDate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_BinID)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_BinIndex)); - if ((Original_BinDtmx == null)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_BinDtmx)); - } - if ((Original_BinDtmxProc == null)) { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_BinDtmxProc)); - } - if ((Original_CreationDate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_CreationDate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(BinID)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } - } - } - - [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")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int BinIndex, global::System.Nullable CreationDate, int Original_BinID, int Original_BinIndex, string Original_BinDtmx, string Original_BinDtmxProc, global::System.Nullable Original_CreationDate) { - return this.Update(BinIndex, CreationDate, Original_BinID, Original_BinIndex, Original_BinDtmx, Original_BinDtmxProc, Original_CreationDate, Original_BinID); - } } /// @@ -20863,8 +20815,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt private MaterialsTableAdapter _materialsTableAdapter; - private BinsTableAdapter _binsTableAdapter; - private OffOrd2ItemTableAdapter _offOrd2ItemTableAdapter; private KitListTableAdapter _kitListTableAdapter; @@ -20954,20 +20904,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public BinsTableAdapter BinsTableAdapter { - get { - return this._binsTableAdapter; - } - set { - this._binsTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + @@ -21129,10 +21065,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt && (this._materialsTableAdapter.Connection != null))) { return this._materialsTableAdapter.Connection; } - if (((this._binsTableAdapter != null) - && (this._binsTableAdapter.Connection != null))) { - return this._binsTableAdapter.Connection; - } if (((this._offOrd2ItemTableAdapter != null) && (this._offOrd2ItemTableAdapter.Connection != null))) { return this._offOrd2ItemTableAdapter.Connection; @@ -21194,9 +21126,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt if ((this._materialsTableAdapter != null)) { count = (count + 1); } - if ((this._binsTableAdapter != null)) { - count = (count + 1); - } if ((this._offOrd2ItemTableAdapter != null)) { count = (count + 1); } @@ -21271,15 +21200,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(updatedRows); } } - if ((this._binsTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Bins.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._binsTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -21403,14 +21323,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allAddedRows.AddRange(addedRows); } } - if ((this._binsTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Bins.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._binsTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -21565,14 +21477,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(deletedRows); } } - if ((this._binsTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Bins.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._binsTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._itemListTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ItemList.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -21664,11 +21568,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } - if (((this._binsTableAdapter != null) - && (this.MatchTableAdapterConnection(this._binsTableAdapter.Connection) == false))) { - throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + - "a stessa stringa di connessione."); - } if (((this._offOrd2ItemTableAdapter != null) && (this.MatchTableAdapterConnection(this._offOrd2ItemTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + @@ -21783,15 +21682,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt adaptersWithAcceptChangesDuringUpdate.Add(this._materialsTableAdapter.Adapter); } } - if ((this._binsTableAdapter != null)) { - revertConnections.Add(this._binsTableAdapter, this._binsTableAdapter.Connection); - this._binsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._binsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._binsTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._binsTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._binsTableAdapter.Adapter); - } - } if ((this._offOrd2ItemTableAdapter != null)) { revertConnections.Add(this._offOrd2ItemTableAdapter, this._offOrd2ItemTableAdapter.Connection); this._offOrd2ItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); @@ -21947,10 +21837,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt this._materialsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._materialsTableAdapter])); this._materialsTableAdapter.Transaction = null; } - if ((this._binsTableAdapter != null)) { - this._binsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._binsTableAdapter])); - this._binsTableAdapter.Transaction = null; - } if ((this._offOrd2ItemTableAdapter != null)) { this._offOrd2ItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._offOrd2ItemTableAdapter])); this._offOrd2ItemTableAdapter.Transaction = null; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 084da89..561e1b2 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -987,58 +987,14 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - - - - DELETE FROM [Bins] WHERE (([BinID] = @Original_BinID) AND ([BinIndex] = @Original_BinIndex) AND ((@IsNull_BinDtmx = 1 AND [BinDtmx] IS NULL) OR ([BinDtmx] = @Original_BinDtmx)) AND ((@IsNull_BinDtmxProc = 1 AND [BinDtmxProc] IS NULL) OR ([BinDtmxProc] = @Original_BinDtmxProc)) AND ((@IsNull_CreationDate = 1 AND [CreationDate] IS NULL) OR ([CreationDate] = @Original_CreationDate))) - - - - - - - - - - - - - - - INSERT INTO [Bins] ([BinIndex], [CreationDate]) VALUES (@BinIndex, @CreationDate); -SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinID = SCOPE_IDENTITY()) - - - - - - + SELECT * -FROM Bins +FROM v_binDetail - - - UPDATE [Bins] SET [BinIndex] = @BinIndex, [CreationDate] = @CreationDate WHERE (([BinID] = @Original_BinID) AND ([BinIndex] = @Original_BinIndex) AND ((@IsNull_BinDtmx = 1 AND [BinDtmx] IS NULL) OR ([BinDtmx] = @Original_BinDtmx)) AND ((@IsNull_BinDtmxProc = 1 AND [BinDtmxProc] IS NULL) OR ([BinDtmxProc] = @Original_BinDtmxProc)) AND ((@IsNull_CreationDate = 1 AND [CreationDate] IS NULL) OR ([CreationDate] = @Original_CreationDate))); -SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinID = @BinID) - - - - - - - - - - - - - - - @@ -1047,8 +1003,22 @@ SELECT BinID, BinIndex, BinDtmx, BinDtmxProc, CreationDate FROM Bins WHERE (BinI + + + + + + + dbo.stp_BIN_getByBatch + + + + + + + @@ -2324,6 +2294,9 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index ebf93c0..5d7953c 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. --> - + @@ -13,8 +13,8 @@ - - + + diff --git a/Jenkinsfile b/Jenkinsfile index f1651ce..2eca4fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=201']) { + withEnv(['NEXT_BUILD_NUMBER=203']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${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_MU_bins.ascx b/NKC_WF/WebUserControls/cmp_MU_bins.ascx index 4c5c821..9c83e3b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx @@ -5,7 +5,7 @@
- + @@ -14,112 +14,29 @@ No Record - + - + - + - + - + - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodD/T%
BIN0000850/50100%
BIN0000950/50100%
BIN0001050/50100%
BIN0001150/50100%
BIN0001212/5024%
BIN0001310/5020%
BIN000141/502%
BIN000150/500%
BIN000160/500%
BIN000170/500%
BIN000180/500%
BIN000190/500%
BIN000200/500%
BIN000210/500%
diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs index 347ca0c..3bf967d 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs @@ -53,12 +53,10 @@ namespace NKC_WF.WebUserControls /// /// determina CSS x colore testo da perc svuotamento... /// - /// - /// + /// /// - public string getCssCart(object _dividendo, object _divisore) + public string getCssByRatio(double ratio) { - double ratio = getRatio(_dividendo, _divisore); string answ = "text-dark"; if (ratio == 0) { diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx b/NKC_WF/WebUserControls/cmp_MU_carts.ascx index b43a043..a5f05c2 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx @@ -16,17 +16,17 @@ - + - + - + - + diff --git a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs index 3ae371e..bb1bd87 100644 --- a/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_carts.ascx.cs @@ -53,12 +53,10 @@ namespace NKC_WF.WebUserControls /// /// determina CSS x colore testo da perc svuotamento... /// - /// - /// + /// /// - public string getCssCart(object _dividendo, object _divisore) + public string getCssByRatio(double ratio) { - double ratio = getRatio(_dividendo, _divisore); string answ = "text-dark"; if (ratio == 0) { From da63b299a3d17f964867974205b2519958264229 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 12:54:40 +0100 Subject: [PATCH 22/37] Bozza componente statistiche --- AppData/AppData.csproj | 1 + AppData/DS_App.Designer.cs | 781 +++++++++++++++++- AppData/DS_App.xsd | 41 + AppData/DS_App.xss | 69 +- AppData/Objects.cs | 34 + NKC_SDK/Objects.cs | 2 +- NKC_WF/NKC_WF.csproj | 8 + NKC_WF/WebUserControls/cmp_MU_singleStat.ascx | 25 + .../WebUserControls/cmp_MU_singleStat.ascx.cs | 69 ++ .../cmp_MU_singleStat.ascx.designer.cs | 89 ++ NKC_WF/WebUserControls/cmp_MU_stats.ascx | 20 +- NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 74 +- .../cmp_MU_stats.ascx.designer.cs | 18 + NKC_WF/site/MachineUnload.aspx.cs | 1 + 14 files changed, 1163 insertions(+), 69 deletions(-) create mode 100644 AppData/Objects.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_singleStat.ascx create mode 100644 NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index ebec613..30e2562 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -175,6 +175,7 @@ True DS_Report.xsd + True True diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 1f704aa..99b0f95 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -66,6 +66,8 @@ namespace AppData { private PartValidParetoDataTable tablePartValidPareto; + private UnloadStatsDataTable tableUnloadStats; + private global::System.Data.DataRelation relationFK_BatchReqList_OrderList; private global::System.Data.DataRelation relationFK_ItemList_Materials1; @@ -181,6 +183,9 @@ namespace AppData { if ((ds.Tables["PartValidPareto"] != null)) { base.Tables.Add(new PartValidParetoDataTable(ds.Tables["PartValidPareto"])); } + if ((ds.Tables["UnloadStats"] != null)) { + base.Tables.Add(new UnloadStatsDataTable(ds.Tables["UnloadStats"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -409,6 +414,16 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public UnloadStatsDataTable UnloadStats { + get { + return this.tableUnloadStats; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -539,6 +554,9 @@ namespace AppData { if ((ds.Tables["PartValidPareto"] != null)) { base.Tables.Add(new PartValidParetoDataTable(ds.Tables["PartValidPareto"])); } + if ((ds.Tables["UnloadStats"] != null)) { + base.Tables.Add(new UnloadStatsDataTable(ds.Tables["UnloadStats"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -698,6 +716,12 @@ namespace AppData { this.tablePartValidPareto.InitVars(); } } + this.tableUnloadStats = ((UnloadStatsDataTable)(base.Tables["UnloadStats"])); + if ((initTable == true)) { + if ((this.tableUnloadStats != null)) { + this.tableUnloadStats.InitVars(); + } + } this.relationFK_BatchReqList_OrderList = this.Relations["FK_BatchReqList_OrderList"]; this.relationFK_ItemList_Materials1 = this.Relations["FK_ItemList_Materials1"]; this.relationFK_OffOrd2Item_OfflineOrderList = this.Relations["FK_OffOrd2Item_OfflineOrderList"]; @@ -762,6 +786,8 @@ namespace AppData { base.Tables.Add(this.tableItemValidation); this.tablePartValidPareto = new PartValidParetoDataTable(); base.Tables.Add(this.tablePartValidPareto); + this.tableUnloadStats = new UnloadStatsDataTable(); + base.Tables.Add(this.tableUnloadStats); this.relationFK_BatchReqList_OrderList = new global::System.Data.DataRelation("FK_BatchReqList_OrderList", new global::System.Data.DataColumn[] { this.tableOrderList.OrdIDColumn}, new global::System.Data.DataColumn[] { this.tableBatchReqList.OrdIDColumn}, false); @@ -938,6 +964,12 @@ namespace AppData { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeUnloadStats() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -1056,6 +1088,9 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void PartValidParetoRowChangeEventHandler(object sender, PartValidParetoRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void UnloadStatsRowChangeEventHandler(object sender, UnloadStatsRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -8636,6 +8671,315 @@ namespace AppData { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class UnloadStatsDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnStat; + + private global::System.Data.DataColumn columnTotal; + + private global::System.Data.DataColumn columnWait; + + private global::System.Data.DataColumn columnWip; + + private global::System.Data.DataColumn columnDone; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsDataTable() { + this.TableName = "UnloadStats"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal UnloadStatsDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected UnloadStatsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn StatColumn { + get { + return this.columnStat; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TotalColumn { + get { + return this.columnTotal; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn WaitColumn { + get { + return this.columnWait; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn WipColumn { + get { + return this.columnWip; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DoneColumn { + get { + return this.columnDone; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRow this[int index] { + get { + return ((UnloadStatsRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddUnloadStatsRow(UnloadStatsRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRow AddUnloadStatsRow(string Stat, int Total, int Wait, int Wip, int Done) { + UnloadStatsRow rowUnloadStatsRow = ((UnloadStatsRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Stat, + Total, + Wait, + Wip, + Done}; + rowUnloadStatsRow.ItemArray = columnValuesArray; + this.Rows.Add(rowUnloadStatsRow); + return rowUnloadStatsRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + UnloadStatsDataTable cln = ((UnloadStatsDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new UnloadStatsDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnStat = base.Columns["Stat"]; + this.columnTotal = base.Columns["Total"]; + this.columnWait = base.Columns["Wait"]; + this.columnWip = base.Columns["Wip"]; + this.columnDone = base.Columns["Done"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnStat = new global::System.Data.DataColumn("Stat", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStat); + this.columnTotal = new global::System.Data.DataColumn("Total", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTotal); + this.columnWait = new global::System.Data.DataColumn("Wait", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWait); + this.columnWip = new global::System.Data.DataColumn("Wip", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWip); + this.columnDone = new global::System.Data.DataColumn("Done", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDone); + this.columnStat.ReadOnly = true; + this.columnStat.MaxLength = 50; + this.columnTotal.ReadOnly = true; + this.columnWait.ReadOnly = true; + this.columnWip.ReadOnly = true; + this.columnDone.ReadOnly = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRow NewUnloadStatsRow() { + return ((UnloadStatsRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new UnloadStatsRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(UnloadStatsRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.UnloadStatsRowChanged != null)) { + this.UnloadStatsRowChanged(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.UnloadStatsRowChanging != null)) { + this.UnloadStatsRowChanging(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.UnloadStatsRowDeleted != null)) { + this.UnloadStatsRowDeleted(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.UnloadStatsRowDeleting != null)) { + this.UnloadStatsRowDeleting(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveUnloadStatsRow(UnloadStatsRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_App ds = new DS_App(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "UnloadStatsDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -11798,6 +12142,161 @@ namespace AppData { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class UnloadStatsRow : global::System.Data.DataRow { + + private UnloadStatsDataTable tableUnloadStats; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal UnloadStatsRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableUnloadStats = ((UnloadStatsDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Stat { + get { + try { + return ((string)(this[this.tableUnloadStats.StatColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Stat\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.StatColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Total { + get { + try { + return ((int)(this[this.tableUnloadStats.TotalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Total\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.TotalColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Wait { + get { + try { + return ((int)(this[this.tableUnloadStats.WaitColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Wait\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.WaitColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Wip { + get { + try { + return ((int)(this[this.tableUnloadStats.WipColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Wip\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.WipColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Done { + get { + try { + return ((int)(this[this.tableUnloadStats.DoneColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Done\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.DoneColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsStatNull() { + return this.IsNull(this.tableUnloadStats.StatColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetStatNull() { + this[this.tableUnloadStats.StatColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTotalNull() { + return this.IsNull(this.tableUnloadStats.TotalColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTotalNull() { + this[this.tableUnloadStats.TotalColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsWaitNull() { + return this.IsNull(this.tableUnloadStats.WaitColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetWaitNull() { + this[this.tableUnloadStats.WaitColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsWipNull() { + return this.IsNull(this.tableUnloadStats.WipColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetWipNull() { + this[this.tableUnloadStats.WipColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDoneNull() { + return this.IsNull(this.tableUnloadStats.DoneColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDoneNull() { + this[this.tableUnloadStats.DoneColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -12511,6 +13010,40 @@ namespace AppData { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class UnloadStatsRowChangeEvent : global::System.EventArgs { + + private UnloadStatsRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRowChangeEvent(UnloadStatsRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace AppData.DS_AppTableAdapters { @@ -20795,6 +21328,204 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class UnloadStatsTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "UnloadStats"; + tableMapping.ColumnMappings.Add("Stat", "Stat"); + tableMapping.ColumnMappings.Add("Total", "Total"); + tableMapping.ColumnMappings.Add("Wait", "Wait"); + tableMapping.ColumnMappings.Add("Wip", "Wip"); + tableMapping.ColumnMappings.Add("Done", "Done"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::AppData.Properties.Settings.Default.Sauder_NKCConnectionString; + } + + [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[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "dbo.stp_Unload_Stat"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[0].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[0].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[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatLevel", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_App.UnloadStatsDataTable dataTable, global::System.Nullable BatchID, global::System.Nullable StatLevel) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((StatLevel.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(StatLevel.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_App.UnloadStatsDataTable GetData(global::System.Nullable BatchID, global::System.Nullable StatLevel) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((StatLevel.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(StatLevel.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + DS_App.UnloadStatsDataTable dataTable = new DS_App.UnloadStatsDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -21209,6 +21940,15 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(updatedRows); } } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._errorsLogTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ErrorsLog.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -21263,15 +22003,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(updatedRows); } } - if ((this._itemValidationTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._itemValidationTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._batchReqListTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -21331,6 +22062,14 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allAddedRows.AddRange(addedRows); } } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._errorsLogTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ErrorsLog.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -21379,14 +22118,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allAddedRows.AddRange(addedRows); } } - if ((this._itemValidationTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._itemValidationTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._batchReqListTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -21413,14 +22144,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(deletedRows); } } - if ((this._itemValidationTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._itemValidationTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._nestingTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -21469,6 +22192,14 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt allChangedRows.AddRange(deletedRows); } } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 561e1b2..b8ef9bc 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -1958,6 +1958,30 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt
+ + + + + + dbo.stp_Unload_Stat + + + + + + + + + + + + + + + + + + @@ -2530,6 +2554,23 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt + + + + + + + + + + + + + + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 5d7953c..ca3ee57 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,32 +4,33 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 352 @@ -41,7 +42,7 @@ - + 1197 @@ -53,7 +54,7 @@ - + 1140 @@ -65,7 +66,7 @@ - + 788 @@ -77,7 +78,7 @@ - + 986 @@ -89,7 +90,7 @@ - + 699 @@ -101,7 +102,7 @@ - + 550 @@ -113,7 +114,7 @@ - + 1129 @@ -125,7 +126,7 @@ - + 1359 @@ -137,7 +138,7 @@ - + 1161 @@ -149,7 +150,7 @@ - + 131 @@ -161,7 +162,7 @@ - + 352 diff --git a/AppData/Objects.cs b/AppData/Objects.cs new file mode 100644 index 0000000..ee94b26 --- /dev/null +++ b/AppData/Objects.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AppData +{ + + /// + /// Struttura delel statistiche mostrate + /// + public class stats + { + /// + /// Variabili (red / yellow / green) + /// + public List vars { get; set; } + } + /// + /// Oggetto variabile da mostrare + /// + public class varData + { + /// + /// Nome variabile + /// + public string name { get; set; } = "A"; + /// + /// Valore variabile + /// + public string value { get; set; } = "0"; + } +} diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index dc14518..5e45e7f 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -341,7 +341,7 @@ namespace NKC_SDK public class NestBin { /// - /// Indice del BIN nel TAKC / giorno + /// Indice del BIN nel TAKT / giorno /// public int BinIndex { get; set; } = 0; /// diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 634b45d..cb5bdeb 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -300,6 +300,7 @@ + @@ -764,6 +765,13 @@ cmp_MU_carts.ascx + + cmp_MU_singleStat.ascx + ASPXCodeBehind + + + cmp_MU_singleStat.ascx + cmp_MU_stats.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx new file mode 100644 index 0000000..061a894 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx @@ -0,0 +1,25 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %> + + + +
+
+
+ + + + + + + + + + + + + + + +
+
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs new file mode 100644 index 0000000..13ac731 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs @@ -0,0 +1,69 @@ +using AppData; +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_MU_singleStat : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + } + /// + /// Css titolo + /// + public string titleCss = "bg-dark text-light"; + /// + /// Css titolo + /// + public string title = "NONE"; + + /// + /// Valirizzazione variabili + /// + public void doUpdate() + { + h5Title.Attributes.Remove("class"); + h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}"); + lblTitle.Text = title; + // titoli + try + { + lblTitRed.Text = currStat.vars[0].name; + lblTitYel.Text = currStat.vars[1].name; + lblTitGre.Text = currStat.vars[2].name; + // valori + lblValRed.Text = currStat.vars[0].value; + lblValYel.Text = currStat.vars[1].value; + lblValGre.Text = currStat.vars[2].value; + } + catch + { } + } + + /// + /// Statistiche salvate (locali) + /// + protected stats _currStat { get; set; } + /// + /// Statistiche da mostrare + /// + public stats currStat + { + get + { + return _currStat; + } + set + { + _currStat = value; + doUpdate(); + } + } + + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs new file mode 100644 index 0000000..bd7e474 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// +// 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_MU_singleStat + { + + /// + /// Controllo h5Title. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl h5Title; + + /// + /// Controllo lblTitle. + /// + /// + /// 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 lblTitle; + + /// + /// Controllo lblTitRed. + /// + /// + /// 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 lblTitRed; + + /// + /// Controllo lblTitYel. + /// + /// + /// 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 lblTitYel; + + /// + /// Controllo lblTitGre. + /// + /// + /// 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 lblTitGre; + + /// + /// Controllo lblValRed. + /// + /// + /// 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 lblValRed; + + /// + /// Controllo lblValYel. + /// + /// + /// 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 lblValYel; + + /// + /// Controllo lblValGre. + /// + /// + /// 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 lblValGre; + } +} diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index 4ece5a3..4b87d99 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -1,6 +1,9 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_stats.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_stats" %> +<%@ Register Src="~/WebUserControls/cmp_MU_singleStat.ascx" TagPrefix="uc1" TagName="cmp_MU_singleStat" %> + +
@@ -27,7 +30,7 @@
-
SHEET SH00000123
+
SHIFT B20190916.0
@@ -39,9 +42,9 @@ - - - + + +
52520%2540%
@@ -51,6 +54,7 @@
+
BUNK ST00000A2
@@ -77,7 +81,7 @@
-
SHIFT B20190916.0
+
SHEET SH00000123
@@ -89,9 +93,9 @@ - - - + + +
2540%52520%
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs index c6cf7bf..1dee58b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -1,4 +1,5 @@ -using System; +using AppData; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -9,9 +10,80 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_stats : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } protected void Page_Load(object sender, EventArgs e) { } + public void doUpdate() + { + // leggo stats e compongo + List variabili = new List(); + variabili.Add(new varData { name = "WAIT", value = "2" }); + variabili.Add(new varData { name = "WIP", value = "1" }); + variabili.Add(new varData { name = "DONE", value = "3" }); + stats bunkStsat = new stats + { + vars = variabili + }; + + cmp_MU_singleStatBunk.title = "BUNK"; + cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + cmp_MU_singleStatBunk.currStat = bunkStsat; + } + /// + /// Calcola il rapporto tra 2 valori + /// + /// + /// + /// + public double getRatio(object _dividendo, object _divisore) + { + double ratio = 0; + double dividendo = 0; + double divisore = 1; + double.TryParse(_dividendo.ToString(), out dividendo); + double.TryParse(_divisore.ToString(), out divisore); + ratio = dividendo / divisore; + return ratio; + } + /// + /// determina CSS x colore testo da perc svuotamento... + /// + /// + /// + public string getCssByRatio(double ratio) + { + string answ = "text-dark"; + if (ratio == 0) + { + answ = "text-danger"; + } + else if (ratio == 1) + { + answ = "text-success"; + } + else + { + answ = "text-warning"; + } + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs index 93aede4..2763d2c 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs @@ -13,5 +13,23 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_stats { + + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; + + /// + /// Controllo cmp_MU_singleStatBunk. + /// + /// + /// 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_MU_singleStat cmp_MU_singleStatBunk; } } diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 786cdfc..28dcce0 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -36,6 +36,7 @@ namespace NKC_WF //!!!FIXME!!! fare calcolo del VERO batch corrente... BatchId = 242; // fixed x test! // aggiorno child + cmp_MU_stats.BatchId = BatchId; cmp_MU_svgViewer.BatchId = BatchId; cmp_MU_bins.BatchId = BatchId; cmp_MU_carts.BatchId = BatchId; From 221f7034493c1373b1c11219863b501843b46fc6 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 16:53:14 +0100 Subject: [PATCH 23/37] Update pagina stats (in corso..) --- AppData/AppData.csproj | 1 + AppData/Enum.cs | 17 +++++ NKC_WF/Controllers/getMUCssController.cs | 15 +++-- NKC_WF/WebUserControls/cmp_MU_singleStat.ascx | 63 ++++++++++++++++--- .../WebUserControls/cmp_MU_singleStat.ascx.cs | 39 +++++++++++- .../cmp_MU_singleStat.ascx.designer.cs | 36 +++++++++++ NKC_WF/WebUserControls/cmp_MU_stats.ascx | 4 +- NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 7 ++- 8 files changed, 165 insertions(+), 17 deletions(-) create mode 100644 AppData/Enum.cs diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index 30e2562..5acafb5 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -175,6 +175,7 @@ True DS_Report.xsd + True diff --git a/AppData/Enum.cs b/AppData/Enum.cs new file mode 100644 index 0000000..b2b5b7c --- /dev/null +++ b/AppData/Enum.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AppData +{ + public enum StatType + { + BATCH =1, + BUNK, + SHEET, + CART, + BIN + } +} diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index d61b077..84dd481 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -32,10 +32,17 @@ namespace NKC_WF.Controllers // imposto sfondo ... answ = answ.Replace("#BLK-BCK", "#Sheet"); // ...e primi 3 items... - answ = answ.Replace("#BLK-CUT", "#IT000006, #IT000007, #IT000008"); - answ = answ.Replace("#BLK-SEL", "#IT000003"); - answ = answ.Replace("#BLK-BIN", "#IT000001"); - answ = answ.Replace("#BLK-CART", "#IT000002"); + answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE, #IT000085AF"); + answ = answ.Replace("#BLK-SEL", "#IT000085C2"); + answ = answ.Replace("#BLK-BIN", "#IT000085BE"); + answ = answ.Replace("#BLK-CART", "#IT000085AB"); + + + + //answ = answ.Replace("#BLK-CUT", "#IT000006, #IT000007, #IT000008"); + //answ = answ.Replace("#BLK-SEL", "#IT000003"); + //answ = answ.Replace("#BLK-BIN", "#IT000001"); + //answ = answ.Replace("#BLK-CART", "#IT000002"); // salvo redis! memLayer.ML.setRSV(redKey, answ); diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx index 061a894..f067822 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx @@ -1,25 +1,70 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %> - -
-
+
+
- - - + + + - - - + + +
+ + +
+ + +
+ + + +
+
+
+
+ + + + + + + + + + + + + + + +
WAITWIPDONE
+ + +
+
+
+
+
+ + + + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs index 13ac731..463c1e0 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs @@ -10,6 +10,41 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_singleStat : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + /// + /// Tipo statistica richiesta + /// + public int statLevel + { + set + { + hfStatLevel.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfStatLevel.Value, out answ); + return answ; + } + + } + protected void Page_Load(object sender, EventArgs e) { } @@ -30,6 +65,7 @@ namespace NKC_WF.WebUserControls h5Title.Attributes.Remove("class"); h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}"); lblTitle.Text = title; +#if true // titoli try { @@ -42,7 +78,8 @@ namespace NKC_WF.WebUserControls lblValGre.Text = currStat.vars[2].value; } catch - { } + { } +#endif } /// diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs index bd7e474..36aa0c9 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs @@ -85,5 +85,41 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblValGre; + + /// + /// Controllo frmView. + /// + /// + /// 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.FormView frmView; + + /// + /// Controllo ods. + /// + /// + /// 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.ObjectDataSource ods; + + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; + + /// + /// Controllo hfStatLevel. + /// + /// + /// 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.HiddenField hfStatLevel; } } diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index 4b87d99..dcc178e 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -55,7 +55,7 @@
-
+ <%--
BUNK ST00000A2
@@ -75,7 +75,7 @@
-
+
--%>
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs index 1dee58b..d0375d8 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -43,8 +43,13 @@ namespace NKC_WF.WebUserControls vars = variabili }; - cmp_MU_singleStatBunk.title = "BUNK"; cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + cmp_MU_singleStatBunk.BatchId = BatchId; + cmp_MU_singleStatBunk.statLevel= (int)StatType.BUNK; + + + + cmp_MU_singleStatBunk.title = "BUNK"; cmp_MU_singleStatBunk.currStat = bunkStsat; } /// From 3729517f53d363a9656f7add5eb406bd8465e399 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 16:53:35 +0100 Subject: [PATCH 24/37] Cambio flash colore --- NKC_WF/Content/SheetColor.css | 28 ++++++++++++++-------------- NKC_WF/Content/SheetColor.less | 20 ++++++++++---------- NKC_WF/Content/SheetColor.min.css | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index 3680df5..c89c8ce 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -1,19 +1,19 @@ /* ANIMAZIONE */ .strokeThick { - stroke-width: 50px !important; + stroke-width: 10px !important; } /* Animazione per richiamo attenzione*/ .flashStroke { - stroke: blue; + stroke: yellow; /* Safari 4.0 - 8.0 */ - -webkit-animation-name: blueFlash; + -webkit-animation-name: doFlash; -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ - animation-name: blueFlash; + animation-name: doFlash; animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; @@ -21,21 +21,21 @@ animation-direction: alternate; } /* Safari 4.0 - 8.0 */ -@-webkit-keyframes blueFlash { +@-webkit-keyframes doFlash { 0% { - stroke: #c4dbff; + stroke: #f8fbff; } 25% { - stroke: #9dc4ff; + stroke: #ff0; } 50% { - stroke: #5ca5ff; + stroke: #f2f200; } 75% { - stroke: #1b82ff; + stroke: #d8d800; } 100% { - stroke: #005ccc; + stroke: #bebe00; } } /* COLORI */ @@ -78,22 +78,22 @@ } #BLK-SEL { fill: orange; - stroke: blue; + stroke: yellow; /* Safari 4.0 - 8.0 */ - -webkit-animation-name: blueFlash; + -webkit-animation-name: doFlash; -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ - animation-name: blueFlash; + animation-name: doFlash; animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; animation-iteration-count: infinite; animation-direction: alternate; - stroke-width: 50px !important; + stroke-width: 10px !important; } #BLK-BIN { fill: #28a745; diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index 2437d38..f6ef8f1 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -1,21 +1,21 @@ /* ANIMAZIONE */ -@borderThick: 50px; +@borderThick: 10px; .strokeThick { stroke-width: @borderThick !important; } /* Animazione per richiamo attenzione*/ .flashStroke { - stroke: blue; + stroke: yellow; /* Safari 4.0 - 8.0 */ - -webkit-animation-name: blueFlash; + -webkit-animation-name: doFlash; -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ - animation-name: blueFlash; + animation-name: doFlash; animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; @@ -24,25 +24,25 @@ } /* Safari 4.0 - 8.0 */ -@-webkit-keyframes blueFlash { +@-webkit-keyframes doFlash { 0% { - stroke: #c4dbff; + stroke: #f8fbff; } 25% { - stroke: #9dc4ff; + stroke: #ff0; } 50% { - stroke: #5ca5ff; + stroke: #f2f200; } 75% { - stroke: #1b82ff; + stroke: #d8d800; } 100% { - stroke: #005ccc; + stroke: #bebe00; } } diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index 840c089..20847e4 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -.strokeThick{stroke-width:50px !important;}.flashStroke{stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{stroke:#c4dbff;}25%{stroke:#9dc4ff;}50%{stroke:#5ca5ff;}75%{stroke:#1b82ff;}100%{stroke:#005ccc;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:50px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file +.strokeThick{stroke-width:10px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:10px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file From 9f2e73e1f7e4e4f8da7502003b8728fff731cc49 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 17:54:05 +0100 Subject: [PATCH 25/37] Completato componente statistiche --- AppData/AppData.csproj | 1 - AppData/Objects.cs | 34 ----- Jenkinsfile | 2 +- NKC_WF/Content/SheetColor.css | 22 ++-- NKC_WF/Content/SheetColor.less | 20 +-- NKC_WF/Content/SheetColor.min.css | 2 +- NKC_WF/Controllers/getMUCssController.cs | 11 +- NKC_WF/WebUserControls/cmp_MU_singleStat.ascx | 33 +---- .../WebUserControls/cmp_MU_singleStat.ascx.cs | 48 +------ .../cmp_MU_singleStat.ascx.designer.cs | 72 ----------- NKC_WF/WebUserControls/cmp_MU_stats.ascx | 119 ++---------------- NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 36 ++++-- .../cmp_MU_stats.ascx.designer.cs | 36 ++++++ 13 files changed, 110 insertions(+), 326 deletions(-) delete mode 100644 AppData/Objects.cs diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index 5acafb5..fbb4308 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -176,7 +176,6 @@ DS_Report.xsd - True True diff --git a/AppData/Objects.cs b/AppData/Objects.cs deleted file mode 100644 index ee94b26..0000000 --- a/AppData/Objects.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AppData -{ - - /// - /// Struttura delel statistiche mostrate - /// - public class stats - { - /// - /// Variabili (red / yellow / green) - /// - public List vars { get; set; } - } - /// - /// Oggetto variabile da mostrare - /// - public class varData - { - /// - /// Nome variabile - /// - public string name { get; set; } = "A"; - /// - /// Valore variabile - /// - public string value { get; set; } = "0"; - } -} diff --git a/Jenkinsfile b/Jenkinsfile index 2eca4fb..47b08b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=203']) { + withEnv(['NEXT_BUILD_NUMBER=205']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index c89c8ce..fb3a967 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -1,6 +1,6 @@ /* ANIMAZIONE */ .strokeThick { - stroke-width: 10px !important; + stroke-width: 15px !important; } /* Animazione per richiamo attenzione*/ .flashStroke { @@ -49,10 +49,10 @@ fill: #ACACAC; } .VERDE { - fill: #28a745; + fill: #21CD39; } .BLU { - fill: #007bff; + fill: #0000FF; } .ARANCIO { fill: orange; @@ -63,9 +63,15 @@ .PURPLE { fill: purple; } +.ROSSO { + fill: red; +} .TESTO { fill: white; } +.NERO { + fill: black; +} /* Classi da sostituire dinamicamente*/ #BLK-BCK { /*background-image: url("../Images/MT0006110.jpg"); @@ -77,7 +83,7 @@ fill: #ACACAC; } #BLK-SEL { - fill: orange; + fill: yellow; stroke: yellow; /* Safari 4.0 - 8.0 */ -webkit-animation-name: doFlash; @@ -93,14 +99,14 @@ animation-delay: 0s; animation-iteration-count: infinite; animation-direction: alternate; - stroke-width: 10px !important; + stroke-width: 15px !important; } #BLK-BIN { - fill: #28a745; + fill: #0000FF; } #BLK-CART { - fill: #007bff; + fill: #21CD39; } #BLK-SEC-OP { - fill: purple; + fill: red; } \ No newline at end of file diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index f6ef8f1..7a1d39d 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -1,5 +1,5 @@ /* ANIMAZIONE */ -@borderThick: 10px; +@borderThick: 15px; .strokeThick { stroke-width: @borderThick !important; @@ -57,10 +57,10 @@ fill: #ACACAC; } .VERDE { - fill: #28a745; + fill: #21CD39; } .BLU { - fill: #007bff; + fill: #0000FF; } .ARANCIO { fill: orange; @@ -71,9 +71,15 @@ .PURPLE { fill: purple; } +.ROSSO { + fill: red; +} .TESTO { fill: white; } +.NERO { + fill: black; +} /* Classi da sostituire dinamicamente*/ #BLK-BCK { @@ -83,17 +89,17 @@ .GRIGIO; } #BLK-SEL { - .ARANCIO; + .GIALLO; .flashStroke; .strokeThick; } #BLK-BIN { - .VERDE; + .BLU; } #BLK-CART { - .BLU; + .VERDE; } #BLK-SEC-OP { - .PURPLE; + .ROSSO; } diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index 20847e4..f8ee14a 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -.strokeThick{stroke-width:10px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:10px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file +.strokeThick{stroke-width:15px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#21cd39;}.BLU{fill:#00f;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.ROSSO{fill:red;}.TESTO{fill:white;}.NERO{fill:black;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:yellow;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:15px !important;}#BLK-BIN{fill:#00f;}#BLK-CART{fill:#21cd39;}#BLK-SEC-OP{fill:red;} \ No newline at end of file diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 84dd481..05f36d0 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -29,10 +29,17 @@ namespace NKC_WF.Controllers string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); answ = File.ReadAllText(filename); - // imposto sfondo ... + // imposto sfondo ... NON usato answ = answ.Replace("#BLK-BCK", "#Sheet"); + + // All'inizio --> tutti colorati secondo destinazione (cart, bin, secop) + + // eventualmente sec-op è SECONDO css aggiuntivo opzionale x indicare tratteggiato e/o tratteggiato + flashing... + + // ...e primi 3 items... - answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE, #IT000085AF"); + answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE"); + answ = answ.Replace("#BLK-SEC-OP", "#IT000085AF"); answ = answ.Replace("#BLK-SEL", "#IT000085C2"); answ = answ.Replace("#BLK-BIN", "#IT000085BE"); answ = answ.Replace("#BLK-CART", "#IT000085AB"); diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx index f067822..5e60ee7 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx @@ -1,38 +1,9 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %> -
-
-
-
- - - - - - - - - - - - - - - -
- - -
- - -
-
-
- - +
-
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs index 463c1e0..6c2dcb7 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs @@ -44,63 +44,19 @@ namespace NKC_WF.WebUserControls } } - protected void Page_Load(object sender, EventArgs e) { } /// /// Css titolo /// - public string titleCss = "bg-dark text-light"; - /// - /// Css titolo - /// - public string title = "NONE"; - + public string titleCss { get; set; } = "bg-dark text-light"; /// /// Valirizzazione variabili /// public void doUpdate() { - h5Title.Attributes.Remove("class"); - h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}"); - lblTitle.Text = title; -#if true - // titoli - try - { - lblTitRed.Text = currStat.vars[0].name; - lblTitYel.Text = currStat.vars[1].name; - lblTitGre.Text = currStat.vars[2].name; - // valori - lblValRed.Text = currStat.vars[0].value; - lblValYel.Text = currStat.vars[1].value; - lblValGre.Text = currStat.vars[2].value; - } - catch - { } -#endif + frmView.DataBind(); } - - /// - /// Statistiche salvate (locali) - /// - protected stats _currStat { get; set; } - /// - /// Statistiche da mostrare - /// - public stats currStat - { - get - { - return _currStat; - } - set - { - _currStat = value; - doUpdate(); - } - } - } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs index 36aa0c9..c635b58 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs @@ -14,78 +14,6 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_singleStat { - /// - /// Controllo h5Title. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl h5Title; - - /// - /// Controllo lblTitle. - /// - /// - /// 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 lblTitle; - - /// - /// Controllo lblTitRed. - /// - /// - /// 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 lblTitRed; - - /// - /// Controllo lblTitYel. - /// - /// - /// 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 lblTitYel; - - /// - /// Controllo lblTitGre. - /// - /// - /// 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 lblTitGre; - - /// - /// Controllo lblValRed. - /// - /// - /// 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 lblValRed; - - /// - /// Controllo lblValYel. - /// - /// - /// 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 lblValYel; - - /// - /// Controllo lblValGre. - /// - /// - /// 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 lblValGre; - /// /// Controllo frmView. /// diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index dcc178e..cff9501 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -6,123 +6,22 @@
-
-
BINS
-
-
- - - - - - - - - - - - - - -
WAITWIPDONE
1235
-
-
-
-
-
-
SHIFT B20190916.0
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
2540%
-
-
+
- - <%--
-
BUNK ST00000A2
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
31225%
-
-
--%> + +
+
+ +
+
+
-
-
SHEET SH00000123
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
52520%
-
-
-
-
-
-
CARTS
-
- - - - - - - - - - - - - - - -
WAITWIPDONE
2426
-
-
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs index d0375d8..38f5b3a 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -33,24 +33,34 @@ namespace NKC_WF.WebUserControls } public void doUpdate() { - // leggo stats e compongo - List variabili = new List(); - variabili.Add(new varData { name = "WAIT", value = "2" }); - variabili.Add(new varData { name = "WIP", value = "1" }); - variabili.Add(new varData { name = "DONE", value = "3" }); - stats bunkStsat = new stats - { - vars = variabili - }; - cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + // fix x BIN + cmp_MU_singleStatBin.BatchId = BatchId; + cmp_MU_singleStatBin.statLevel = (int)StatType.BIN; + cmp_MU_singleStatBin.titleCss = "bg-primary text-light"; + + + // fix x BATCH + cmp_MU_singleStatBatch.BatchId = BatchId; + cmp_MU_singleStatBatch.statLevel = (int)StatType.BATCH; + cmp_MU_singleStatBatch.titleCss = "bg-info"; + + // fix x BUNK cmp_MU_singleStatBunk.BatchId = BatchId; - cmp_MU_singleStatBunk.statLevel= (int)StatType.BUNK; + cmp_MU_singleStatBunk.statLevel = (int)StatType.BUNK; + cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + // fix x SHEET + cmp_MU_singleStatSheet.BatchId = BatchId; + cmp_MU_singleStatSheet.statLevel = (int)StatType.SHEET; + cmp_MU_singleStatSheet.titleCss = "bg-warning"; + + // fix x CART + cmp_MU_singleStatCart.BatchId = BatchId; + cmp_MU_singleStatCart.statLevel = (int)StatType.CART; + cmp_MU_singleStatCart.titleCss = "bg-success"; - cmp_MU_singleStatBunk.title = "BUNK"; - cmp_MU_singleStatBunk.currStat = bunkStsat; } /// /// Calcola il rapporto tra 2 valori diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs index 2763d2c..ff455c4 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs @@ -23,6 +23,24 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + /// + /// Controllo cmp_MU_singleStatBin. + /// + /// + /// 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_MU_singleStat cmp_MU_singleStatBin; + + /// + /// Controllo cmp_MU_singleStatBatch. + /// + /// + /// 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_MU_singleStat cmp_MU_singleStatBatch; + /// /// Controllo cmp_MU_singleStatBunk. /// @@ -31,5 +49,23 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBunk; + + /// + /// Controllo cmp_MU_singleStatSheet. + /// + /// + /// 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_MU_singleStat cmp_MU_singleStatSheet; + + /// + /// Controllo cmp_MU_singleStatCart. + /// + /// + /// 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_MU_singleStat cmp_MU_singleStatCart; } } From 770e77afc8aa5657f03a2626b7739b65458ef6da Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 10:11:58 +0100 Subject: [PATCH 26/37] Inizio update gestione css calcolati --- NKC_SDK/Enums.cs | 44 ++++++++++++++++++ NKC_SDK/Objects.cs | 21 +++++++++ NKC_WF/Controllers/getMUCssController.cs | 49 +++++++++++++++------ NKC_WF/Controllers/getMUCssRevController.cs | 45 +++++++++++++------ 4 files changed, 132 insertions(+), 27 deletions(-) diff --git a/NKC_SDK/Enums.cs b/NKC_SDK/Enums.cs index 84b5e32..fcc1408 100644 --- a/NKC_SDK/Enums.cs +++ b/NKC_SDK/Enums.cs @@ -165,6 +165,50 @@ /// Present } + /// + /// Destinazioni per ITEM post CNC WORK + /// + public enum ItemDest + { + /// + /// Destinato a BIN (painting) + /// + Bin, + /// + /// Destinato a Cart (KIT) + /// + Cart, + /// + /// Indefinito + /// + Undef + } + /// + /// Stati ammessi per ITEM + /// + public enum ItemStatus + { + /// + /// Programmato + /// + Programmed, + /// + /// Completato/Fatto/tagliato + /// + Made, + /// + /// Preso da operatore + /// + PickUp, + /// + /// Depositato su Bin/Cesta + /// + Removed, + /// + /// Indefinito + /// + Undef + } /// /// Tipi di barcode gestiti diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index 5e45e7f..6cb2ad3 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -140,6 +140,27 @@ namespace NKC_SDK /// public Dictionary OptParameters { get; set; } = null; } + /// + /// Descrizione di un ITEM in fase di scarico + /// + public class PartUnload : Part + { + /// + /// Destinazione dell'item + /// + public ItemDest NextDest { get; set; } = ItemDest.Undef; + /// + /// Stato dell'item + /// + public ItemStatus Status { get; set; } = ItemStatus.Undef; + /// + /// Elenco di Secop opzionali (es T-NUT, RoundEdge) + /// + public List SecOp { get; set; } = new List(); + } + + + /// /// Classe Sheet x Nesting /// diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 05f36d0..6bb53c5 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -1,4 +1,5 @@ -using SteamWare; +using AppData; +using SteamWare; using System.IO; using System.Net; using System.Net.Http; @@ -10,12 +11,39 @@ namespace NKC_WF.Controllers { public class getMUCssController : ApiController { - // GET api/ + // GET api/getMUCssController public HttpResponseMessage Get() { string answ = ""; + string codPost = "01"; + answ = getCssByPost(answ, codPost); + return new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(answ, Encoding.UTF8, "text/css") + }; + } + + // GET api/getMUCssController/5 + public HttpResponseMessage Get(int id) + { + string answ = ""; + string codPost = id.ToString("00"); + answ = getCssByPost(answ, codPost); + return new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(answ, Encoding.UTF8, "text/css") + }; + } + /// + /// Calcola CSS da postsazione + /// + /// + /// + /// + private static string getCssByPost(string answ, string codPost) + { // recupero da REDIS! - string redKey = memLayer.ML.redHash("MachineUnload:01:Css"); + string redKey = $"{ComLib.machineUnloadArea(codPost)}:Css";// memLayer.ML.redHash($"MachineUnload:{codPost}:Css"); // se vuoto scrivo versione attuale... if (!memLayer.ML.redKeyPresent(redKey)) { @@ -52,21 +80,14 @@ namespace NKC_WF.Controllers //answ = answ.Replace("#BLK-CART", "#IT000002"); // salvo redis! - memLayer.ML.setRSV(redKey, answ); + int cssCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); + cssCacheTTL = cssCacheTTL <= 0 ? 60: cssCacheTTL; + memLayer.ML.setRSV(redKey, answ, cssCacheTTL); } - - return new HttpResponseMessage(HttpStatusCode.OK) - { - Content = new StringContent(answ, Encoding.UTF8, "text/css") - }; + return answ; } - // GET api//5 - public string Get(int id) - { - return "value"; - } // POST api/ public void Post([FromBody]string value) diff --git a/NKC_WF/Controllers/getMUCssRevController.cs b/NKC_WF/Controllers/getMUCssRevController.cs index 4743a9f..77b9cf2 100644 --- a/NKC_WF/Controllers/getMUCssRevController.cs +++ b/NKC_WF/Controllers/getMUCssRevController.cs @@ -1,31 +1,50 @@ -using SteamWare; +using AppData; +using SteamWare; using System.Web.Http; namespace NKC_WF.Controllers { public class getMUCssRevController : ApiController { - // GET api/ + // GET api/getMUCssRev public int Get() { int answ = 0; - // recupero da REDIS! - string redKey = memLayer.ML.redHash("MachineUnload:01:CssRev"); - // se vuoto scrivo 1... - if (!memLayer.ML.redKeyPresent(redKey)) - { - memLayer.ML.setRCntI(redKey); - } - answ = memLayer.ML.getRCnt(redKey); + string codPost = "01"; + answ = getRevByPost(codPost); + return answ; + } + // GET api/getMUCssRev/5 + public int Get(int id) + { + int answ = 0; + string codPost = id.ToString("00"); + answ = getRevByPost(codPost); return answ; } - // GET api//5 - public string Get(int id) + private static int getRevByPost(string codPost) { - return "value"; + int answ; + // recupero da REDIS! + string redKey = $"{ComLib.machineUnloadArea(codPost)}:Css";// memLayer.ML.redHash($"MachineUnload:{codPost}:Css"); + string redKeyRev = $"{ComLib.machineUnloadArea(codPost)}:CssRev";// memLayer.ML.redHash($"MachineUnload:{codPost}:CssRev"); + // se vuoto scrivo 1... + if (!memLayer.ML.redKeyPresent(redKeyRev)) + { + memLayer.ML.setRCntI(redKeyRev); + } + // SE fosse scaduto CSS --> aggiorno revisione... + if (!memLayer.ML.redKeyPresent(redKey)) + { + // incremento... + memLayer.ML.setRCntI(redKeyRev); + } + answ = memLayer.ML.getRCnt(redKeyRev); + return answ; } + // POST api/ public void Post([FromBody]string value) { From 4f8f421569cdbadd9db55e81312b5fbc599d998f Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 10:12:29 +0100 Subject: [PATCH 27/37] pulizia dati --- NKC_WF/site/MachineUnload.aspx | 4 ---- NKC_WF/site/MachineUnload.aspx.cs | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index e6f488f..3852d07 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -7,10 +7,6 @@ <%@ Register Src="~/WebUserControls/cmp_MU_carts.ascx" TagPrefix="uc1" TagName="cmp_MU_carts" %> - - - - diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 28dcce0..39ceaea 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -1,4 +1,5 @@ -using System; +using AppData; +using System; using System.IO; namespace NKC_WF From d151fb7313b349de47df4ca980cb8f6322ca67c9 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 10:12:43 +0100 Subject: [PATCH 28/37] aggiunto reset anche di CDV da menuTop --- NKC_WF/WebUserControls/cmp_menuTop.ascx.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs b/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs index 3dea261..0ec3276 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs @@ -1,4 +1,5 @@ -using SteamWare; +using AppData; +using SteamWare; using System; using System.Collections.Generic; using System.Linq; @@ -108,6 +109,8 @@ namespace NKC_WF.WebUserControls { if (doFullReset) { + // reset REDIS x css + ComLib.man.resetPostUnload(""); // aggiorno vocabolario DataWrap.DW.resetVocabolario(); // reset dati in cache x DbConfig... From 3f69fb6da75a9611304287a2ae3d2f97774a748b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 10:13:05 +0100 Subject: [PATCH 29/37] Inserito gestione nome area REDIS x css realtime --- AppData/ComLib.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 35bf8b1..f17b53b 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1420,6 +1420,59 @@ namespace AppData } } + #endregion + + #region metodi x UNLOAD + + /// + /// Calcola area REDIS per postsaizone Unload + /// + /// + /// + public static string machineUnloadArea(string codPost) + { + return memLayer.ML.redHash($"MachineUnload:{codPost}"); + } + + /// + /// Svuota elenco pezzi nella postazione di unload + /// + /// + public bool resetPostUnload(string codPost = "01") + { + bool answ = false; + try + { + memLayer.ML.redFlushKey(machineUnloadArea(codPost)); + answ = true; + } + catch + { } + return answ; + } + /// + /// Fa setup postsazione scarico (lettura da DB dell'elenco pezzi con relativo stato) + /// + /// + public bool setupPostUnload(string codPost = "01") + { + bool answ = false; + try + { + // svuoto... + resetPostUnload(codPost); + // ri-carico da DB + + // salvo su area REDIS + answ = true; + } + catch + { } + return answ; + } + + + #endregion } From b445a634a3ab36587cc865e3de9f8f7f042b900d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 10:13:21 +0100 Subject: [PATCH 30/37] Refresh pacchetti --- AppData/AppData.csproj | 17 +- AppData/packages.config | 8 +- NKC_WF/NKC_WF.csproj | 23 +-- NKC_WF/Web.config | 417 +++++++++++++++++++--------------------- NKC_WF/packages.config | 8 +- 5 files changed, 232 insertions(+), 241 deletions(-) diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index fbb4308..c7f16fd 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -69,14 +69,14 @@ ..\packages\Microsoft.ReportViewer.Runtime.WinForms.12.0.2402.15\lib\Microsoft.ReportViewer.WinForms.dll - - ..\packages\MongoDB.Bson.2.10.0\lib\net452\MongoDB.Bson.dll + + ..\packages\MongoDB.Bson.2.10.1\lib\net452\MongoDB.Bson.dll - - ..\packages\MongoDB.Driver.2.10.0\lib\net452\MongoDB.Driver.dll + + ..\packages\MongoDB.Driver.2.10.1\lib\net452\MongoDB.Driver.dll - - ..\packages\MongoDB.Driver.Core.2.10.0\lib\net452\MongoDB.Driver.Core.dll + + ..\packages\MongoDB.Driver.Core.2.10.1\lib\net452\MongoDB.Driver.Core.dll ..\packages\MongoDB.Libmongocrypt.1.0.0\lib\net452\MongoDB.Libmongocrypt.dll @@ -105,8 +105,8 @@ ..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.3.5.1912.708\lib\net462\SteamWare.dll + + ..\packages\SteamWare.3.5.2001.709\lib\net462\SteamWare.dll @@ -229,6 +229,7 @@ + diff --git a/AppData/packages.config b/AppData/packages.config index 8b42ca3..8af598b 100644 --- a/AppData/packages.config +++ b/AppData/packages.config @@ -7,9 +7,9 @@ - - - + + + @@ -20,7 +20,7 @@ - + diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index cb5bdeb..128ce3c 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -84,14 +84,14 @@ ..\packages\Microsoft.Web.RedisSessionStateProvider.4.0.1\lib\net462\Microsoft.Web.RedisSessionStateProvider.dll - - ..\packages\MongoDB.Bson.2.10.0\lib\net452\MongoDB.Bson.dll + + ..\packages\MongoDB.Bson.2.10.1\lib\net452\MongoDB.Bson.dll - - ..\packages\MongoDB.Driver.2.10.0\lib\net452\MongoDB.Driver.dll + + ..\packages\MongoDB.Driver.2.10.1\lib\net452\MongoDB.Driver.dll - - ..\packages\MongoDB.Driver.Core.2.10.0\lib\net452\MongoDB.Driver.Core.dll + + ..\packages\MongoDB.Driver.Core.2.10.1\lib\net452\MongoDB.Driver.Core.dll ..\packages\MongoDB.Libmongocrypt.1.0.0\lib\net452\MongoDB.Libmongocrypt.dll @@ -120,8 +120,8 @@ ..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.3.5.1912.708\lib\net462\SteamWare.dll + + ..\packages\SteamWare.3.5.2001.709\lib\net462\SteamWare.dll ..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll @@ -233,6 +233,9 @@ + + + SheetColor.less @@ -243,11 +246,9 @@ + - - - diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index afd11a6..d90c9a7 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -1,4 +1,4 @@ - + - - - - - - + + + + + + - + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - + + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - + - - - - + + + + @@ -399,20 +388,20 @@ See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for more information on remote access and securing ELMAH. --> - + - + - + - - - - - - + + + + + + - + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - + + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - + - - - - + + + + @@ -388,20 +399,20 @@ See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for more information on remote access and securing ELMAH. --> - + - + - + - + diff --git a/Jenkinsfile b/Jenkinsfile index 47b08b6..13629a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,10 +17,10 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=205']) { - // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) - env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') - env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') + withEnv(['NEXT_BUILD_NUMBER=209']) { + // 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}') env.APP_NAME = 'NKC' } } diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index fb3a967..045cfa6 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -39,12 +39,6 @@ } } /* COLORI */ -.SFONDO { - /*background-image: url("../Images/MT0006110.jpg"); - background-repeat: no-repeat; - background-size: cover;*/ - fill: #DEDEDE; -} .GRIGIO { fill: #ACACAC; } @@ -72,18 +66,17 @@ .NERO { fill: black; } -/* Classi da sostituire dinamicamente*/ -#BLK-BCK { - /*background-image: url("../Images/MT0006110.jpg"); - background-repeat: no-repeat; - background-size: cover;*/ - fill: #DEDEDE; +.BORDOROSSO { + stroke-width: 15px !important; + stroke-dasharray: 30; + stroke-linecap: round; + stroke: #FF0000; } -#BLK-CUT { +/* Classi da sostituire dinamicamente*/ +#ItemsDepo { fill: #ACACAC; } -#BLK-SEL { - fill: yellow; +#ItemsSel { stroke: yellow; /* Safari 4.0 - 8.0 */ -webkit-animation-name: doFlash; @@ -101,12 +94,15 @@ animation-direction: alternate; stroke-width: 15px !important; } -#BLK-BIN { +#ItemsBin { fill: #0000FF; } -#BLK-CART { +#ItemsCart { fill: #21CD39; } -#BLK-SEC-OP { - fill: red; +#ItemsSecOp { + stroke-width: 15px !important; + stroke-dasharray: 30; + stroke-linecap: round; + stroke: #FF0000; } \ No newline at end of file diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index 7a1d39d..b7c9359 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -47,12 +47,6 @@ } /* COLORI */ -.SFONDO { - /*background-image: url("../Images/MT0006110.jpg"); - background-repeat: no-repeat; - background-size: cover;*/ - fill: #DEDEDE; -} .GRIGIO { fill: #ACACAC; } @@ -81,25 +75,27 @@ fill: black; } -/* Classi da sostituire dinamicamente*/ -#BLK-BCK { - .SFONDO; +.BORDOROSSO { + .strokeThick; + stroke-dasharray: 30; + stroke-linecap: round; + stroke: #FF0000; } -#BLK-CUT { + +/* Classi da sostituire dinamicamente*/ +#ItemsDepo { .GRIGIO; } -#BLK-SEL { - .GIALLO; +#ItemsSel { .flashStroke; .strokeThick; } -#BLK-BIN { +#ItemsBin { .BLU; } -#BLK-CART { +#ItemsCart { .VERDE; } - -#BLK-SEC-OP { - .ROSSO; +#ItemsSecOp { + .BORDOROSSO; } diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index f8ee14a..414f455 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -.strokeThick{stroke-width:15px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#21cd39;}.BLU{fill:#00f;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.ROSSO{fill:red;}.TESTO{fill:white;}.NERO{fill:black;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:yellow;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:15px !important;}#BLK-BIN{fill:#00f;}#BLK-CART{fill:#21cd39;}#BLK-SEC-OP{fill:red;} \ No newline at end of file +.strokeThick{stroke-width:15px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.GRIGIO{fill:#acacac;}.VERDE{fill:#21cd39;}.BLU{fill:#00f;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.ROSSO{fill:red;}.TESTO{fill:white;}.NERO{fill:black;}.BORDOROSSO{stroke-width:15px !important;stroke-dasharray:30;stroke-linecap:round;stroke:#f00;}#ItemsDepo{fill:#acacac;}#ItemsSel{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:15px !important;}#ItemsBin{fill:#00f;}#ItemsCart{fill:#21cd39;}#ItemsSecOp{stroke-width:15px !important;stroke-dasharray:30;stroke-linecap:round;stroke:#f00;} \ No newline at end of file diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 6bb53c5..c014ef3 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -1,5 +1,8 @@ using AppData; +using Newtonsoft.Json; using SteamWare; +using System; +using System.Collections.Generic; using System.IO; using System.Net; using System.Net.Http; @@ -14,9 +17,8 @@ namespace NKC_WF.Controllers // GET api/getMUCssController public HttpResponseMessage Get() { - string answ = ""; - string codPost = "01"; - answ = getCssByPost(answ, codPost); + string SheetID = "0"; + string answ = getCssByPost(SheetID); return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(answ, Encoding.UTF8, "text/css") @@ -26,9 +28,8 @@ namespace NKC_WF.Controllers // GET api/getMUCssController/5 public HttpResponseMessage Get(int id) { - string answ = ""; - string codPost = id.ToString("00"); - answ = getCssByPost(answ, codPost); + string SheetID = id.ToString(); + string answ = getCssByPost(SheetID); return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(answ, Encoding.UTF8, "text/css") @@ -38,13 +39,22 @@ namespace NKC_WF.Controllers /// Calcola CSS da postsazione ///
/// - /// + /// /// - private static string getCssByPost(string answ, string codPost) + private static string getCssByPost(string _sheetID) { + // var base + string answ = ""; + // TTL standard + int dataCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); + dataCacheTTL = dataCacheTTL <= 0 ? 60 : dataCacheTTL; + // dati foglio corrente + int sheetID = 0; + int.TryParse(_sheetID, out sheetID); // recupero da REDIS! - string redKey = $"{ComLib.machineUnloadArea(codPost)}:Css";// memLayer.ML.redHash($"MachineUnload:{codPost}:Css"); - // se vuoto scrivo versione attuale... + string redKey = $"{ComLib.machineUnloadArea(_sheetID)}:Css"; + string redKeyBase = $"{ComLib.machineUnloadArea(_sheetID)}"; + // se vuoto scrivo VUOTO... if (!memLayer.ML.redKeyPresent(redKey)) { memLayer.ML.setRSV(redKey, answ); @@ -52,42 +62,132 @@ namespace NKC_WF.Controllers answ = memLayer.ML.getRSV(redKey); // RICALCOLO SOLO SE non trovo in REDIS (perché invalidato) if (answ == "") - // se vuoto lo calcolo... !!!FIXME!!! leggere da DB!!!! + // se vuoto lo calcolo... { string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); answ = File.ReadAllText(filename); - // imposto sfondo ... NON usato - answ = answ.Replace("#BLK-BCK", "#Sheet"); + // 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 itemsSel = new List(); + List itemsPProc = new List(); - // All'inizio --> tutti colorati secondo destinazione (cart, bin, secop) - - // eventualmente sec-op è SECONDO css aggiuntivo opzionale x indicare tratteggiato e/o tratteggiato + flashing... + //se ho items... + if (tabItems.Count > 0) + { + // ciclo! + foreach (var item in tabItems) + { + // 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 != "") + { + itemsPProc.Add(item.ItemDtmx); + } + } + } - // ...e primi 3 items... - answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE"); - answ = answ.Replace("#BLK-SEC-OP", "#IT000085AF"); - answ = answ.Replace("#BLK-SEL", "#IT000085C2"); - answ = answ.Replace("#BLK-BIN", "#IT000085BE"); - answ = answ.Replace("#BLK-CART", "#IT000085AB"); + // FIX BIN + answ = saveItemData(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); + // FIX CART + answ = saveItemData(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); + // FIX Scaricati + answ = saveItemData(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); - //answ = answ.Replace("#BLK-CUT", "#IT000006, #IT000007, #IT000008"); - //answ = answ.Replace("#BLK-SEL", "#IT000003"); - //answ = answ.Replace("#BLK-BIN", "#IT000001"); - //answ = answ.Replace("#BLK-CART", "#IT000002"); + // FIX SEC-OP + answ = saveItemData(answ, redKeyBase, "ItemsSecOp", itemsPProc, dataCacheTTL); - // salvo redis! - int cssCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); - cssCacheTTL = cssCacheTTL <= 0 ? 60: cssCacheTTL; - memLayer.ML.setRSV(redKey, answ, cssCacheTTL); + // FIXED SEL da array oggetti selezionati... + 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 = ""; + } + + // 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(redKey, answ, dataCacheTTL); } return answ; } + private static int List(T rawData) + { + throw new NotImplementedException(); + } + + /// + /// Processa elenco items e salva in redis valori x css, elenchi, ... + /// + /// CSS corrente + /// HASH abse x area REDIS + /// nome variabile x elenco items + /// Elenco items specifici + /// TTL della cache x salvataggio valori + /// + private static string saveItemData(string currCss, string redKeyBase, string varName, List itemList, int dataCacheTTL) + { + string replaceVal = ""; + if (itemList.Count > 0) + { + foreach (var item in itemList) + { + replaceVal += $"#{item},"; + } + if (replaceVal.Length > 1) + { + replaceVal = replaceVal.Remove(replaceVal.Length - 1); + } + // FIX CSS! + currCss = currCss.Replace($"#{varName}", replaceVal); + replaceVal = ""; + //serializzo e salvo + string serVal = JsonConvert.SerializeObject(itemList); + memLayer.ML.setRSV($"{redKeyBase}:{varName}", serVal, dataCacheTTL); + } + return currCss; + } + // POST api/ public void Post([FromBody]string value) diff --git a/NKC_WF/Controllers/getMUCssRevController.cs b/NKC_WF/Controllers/getMUCssRevController.cs index 77b9cf2..6febac7 100644 --- a/NKC_WF/Controllers/getMUCssRevController.cs +++ b/NKC_WF/Controllers/getMUCssRevController.cs @@ -10,25 +10,29 @@ namespace NKC_WF.Controllers public int Get() { int answ = 0; - string codPost = "01"; - answ = getRevByPost(codPost); + string SheetID = "0"; + answ = getRevBySheet(SheetID); return answ; } // GET api/getMUCssRev/5 public int Get(int id) { int answ = 0; - string codPost = id.ToString("00"); - answ = getRevByPost(codPost); + string SheetID = id.ToString(); + answ = getRevBySheet(SheetID); return answ; } - - private static int getRevByPost(string codPost) + /// + /// Recupera da REDIS info indice revisione x foglio + /// + /// + /// + private static int getRevBySheet(string SheetID) { int answ; // recupero da REDIS! - string redKey = $"{ComLib.machineUnloadArea(codPost)}:Css";// memLayer.ML.redHash($"MachineUnload:{codPost}:Css"); - string redKeyRev = $"{ComLib.machineUnloadArea(codPost)}:CssRev";// memLayer.ML.redHash($"MachineUnload:{codPost}:CssRev"); + string redKey = $"{ComLib.machineUnloadArea(SheetID)}:Css"; + string redKeyRev = $"{ComLib.machineUnloadArea(SheetID)}:CssRev"; // se vuoto scrivo 1... if (!memLayer.ML.redKeyPresent(redKeyRev)) { @@ -41,23 +45,13 @@ namespace NKC_WF.Controllers memLayer.ML.setRCntI(redKeyRev); } answ = memLayer.ML.getRCnt(redKeyRev); + // se > 999 --> resetto + if (answ > 999) + { + memLayer.ML.resetRCnt(redKeyRev); + } return answ; } - - // POST api/ - public void Post([FromBody]string value) - { - } - - // PUT api//5 - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api//5 - public void Delete(int id) - { - } } } \ 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 6696e5c..77db5ca 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -7,8 +7,10 @@ lastVal = 0; setInterval("my_function();", 900); function my_function() { + SheetId = document.getElementById('<%=hfSheetId.ClientID%>').value; + document.getElementById("dynCss").href = "../api/getMUCss/" + SheetId; $.ajax({ - url: "../api/getMUCssRev" + url: "../api/getMUCssRev/" + SheetId }).then(function (data) { // se è cambiato... if (data != lastVal) { @@ -20,4 +22,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs index b0b2b7b..2b34712 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -29,10 +29,25 @@ namespace NKC_WF.WebUserControls return answ; } } + /// + /// Foglio corrente... + /// + public int SheetId + { + set + { + hfSheetId.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfSheetId.Value, out answ); + return answ; + } + } public void doUpdate() { // recupero ID del foglio corrente - int sheetId = 0; string answ = ""; string filename = ""; try @@ -41,7 +56,7 @@ namespace NKC_WF.WebUserControls var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); if (sheetList.Count > 0) { - sheetId = sheetList[0].SheetID; + SheetId = sheetList[0].SheetID; // lo leggo da file string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs index 131f885..6322cc7 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs @@ -31,5 +31,14 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + + /// + /// Controllo hfSheetId. + /// + /// + /// 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.HiddenField hfSheetId; } } From def62190cc1829d84b749b42ffd394aa22000665 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 17:07:44 +0100 Subject: [PATCH 34/37] Spostati in ComLib metodi helper css --- AppData/ComLib.cs | 156 ++++++++++++++++++-- NKC_WF/Controllers/getMUCssController.cs | 86 +++-------- NKC_WF/Controllers/getMUCssRevController.cs | 10 +- NKC_WF/WebUserControls/cmp_menuTop.ascx.cs | 2 +- 4 files changed, 169 insertions(+), 85 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index eb7fda2..938c678 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -5,6 +5,8 @@ using NKC_SDK; using SteamWare; using System; using System.Collections.Generic; +using System.IO; +using System.Web; namespace AppData { @@ -1425,25 +1427,36 @@ namespace AppData #region metodi x UNLOAD /// - /// Calcola area REDIS per postsaizone Unload + /// Calcola area REDIS per FOGLIO in fase di scarico /// - /// + /// /// - public static string machineUnloadArea(string codPost) + public static string machineUnloadArea(int SheetID) { - return memLayer.ML.redHash($"MachineUnload:{codPost}"); + // se 0 --> tutto l'albero, sennò solo area corrente... + string answ = ""; + if (SheetID > 0) + { + answ = memLayer.ML.redHash($"MachineUnload:{SheetID}"); + } + else + { + answ = memLayer.ML.redHash($"MachineUnload"); + } + return answ; } /// /// Svuota elenco pezzi nella postazione di unload /// + /// /// - public bool resetPostUnload(string codPost = "01") + public bool resetPostUnload(int SheetID = 0) { bool answ = false; try { - memLayer.ML.redFlushKey(machineUnloadArea(codPost)); + memLayer.ML.redFlushKey(machineUnloadArea(SheetID)); answ = true; } catch @@ -1451,16 +1464,17 @@ namespace AppData return answ; } /// - /// Fa setup postsazione scarico (lettura da DB dell'elenco pezzi con relativo stato) + /// Fa setup postazione scarico (lettura da DB dell'elenco pezzi con relativo stato) /// + /// /// - public bool setupPostUnload(string codPost = "01") + public bool setupPostUnload(int SheetID = 0) { bool answ = false; try { // svuoto... - resetPostUnload(codPost); + resetPostUnload(SheetID); // ri-carico da DB // salvo su area REDIS @@ -1471,7 +1485,131 @@ namespace AppData return answ; } + public static string getCurrentCss(int sheetID) + { + // recupero da REDIS! + string redKey = $"{ComLib.machineUnloadArea(sheetID)}:Css"; + string redKeyBase = $"{ComLib.machineUnloadArea(sheetID)}"; + // TTL standard + int dataCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); + dataCacheTTL = dataCacheTTL <= 0 ? 60 : dataCacheTTL; + // 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) + { + // ciclo! + foreach (var item in tabItems) + { + // 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 = ComLib.saveItemData(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); + + // FIX CART + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); + + // FIX Scaricati + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); + + // FIX SEC-OP + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); + + // FIXED SEL da array oggetti selezionati... + 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 = ""; + } + + // 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(redKey, answ, dataCacheTTL); + + return answ; + } + + /// + /// Processa elenco items e salva in redis valori x css, elenchi, ... + /// + /// CSS corrente + /// HASH abse x area REDIS + /// nome variabile x elenco items + /// Elenco items specifici + /// TTL della cache x salvataggio valori + /// + public static string saveItemData(string currCss, string redKeyBase, string varName, List itemList, int dataCacheTTL) + { + string replaceVal = ""; + if (itemList.Count > 0) + { + foreach (var item in itemList) + { + replaceVal += $"#{item},"; + } + if (replaceVal.Length > 1) + { + replaceVal = replaceVal.Remove(replaceVal.Length - 1); + } + // FIX CSS! + currCss = currCss.Replace($"#{varName}", replaceVal); + replaceVal = ""; + //serializzo e salvo + string serVal = JsonConvert.SerializeObject(itemList); + memLayer.ML.setRSV($"{redKeyBase}:{varName}", serVal, dataCacheTTL); + } + return currCss; + } #endregion diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index c014ef3..0046a4b 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -17,8 +17,7 @@ namespace NKC_WF.Controllers // GET api/getMUCssController public HttpResponseMessage Get() { - string SheetID = "0"; - string answ = getCssByPost(SheetID); + string answ = getCssByPost(0); return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(answ, Encoding.UTF8, "text/css") @@ -28,8 +27,7 @@ namespace NKC_WF.Controllers // GET api/getMUCssController/5 public HttpResponseMessage Get(int id) { - string SheetID = id.ToString(); - string answ = getCssByPost(SheetID); + string answ = getCssByPost(id); return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(answ, Encoding.UTF8, "text/css") @@ -41,19 +39,21 @@ namespace NKC_WF.Controllers /// /// /// - private static string getCssByPost(string _sheetID) + private static string getCssByPost(int sheetID) { // var base string answ = ""; // TTL standard int dataCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); dataCacheTTL = dataCacheTTL <= 0 ? 60 : dataCacheTTL; +#if false // dati foglio corrente int sheetID = 0; - int.TryParse(_sheetID, out sheetID); + int.TryParse(_sheetID, out sheetID); +#endif // recupero da REDIS! - string redKey = $"{ComLib.machineUnloadArea(_sheetID)}:Css"; - string redKeyBase = $"{ComLib.machineUnloadArea(_sheetID)}"; + string redKey = $"{ComLib.machineUnloadArea(sheetID)}:Css"; + string redKeyBase = $"{ComLib.machineUnloadArea(sheetID)}"; // se vuoto scrivo VUOTO... if (!memLayer.ML.redKeyPresent(redKey)) { @@ -64,6 +64,8 @@ namespace NKC_WF.Controllers if (answ == "") // se vuoto lo calcolo... { + answ = ComLib.getCurrentCss(sheetID); +#if false string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); answ = File.ReadAllText(filename); @@ -73,8 +75,7 @@ namespace NKC_WF.Controllers List itemsDepo = new List(); List itemsCart = new List(); List itemsBin = new List(); - List itemsSel = new List(); - List itemsPProc = new List(); + List itemsSecOp = new List(); //se ho items... if (tabItems.Count > 0) @@ -100,23 +101,23 @@ namespace NKC_WF.Controllers // controllo ANCHE postprocessing if (item.PostProcList != "") { - itemsPProc.Add(item.ItemDtmx); + itemsSecOp.Add(item.ItemDtmx); } } } // FIX BIN - answ = saveItemData(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); // FIX CART - answ = saveItemData(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); // FIX Scaricati - answ = saveItemData(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); // FIX SEC-OP - answ = saveItemData(answ, redKeyBase, "ItemsSecOp", itemsPProc, dataCacheTTL); + answ = ComLib.saveItemData(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); // FIXED SEL da array oggetti selezionati... string rawData = memLayer.ML.getRSV($"{redKeyBase}:ItemsSel"); @@ -145,63 +146,12 @@ namespace NKC_WF.Controllers memLayer.ML.setRSV($"{redKeyBase}:ItemsAll", serVal, dataCacheTTL); // salvo redis css! - memLayer.ML.setRSV(redKey, answ, dataCacheTTL); + memLayer.ML.setRSV(redKey, answ, dataCacheTTL); +#endif } return answ; } - private static int List(T rawData) - { - throw new NotImplementedException(); - } - - /// - /// Processa elenco items e salva in redis valori x css, elenchi, ... - /// - /// CSS corrente - /// HASH abse x area REDIS - /// nome variabile x elenco items - /// Elenco items specifici - /// TTL della cache x salvataggio valori - /// - private static string saveItemData(string currCss, string redKeyBase, string varName, List itemList, int dataCacheTTL) - { - string replaceVal = ""; - if (itemList.Count > 0) - { - foreach (var item in itemList) - { - replaceVal += $"#{item},"; - } - if (replaceVal.Length > 1) - { - replaceVal = replaceVal.Remove(replaceVal.Length - 1); - } - // FIX CSS! - currCss = currCss.Replace($"#{varName}", replaceVal); - replaceVal = ""; - //serializzo e salvo - string serVal = JsonConvert.SerializeObject(itemList); - memLayer.ML.setRSV($"{redKeyBase}:{varName}", serVal, dataCacheTTL); - } - return currCss; - } - - - // POST api/ - public void Post([FromBody]string value) - { - } - - // PUT api//5 - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api//5 - public void Delete(int id) - { - } } } \ No newline at end of file diff --git a/NKC_WF/Controllers/getMUCssRevController.cs b/NKC_WF/Controllers/getMUCssRevController.cs index 6febac7..ae508f7 100644 --- a/NKC_WF/Controllers/getMUCssRevController.cs +++ b/NKC_WF/Controllers/getMUCssRevController.cs @@ -9,17 +9,13 @@ namespace NKC_WF.Controllers // GET api/getMUCssRev public int Get() { - int answ = 0; - string SheetID = "0"; - answ = getRevBySheet(SheetID); + int answ = getRevBySheet(0); return answ; } // GET api/getMUCssRev/5 public int Get(int id) { - int answ = 0; - string SheetID = id.ToString(); - answ = getRevBySheet(SheetID); + int answ = getRevBySheet(id); return answ; } /// @@ -27,7 +23,7 @@ namespace NKC_WF.Controllers /// /// /// - private static int getRevBySheet(string SheetID) + private static int getRevBySheet(int SheetID) { int answ; // recupero da REDIS! diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs b/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs index 0ec3276..31e2e10 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs @@ -110,7 +110,7 @@ namespace NKC_WF.WebUserControls if (doFullReset) { // reset REDIS x css - ComLib.man.resetPostUnload(""); + ComLib.man.resetPostUnload(); // aggiorno vocabolario DataWrap.DW.resetVocabolario(); // reset dati in cache x DbConfig... From 9e318fa44b1bc325a484e638de04d1da921a1beb Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 17:32:45 +0100 Subject: [PATCH 35/37] completo refactor in comLib x css x gestire insert selezione --- AppData/ComLib.cs | 21 +----- NKC_WF/Controllers/getMUCssController.cs | 94 +----------------------- 2 files changed, 3 insertions(+), 112 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 938c678..409bd96 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1464,27 +1464,10 @@ namespace AppData return answ; } /// - /// Fa setup postazione scarico (lettura da DB dell'elenco pezzi con relativo stato) + /// /// - /// + /// /// - public bool setupPostUnload(int SheetID = 0) - { - bool answ = false; - try - { - // svuoto... - resetPostUnload(SheetID); - // ri-carico da DB - - // salvo su area REDIS - answ = true; - } - catch - { } - return answ; - } - public static string getCurrentCss(int sheetID) { // recupero da REDIS! diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 0046a4b..75bb7f4 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -43,17 +43,8 @@ namespace NKC_WF.Controllers { // var base string answ = ""; - // TTL standard - int dataCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); - dataCacheTTL = dataCacheTTL <= 0 ? 60 : dataCacheTTL; -#if false - // dati foglio corrente - int sheetID = 0; - int.TryParse(_sheetID, out sheetID); -#endif // recupero da REDIS! string redKey = $"{ComLib.machineUnloadArea(sheetID)}:Css"; - string redKeyBase = $"{ComLib.machineUnloadArea(sheetID)}"; // se vuoto scrivo VUOTO... if (!memLayer.ML.redKeyPresent(redKey)) { @@ -65,91 +56,8 @@ namespace NKC_WF.Controllers // se vuoto lo calcolo... { answ = ComLib.getCurrentCss(sheetID); -#if false - string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); - 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) - { - // ciclo! - foreach (var item in tabItems) - { - // 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 = ComLib.saveItemData(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); - - // FIX CART - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); - - // FIX Scaricati - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); - - // FIX SEC-OP - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); - - // FIXED SEL da array oggetti selezionati... - 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 = ""; - } - - // 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(redKey, answ, dataCacheTTL); -#endif } - + // restituisco css return answ; } From e2cbc49d48fa1aa8fd56dd8ad023df6ae5b4e1ae Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 19:11:16 +0100 Subject: [PATCH 36/37] Primo OK x lampeggio se selezionato in SMART (ma indica NONs caricabile) --- AppData/ComLib.cs | 147 ++++++- Jenkinsfile | 2 +- .../WebUserControls/cmp_MU_suggestions.ascx | 4 +- NKC_WF/WebUserControls/cmp_menuTop.ascx.cs | 2 +- .../WebUserControls/cmp_unloadSmart.ascx.cs | 79 +++- .../cmp_unloadSmart.ascx.designer.cs | 390 +++++++++--------- 6 files changed, 400 insertions(+), 224 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 409bd96..6840eee 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -151,7 +151,7 @@ namespace AppData { string answ = ""; // recupero ultima call - string redKey = $"{ComLib.redNestAnsw}:LAST_CALL"; + string redKey = $"{redNestAnsw}:LAST_CALL"; answ = memLayer.ML.getRSV(redKey); return answ; } @@ -439,7 +439,7 @@ namespace AppData if (hasValReq) { // invia a redis una richiesta... - ComLib.sendMaterials(); + sendMaterials(); // recupero PRIMO batchID da validare int nextBatchId = 0; try @@ -451,7 +451,7 @@ namespace AppData if (nextBatchId > 0) { // richiedo! - ComLib.sendBatchReq(nextBatchId, "Estimation", 1); + sendBatchReq(nextBatchId, "Estimation", 1); // registro su DB nesting iniziato... QUANDO MI RISPONDE dovrò verificare che era un abtch x VALIDAZIONE DataLayer.man.taBL.updateStatus(nextBatchId, (int)BatchStatus.EstimationRequested, "", 0); answ = true; @@ -863,9 +863,9 @@ namespace AppData foreach (Part currItem in PartList) { // calcolo parametri... - PostProcList = ComLib.getPostProcList(currItem.OptParameters); - ProcessesReq = ComLib.getProcessesReq(currItem.OptParameters); - pdfFilePath = ComLib.getPdfFilePath(currItem.OptParameters); + PostProcList = getPostProcList(currItem.OptParameters); + ProcessesReq = getProcessesReq(currItem.OptParameters); + pdfFilePath = getPdfFilePath(currItem.OptParameters); DataLayer.man.taIL.updateFromNesting(currItem.PartId, currItem.MatId, PostProcList, ProcessesReq, pdfFilePath); } } @@ -1451,7 +1451,7 @@ namespace AppData ///
/// /// - public bool resetPostUnload(int SheetID = 0) + public bool resetSheetUnload(int SheetID = 0) { bool answ = false; try @@ -1470,9 +1470,8 @@ namespace AppData /// public static string getCurrentCss(int sheetID) { - // recupero da REDIS! - string redKey = $"{ComLib.machineUnloadArea(sheetID)}:Css"; - string redKeyBase = $"{ComLib.machineUnloadArea(sheetID)}"; + // area REDIS! + string redKeyBase = $"{machineUnloadArea(sheetID)}"; // TTL standard int dataCacheTTL = memLayer.ML.cdvi("cssCacheTTL"); dataCacheTTL = dataCacheTTL <= 0 ? 60 : dataCacheTTL; @@ -1519,18 +1518,22 @@ namespace AppData // FIX BIN - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); + answ = updateCssByItemList(answ, redKeyBase, "ItemsBin", itemsBin, dataCacheTTL); // FIX CART - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); + answ = updateCssByItemList(answ, redKeyBase, "ItemsCart", itemsCart, dataCacheTTL); // FIX Scaricati - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); + answ = updateCssByItemList(answ, redKeyBase, "ItemsDepo", itemsDepo, dataCacheTTL); // FIX SEC-OP - answ = ComLib.saveItemData(answ, redKeyBase, "ItemsSecOp", itemsSecOp, dataCacheTTL); + 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)) { @@ -1550,17 +1553,89 @@ namespace AppData // 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(redKey, answ, dataCacheTTL); + memLayer.ML.setRSV($"{redKeyBase}:Css", answ, dataCacheTTL); return answ; } + /// + /// Registra che un dato ITEM è stato prelevato in fase di scarico da ID foglio + datamatrix + /// + /// ID foglio + /// Cod del device di scarico + /// Cod datamatrix ITEM + /// + public static bool saveItemPickup(int sheetID, string deviceId, string itemDtmx) + { + // area REDIS! + string redKeyBase = $"{machineUnloadArea(sheetID)}"; + bool answ = false; + string rawData = memLayer.ML.getRSV($"{redKeyBase}:ItemsSel"); + Dictionary dictData = new Dictionary(); + if (!string.IsNullOrEmpty(rawData)) + { + dictData = JsonConvert.DeserializeObject>(rawData); + } + try + { + // cerco chiave device... + if (dictData.ContainsKey(deviceId)) + { + // sostituisco + dictData[deviceId] = itemDtmx; + } + else + { + dictData.Add(deviceId, itemDtmx); + } + // salvo! + rawData = JsonConvert.SerializeObject(dictData); + memLayer.ML.setRSV($"{redKeyBase}:ItemsSel", rawData); + answ = true; + // reset memoria redis del CSS x obbligare refresh... + memLayer.ML.setRSV($"{redKeyBase}:Css", ""); + } + catch + { } + return answ; + } + /// + /// Registra che un dato ITEM è stato prelevato in fase di scarico da ID foglio + datamatrix + /// + /// ID foglio + /// Cod del device di scarico + /// + public static bool resetItemPickup(int sheetID, string deviceId) + { + // area REDIS! + string redKeyBase = $"{machineUnloadArea(sheetID)}"; + bool answ = false; + string rawData = memLayer.ML.getRSV($"{redKeyBase}:ItemsSel"); + if (!string.IsNullOrEmpty(rawData)) + { + try + { + Dictionary dictData = JsonConvert.DeserializeObject>(rawData); + // cerco chiave device... + if (dictData.ContainsKey(deviceId)) + { + // sostituisco + dictData.Remove(deviceId); + } + answ = true; + } + catch + { } + } + return answ; + } /// /// Processa elenco items e salva in redis valori x css, elenchi, ... @@ -1571,7 +1646,7 @@ namespace AppData /// Elenco items specifici /// TTL della cache x salvataggio valori /// - public static string saveItemData(string currCss, string redKeyBase, string varName, List itemList, int dataCacheTTL) + public static string updateCssByItemList(string currCss, string redKeyBase, string varName, List itemList, int dataCacheTTL) { string replaceVal = ""; if (itemList.Count > 0) @@ -1586,7 +1661,6 @@ namespace AppData } // FIX CSS! currCss = currCss.Replace($"#{varName}", replaceVal); - replaceVal = ""; //serializzo e salvo string serVal = JsonConvert.SerializeObject(itemList); memLayer.ML.setRSV($"{redKeyBase}:{varName}", serVal, dataCacheTTL); @@ -1594,6 +1668,43 @@ namespace AppData return currCss; } + /// + /// Processa elenco items e salva in redis valori x css, elenchi, ... + /// + /// CSS corrente + /// HASH abse x area REDIS + /// nome variabile x elenco items + /// TTL della cache x salvataggio valori + /// + public static string updateCssByPickedItems(string currCss, string redKeyBase, string varName, int dataCacheTTL) + { + string replaceVal = ""; + string rawData = memLayer.ML.getRSV($"{redKeyBase}:ItemsSel"); + if (!string.IsNullOrEmpty(rawData)) + { + try + { + Dictionary dictData = JsonConvert.DeserializeObject>(rawData); + // ciclo x cercare x ogni chiave (sessione utente) + foreach (var item in dictData) + { + replaceVal += $"#{item.Value},"; + } + if (replaceVal.Length > 1) + { + replaceVal = replaceVal.Remove(replaceVal.Length - 1); + } + // FIX CSS! + currCss = currCss.Replace("#ItemsSel", replaceVal); + } + catch + { } + + } + return currCss; + } + + #endregion } diff --git a/Jenkinsfile b/Jenkinsfile index 13629a5..58d5d60 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=209']) { + withEnv(['NEXT_BUILD_NUMBER=211']) { // 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_MU_suggestions.ascx b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx index d250e45..ac2ef7a 100644 --- a/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_suggestions.ascx @@ -21,7 +21,9 @@
-
+
+

W.I.P.

+ (procedure under revision)
diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs b/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs index 31e2e10..2d85a2a 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx.cs @@ -110,7 +110,7 @@ namespace NKC_WF.WebUserControls if (doFullReset) { // reset REDIS x css - ComLib.man.resetPostUnload(); + ComLib.man.resetSheetUnload(); // aggiorno vocabolario DataWrap.DW.resetVocabolario(); // reset dati in cache x DbConfig... diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index c1c3a6b..4c810cd 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -9,6 +9,39 @@ namespace NKC_WF.WebUserControls protected bool showBin = false; protected bool showCart = false; protected bool showSecOp = false; + /// + /// ID univoco da IP + /// + protected string deviceId = "AAA"; + + /// + /// Batch selezionato + /// + protected int BatchID; + /// + /// Sheet selezionato... + /// + protected int SheetID; + /// + /// IP del device + /// + /// + protected string GetIPAddress() + { + System.Web.HttpContext context = System.Web.HttpContext.Current; + string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; + + if (!string.IsNullOrEmpty(ipAddress)) + { + string[] addresses = ipAddress.Split(','); + if (addresses.Length != 0) + { + return addresses[0]; + } + } + + return context.Request.ServerVariables["REMOTE_ADDR"]; + } protected string secOp { get @@ -20,11 +53,27 @@ namespace NKC_WF.WebUserControls hfSecOp.Value = value; } } + /// + /// Aggiorna dati correnti (IP, batch, sheet...) + /// + protected void updateCurrData() + { + //!!!FIXME!!! fare calcolo del VERO batch corrente... + BatchID = 242; + // FORSE 5/5?!? + var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchID, 3, 5); + if (sheetList.Count > 0) + { + SheetID = sheetList[0].SheetID; + } + } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { + deviceId = GetIPAddress().Replace(".", "_"); resetIcons(); + updateCurrData(); } cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; cmp_barcode.eh_doReset += Cmp_barcode_eh_doReset; @@ -82,15 +131,6 @@ namespace NKC_WF.WebUserControls cmp_barcode.inputAcquired = ""; // aggiorno... doUpdate(); -#if false - // se richiesto faccio raiseEvent - if (doRaiseEv) - { - cmp_stackNextloading.doUpdate(); - raiseEvent(); - } -#endif - } private bool processLastCmd(bool doRaiseEv) @@ -102,13 +142,17 @@ namespace NKC_WF.WebUserControls { case codeType.UNK: cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action"); + // elimino item sel... + ComLib.resetItemPickup(SheetID, deviceId); doRaiseEv = true; break; case codeType.Item: + tryPickup(decoData.rawData); cmp_barcode.showOutput("badge badge-success", $"Valid IT Code: {decoData.rawData}"); processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt); break; case codeType.ItemGeneric: + tryPickup(decoData.rawData); cmp_barcode.showOutput("badge badge-success", $"Valid IG Code: {decoData.rawData}"); processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt); break; @@ -138,11 +182,24 @@ namespace NKC_WF.WebUserControls break; default: cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action"); + // elimino item sel... + ComLib.resetItemPickup(SheetID, deviceId); break; } return doRaiseEv; } + /// + /// Prova a fare pickup (SOLO SE il mio item è nel foglio corrente...) + /// + /// + protected void tryPickup(string itemDtmx) + { + // salvo in item sel... + updateCurrData(); + deviceId = GetIPAddress().Replace(".", "0").Replace(":", "0"); + ComLib.saveItemPickup(SheetID, deviceId, itemDtmx); + } /// /// Processo il DataMatrix letto @@ -199,6 +256,8 @@ namespace NKC_WF.WebUserControls // dichiaro che è depositato DataLayer.man.taIL.updateStatus(itemIdSelected, 4, "WRK001"); lblDestination.Text = $"Item {itemIdSelected} PUT IN CART {rawData}"; + // elimino item sel... + ComLib.resetItemPickup(SheetID, deviceId); } } break; @@ -217,6 +276,8 @@ namespace NKC_WF.WebUserControls // dichiaro che è depositato DataLayer.man.taIL.updateStatus(itemIdSelected, 5, "WRK001"); lblDestination.Text = $"Item {itemIdSelected} PUT IN BIN {rawData}"; + // elimino item sel... + ComLib.resetItemPickup(SheetID, deviceId); } } break; diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs index 7ec4d2b..f458543 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs @@ -7,198 +7,200 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF.WebUserControls { - - - public partial class cmp_unloadSmart { - - /// - /// Controllo cmp_barcode. - /// - /// - /// 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_barcode cmp_barcode; - - /// - /// Controllo hfLastBCode. - /// - /// - /// 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.HiddenField hfLastBCode; - - /// - /// Controllo hfLastValidBCode. - /// - /// - /// 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.HiddenField hfLastValidBCode; - - /// - /// Controllo divItemDet. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItemDet; - - /// - /// Controllo hfItemID. - /// - /// - /// 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.HiddenField hfItemID; - - /// - /// Controllo lblItemCode. - /// - /// - /// 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 lblItemCode; - - /// - /// Controllo lblItemDesc. - /// - /// - /// 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 lblItemDesc; - - /// - /// Controllo lblItemDtmx. - /// - /// - /// 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 lblItemDtmx; - - /// - /// Controllo divItemError. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItemError; - - /// - /// Controllo lblErrorMsg. - /// - /// - /// 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 lblErrorMsg; - - /// - /// Controllo hfSecOp. - /// - /// - /// 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.HiddenField hfSecOp; - - /// - /// Controllo icnCart. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl icnCart; - - /// - /// Controllo icnBin. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl icnBin; - - /// - /// Controllo icnSecOp. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl icnSecOp; - - /// - /// Controllo lbtCancel. - /// - /// - /// 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.LinkButton lbtCancel; - - /// - /// Controllo lblLastBCode. - /// - /// - /// 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 lblLastBCode; - - /// - /// Controllo lblMessage. - /// - /// - /// 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 lblMessage; - - /// - /// Controllo lblDestination. - /// - /// - /// 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 lblDestination; - - /// - /// Controllo lbtScrapped. - /// - /// - /// 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.LinkButton lbtScrapped; - - /// - /// Controllo lbtParkArea. - /// - /// - /// 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.LinkButton lbtParkArea; - - /// - /// Controllo lbtResetSel. - /// - /// - /// 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.LinkButton lbtResetSel; - } +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_unloadSmart + { + + /// + /// Controllo cmp_barcode. + /// + /// + /// 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_barcode cmp_barcode; + + /// + /// Controllo hfLastBCode. + /// + /// + /// 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.HiddenField hfLastBCode; + + /// + /// Controllo hfLastValidBCode. + /// + /// + /// 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.HiddenField hfLastValidBCode; + + /// + /// Controllo divItemDet. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItemDet; + + /// + /// Controllo hfItemID. + /// + /// + /// 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.HiddenField hfItemID; + + /// + /// Controllo lblItemCode. + /// + /// + /// 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 lblItemCode; + + /// + /// Controllo lblItemDesc. + /// + /// + /// 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 lblItemDesc; + + /// + /// Controllo lblItemDtmx. + /// + /// + /// 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 lblItemDtmx; + + /// + /// Controllo divItemError. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItemError; + + /// + /// Controllo lblErrorMsg. + /// + /// + /// 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 lblErrorMsg; + + /// + /// Controllo hfSecOp. + /// + /// + /// 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.HiddenField hfSecOp; + + /// + /// Controllo icnCart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl icnCart; + + /// + /// Controllo icnBin. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl icnBin; + + /// + /// Controllo icnSecOp. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl icnSecOp; + + /// + /// Controllo lbtCancel. + /// + /// + /// 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.LinkButton lbtCancel; + + /// + /// Controllo lblLastBCode. + /// + /// + /// 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 lblLastBCode; + + /// + /// Controllo lblMessage. + /// + /// + /// 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 lblMessage; + + /// + /// Controllo lblDestination. + /// + /// + /// 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 lblDestination; + + /// + /// Controllo lbtScrapped. + /// + /// + /// 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.LinkButton lbtScrapped; + + /// + /// Controllo lbtParkArea. + /// + /// + /// 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.LinkButton lbtParkArea; + + /// + /// Controllo lbtResetSel. + /// + /// + /// 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.LinkButton lbtResetSel; + } } From 83610491d332a8290e0d8ac0bc45e2458f15c5f1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 21:31:22 +0100 Subject: [PATCH 37/37] Pulizia codice e creazione metodi x salvare parametri correnti macchina --- AppData/ComLib.cs | 129 +++++++++++++++--- Jenkinsfile | 2 +- NKC_SDK/Objects.cs | 3 +- .../WebUserControls/cmp_unloadSmart.ascx.cs | 22 +-- 4 files changed, 115 insertions(+), 41 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 6840eee..4d15966 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -126,23 +126,6 @@ namespace AppData return answ; } - //public object getEstAnsw(int BatchId) - //{ - // List answ = null; - - // var collNAA = database.GetCollection("NestAnswArchive"); - // // oggetto filtraggio x nest answ - // var builderNAA = Builders.Filter; - // var filtBatchId = builderNAA.Eq(u => u.BatchID, BatchId); - - // var datiCorrenti = collNAA.Find(filtBatchId); - // foreach (var item in datiCorrenti) - // { - - // } - // return answ; - //} - /// /// restitusice ultima chiamata REST registrata su REDIS /// @@ -1704,6 +1687,118 @@ namespace AppData return currCss; } + /// + /// IP del device + /// + /// + public static string GetIPAddress() + { + HttpContext context = HttpContext.Current; + string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; + + if (!string.IsNullOrEmpty(ipAddress)) + { + string[] addresses = ipAddress.Split(','); + if (addresses.Length != 0) + { + return addresses[0]; + } + } + + return context.Request.ServerVariables["REMOTE_ADDR"]; + } + + /// + /// Calcola area REDIS per MACCHINA + /// + /// + /// + public static string machineArea(string machineCod) + { + string answ = memLayer.ML.redHash($"currMachineData:{machineCod}"); + return answ; + } + /// + /// Fornisce un dictionary di valori ATTUALI per una specifica macchina + /// + /// + /// + public Dictionary getCurrMachineData(string machineCod) + { + Dictionary answ = new Dictionary(); + // cerco in REDIS + string rawData = memLayer.ML.getRSV(machineArea(machineCod)); + if (!string.IsNullOrEmpty(rawData)) + { + answ = JsonConvert.DeserializeObject>(rawData); + } + else + { + // se non trovo creo un oggetto NUOVO e vuoto x ogni oggetto... e salvo... + answ.Add("BatchID", "0"); + answ.Add("SheetID_load", "0"); + answ.Add("SheetID_print", "0"); + answ.Add("SheetID_work", "0"); + answ.Add("SheetID_unload", "0"); + // serializzo e salvo! + saveMachineData(machineCod, answ); + } + // restituisco! + return answ; + } + /// + /// Salvataggio array dati di una macchina + /// + /// + /// + /// + public bool saveMachineData(string machineCod, Dictionary paramsArray) + { + bool answ = false; + try + { + // serializzo e salvo! + string rawData = JsonConvert.SerializeObject(paramsArray); + memLayer.ML.setRSV(machineArea(machineCod), rawData); + answ = true; + } + catch + { } + // restituisco! + return answ; + } + /// + /// Fornisce un dictionary di valori ATTUALI per una specifica macchina + /// + /// + /// + /// + /// + public bool saveMachineParam(string machineCod, string Key, string Val) + { + bool answ = false; + // recupero i dati + try + { + var currData = getCurrMachineData(machineCod); + // aggiorno il record + if (currData.ContainsKey(Key)) + { + currData[Key] = Val; + } + // oppure aggiungo... + else + { + currData.Add(Key, Val); + } + // salvo... + saveMachineData(machineCod, currData); + answ = true; + } + catch + { } + return answ; + } #endregion diff --git a/Jenkinsfile b/Jenkinsfile index 58d5d60..194d45c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=211']) { + withEnv(['NEXT_BUILD_NUMBER=212']) { // 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_SDK/Objects.cs b/NKC_SDK/Objects.cs index 6cb2ad3..c302bb4 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -440,7 +440,6 @@ namespace NKC_SDK #endregion - #region classi per PROD /// @@ -609,5 +608,5 @@ namespace NKC_SDK #endregion - + } diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs index 4c810cd..3677ebe 100644 --- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs @@ -22,26 +22,7 @@ namespace NKC_WF.WebUserControls /// Sheet selezionato... /// protected int SheetID; - /// - /// IP del device - /// - /// - protected string GetIPAddress() - { - System.Web.HttpContext context = System.Web.HttpContext.Current; - string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; - if (!string.IsNullOrEmpty(ipAddress)) - { - string[] addresses = ipAddress.Split(','); - if (addresses.Length != 0) - { - return addresses[0]; - } - } - - return context.Request.ServerVariables["REMOTE_ADDR"]; - } protected string secOp { get @@ -66,12 +47,12 @@ namespace NKC_WF.WebUserControls { SheetID = sheetList[0].SheetID; } + deviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0"); } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { - deviceId = GetIPAddress().Replace(".", "_"); resetIcons(); updateCurrData(); } @@ -197,7 +178,6 @@ namespace NKC_WF.WebUserControls { // salvo in item sel... updateCurrData(); - deviceId = GetIPAddress().Replace(".", "0").Replace(":", "0"); ComLib.saveItemPickup(SheetID, deviceId, itemDtmx); }