diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 9684f40..fe63964 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -17599,24 +17599,24 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[8].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[9] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[9].Connection = this.Connection; - this._commandCollection[9].CommandText = "dbo.stp_Batch_getByMaxPosition"; + this._commandCollection[9].CommandText = "dbo.stp_Batch_getByStatus"; 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("@Position", 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("@Status", 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("@SearchVal", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PartValid", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[10].Connection = this.Connection; - this._commandCollection[10].CommandText = "dbo.stp_Batch_getByStatus"; + this._commandCollection[10].CommandText = "dbo.stp_Batch_getCurrentByMachine"; this._commandCollection[10].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SearchVal", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PartValid", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodPosition", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[11] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[11].Connection = this.Connection; - this._commandCollection[11].CommandText = "dbo.stp_Batch_getCurrentByMachine"; + this._commandCollection[11].CommandText = "dbo.stp_Batch_getForBunkMan"; this._commandCollection[11].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodPosition", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxPosition", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[12] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[12].Connection = this.Connection; this._commandCollection[12].CommandText = "dbo.stp_Batch_getLastByTakt"; @@ -17725,29 +17725,12 @@ namespace AppData.DS_AppTableAdapters { 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.BatchListDataTable getByMaxPosition(global::System.Nullable Position) { - this.Adapter.SelectCommand = this.CommandCollection[9]; - if ((Position.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Position.Value)); - } - else { - this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; - } - DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); - 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.BatchListDataTable getByStatus(global::System.Nullable Status, string SearchVal, global::System.Nullable PartValid) { - this.Adapter.SelectCommand = this.CommandCollection[10]; + this.Adapter.SelectCommand = this.CommandCollection[9]; if ((Status.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Status.Value)); } @@ -17776,7 +17759,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.BatchListDataTable getCurrentByMachine(string CodPosition) { - this.Adapter.SelectCommand = this.CommandCollection[11]; + this.Adapter.SelectCommand = this.CommandCollection[10]; if ((CodPosition == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -17788,6 +17771,23 @@ namespace AppData.DS_AppTableAdapters { 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.BatchListDataTable getForBunkMan(global::System.Nullable MaxPosition) { + this.Adapter.SelectCommand = this.CommandCollection[11]; + if ((MaxPosition.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MaxPosition.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); + 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")] @@ -18432,10 +18432,9 @@ namespace AppData.DS_AppTableAdapters { 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[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_Stacks_getNextByBatch"; + this._commandCollection[6].CommandText = "dbo.stp_Stacks_getNext"; 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("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_Stacks_insert"; @@ -18559,14 +18558,8 @@ 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.StackListDataTable getNextByBatch(global::System.Nullable BatchID) { + public virtual DS_App.StackListDataTable getNext() { this.Adapter.SelectCommand = this.CommandCollection[6]; - 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.StackListDataTable dataTable = new DS_App.StackListDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 3feb59e..6bdf531 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -99,7 +99,7 @@ FROM v_BatchList - + dbo.stp_Batch_fixRedoSheetOnEnd @@ -110,7 +110,7 @@ FROM v_BatchList - + dbo.stp_Batch_fixSched @@ -131,17 +131,6 @@ FROM v_BatchList - - - - dbo.stp_Batch_getByMaxPosition - - - - - - - @@ -166,6 +155,17 @@ FROM v_BatchList + + + + dbo.stp_Batch_getForBunkMan + + + + + + + @@ -207,7 +207,7 @@ FROM v_BatchList - + dbo.stp_Batch_redoPartValid @@ -218,7 +218,7 @@ FROM v_BatchList - + dbo.stp_Batch_resetAllNesting @@ -229,7 +229,7 @@ FROM v_BatchList - + dbo.stp_Batch_resetPartUnValid @@ -239,7 +239,7 @@ FROM v_BatchList - + dbo.stp_zzz_resetProdCall @@ -249,7 +249,7 @@ FROM v_BatchList - + dbo.stp_Batch_resetTree @@ -260,7 +260,7 @@ FROM v_BatchList - + dbo.stp_Batch_updateSchedPrior @@ -272,7 +272,7 @@ FROM v_BatchList - + dbo.stp_Batch_updateStatus @@ -370,13 +370,12 @@ FROM v_StackList - + - dbo.stp_Stacks_getNextByBatch + dbo.stp_Stacks_getNext - @@ -2450,7 +2449,7 @@ FROM v_CartKitDetail - + @@ -2500,7 +2499,7 @@ FROM v_CartKitDetail - + @@ -2525,7 +2524,7 @@ FROM v_CartKitDetail - + @@ -2580,7 +2579,7 @@ FROM v_CartKitDetail - + @@ -2653,7 +2652,7 @@ FROM v_CartKitDetail - + @@ -2661,7 +2660,7 @@ FROM v_CartKitDetail - + @@ -2730,7 +2729,7 @@ FROM v_CartKitDetail - + @@ -2763,7 +2762,7 @@ FROM v_CartKitDetail - + @@ -2804,7 +2803,7 @@ FROM v_CartKitDetail - + @@ -2823,7 +2822,7 @@ FROM v_CartKitDetail - + @@ -2847,7 +2846,7 @@ FROM v_CartKitDetail - + @@ -2855,7 +2854,7 @@ FROM v_CartKitDetail - + @@ -2872,7 +2871,7 @@ FROM v_CartKitDetail - + @@ -2881,7 +2880,7 @@ FROM v_CartKitDetail - + @@ -2912,7 +2911,7 @@ FROM v_CartKitDetail - + @@ -2920,7 +2919,7 @@ FROM v_CartKitDetail - + @@ -2936,7 +2935,7 @@ FROM v_CartKitDetail - + @@ -2944,7 +2943,7 @@ FROM v_CartKitDetail - + @@ -2972,7 +2971,7 @@ FROM v_CartKitDetail - + @@ -3008,7 +3007,7 @@ FROM v_CartKitDetail - + @@ -3024,7 +3023,7 @@ FROM v_CartKitDetail - + @@ -3034,7 +3033,7 @@ FROM v_CartKitDetail - + @@ -3051,7 +3050,7 @@ FROM v_CartKitDetail - + @@ -3064,7 +3063,7 @@ FROM v_CartKitDetail - + @@ -3114,7 +3113,7 @@ FROM v_CartKitDetail - + @@ -3140,7 +3139,7 @@ FROM v_CartKitDetail - + @@ -3182,7 +3181,7 @@ FROM v_CartKitDetail - + @@ -3399,18 +3398,18 @@ FROM v_CartKitDetail - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 48081cf..53a9e36 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,10 +4,10 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - + + @@ -27,7 +27,7 @@ - + diff --git a/Jenkinsfile b/Jenkinsfile index c08ea6c..2f285d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=277']) { + withEnv(['NEXT_BUILD_NUMBER=278']) { // env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/Controllers/SheetController.cs b/NKC_WF/Controllers/SheetController.cs index f9fdebf..b16f1e1 100644 --- a/NKC_WF/Controllers/SheetController.cs +++ b/NKC_WF/Controllers/SheetController.cs @@ -78,7 +78,8 @@ namespace NKC_WF.Controllers // NB. decodifico direttamente come oggetto, vedere qui: // https://weblog.west-wind.com/posts/2013/dec/13/accepting-raw-request-body-content-with-aspnet-web-api // https://weblog.west-wind.com/posts/2017/sep/14/accepting-raw-request-body-content-in-aspnet-core-api-controllers - + int BunkId = 0; + int BatchId = 0; if (sheetUpdated != null) { // 2020.01.16 salvo su mongoDb la risposta... @@ -104,9 +105,18 @@ namespace NKC_WF.Controllers } // segnalo avanzamento su redis x pagina unload ComLib.advaceSheetRevByBunk(currSheet.BunkId); + // calcolo Batch + BunkId = currSheet.BunkId; } } + var tabBunks = DataLayer.man.taSTL.getByKey(BunkId); + if (tabBunks.Count > 0) + { + BatchId = tabBunks[0].BatchID; + } } + // ricalcolo stato BUNK + ComLib.updateBatchPosition(BatchId); // INVALIDO eventuale valore BUNK in REDIS... ComLib.resetRedisBunkData(); } @@ -133,6 +143,7 @@ namespace NKC_WF.Controllers // procedo a deserializzare in blocco l'oggetto... try { + int BunkId = 0; // deserializzo. SheetWorkList sheetUpdated = JsonConvert.DeserializeObject(content); if (sheetUpdated != null) @@ -150,16 +161,19 @@ namespace NKC_WF.Controllers DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status); // SE machining completato --> status a LAVORATO x item! if (currSheet.Machining.DtEnd != null) - { + { // hard coded su multiax DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "WRK001"); } // segnalo avanzamento su redis x pagina unload ComLib.advaceSheetRevByBunk(currSheet.BunkId); + BunkId = currSheet.BunkId; answ = "OK"; } } } + // ricalcolo stato BUNK + ComLib.updateBatchPosition(BunkId); } } catch (Exception exc) diff --git a/NKC_WF/Site.Master b/NKC_WF/Site.Master index 6adb7d0..0cd4987 100644 --- a/NKC_WF/Site.Master +++ b/NKC_WF/Site.Master @@ -52,8 +52,12 @@
- - + + + + + +
diff --git a/NKC_WF/Site.Master.designer.cs b/NKC_WF/Site.Master.designer.cs index 6b14c6b..5106462 100644 --- a/NKC_WF/Site.Master.designer.cs +++ b/NKC_WF/Site.Master.designer.cs @@ -11,34 +11,43 @@ namespace NKC_WF { - public partial class SiteMaster - { + public partial class SiteMaster + { - /// - /// Controllo cmp_menuTop. - /// - /// - /// 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_menuTop cmp_menuTop; + /// + /// Controllo cmp_menuTop. + /// + /// + /// 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_menuTop cmp_menuTop; - /// - /// Controllo MainContent. - /// - /// - /// 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.ContentPlaceHolder MainContent; + /// + /// Controllo uplBody. + /// + /// + /// 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 uplBody; - /// - /// Controllo cmp_footer. - /// - /// - /// 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_footer cmp_footer; - } + /// + /// Controllo MainContent. + /// + /// + /// 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.ContentPlaceHolder MainContent; + + /// + /// Controllo cmp_footer. + /// + /// + /// 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_footer cmp_footer; + } } diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx b/NKC_WF/WebUserControls/cmp_barcode.ascx index c5663ef..dc5f8d2 100644 --- a/NKC_WF/WebUserControls/cmp_barcode.ascx +++ b/NKC_WF/WebUserControls/cmp_barcode.ascx @@ -2,4 +2,5 @@
+
diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs index 0364ae2..17f0903 100644 --- a/NKC_WF/WebUserControls/cmp_barcode.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_barcode.ascx.cs @@ -3,56 +3,99 @@ using System.Web.UI; namespace NKC_WF.WebUserControls { - public partial class cmp_barcode : BaseUserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class cmp_barcode : BaseUserControl { - if (!Page.IsPostBack) - { - resetMessage(); - } - else if (inputAcquired == "") - { - raiseEvent(); - } - } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + resetMessage(); + } + else if (string.IsNullOrEmpty(inputAcquired)) + { + checkRaiseEv(); + } + } - public void resetMessage() - { - lblOutput.Visible = false; - lblOutput.Text = ""; - } + protected string lastCmd + { + get + { + return hfLastCmd.Value; + } + set + { + hfLastCmd.Value = value; + } + } - protected void txtBarcode_TextChanged(object sender, EventArgs e) - { - raiseEvent(); + public void resetMessage() + { + lblOutput.Visible = false; + lblOutput.Text = ""; + } + + protected void txtBarcode_TextChanged(object sender, EventArgs e) + { + checkRaiseEv(); + } + + private void checkRaiseEv() + { + if (lastCmd != inputAcquired) + { + // alzo evento SOLO SE il nuovo valore è diverso da null... + lastCmd = inputAcquired; + if (!string.IsNullOrEmpty(inputAcquired)) + { + raiseEvent(); + } + } + else + { + if(string.IsNullOrEmpty(lastCmd)) + { + resetMessage(); + } + } + txtBarcode.Focus(); + } + + /// + /// Valore acquisito in lettura barcode + /// + public string inputAcquired + { + get + { + return txtBarcode.Text.Trim(); + } + set + { + txtBarcode.Text = ""; + } + } + /// + /// Reset input del barcode SENZA generare evento... + /// + /// + public void resetInput() + { + inputAcquired = ""; + txtBarcode.Focus(); + } + /// + /// Gestione output da mostrare (opzionale + /// + /// + /// + public void showOutput(string cssClass, string messaggio) + { + // In primis: mostro qualcosa SOLO SE ho del testo + lblOutput.Visible = (messaggio != ""); + lblOutput.Text = messaggio; + lblOutput.Attributes.Remove("class"); + lblOutput.Attributes.Add("class", cssClass); + } } - /// - /// Valore acquisito in lettura barcode - /// - public string inputAcquired - { - get - { - return txtBarcode.Text.Trim(); - } - set - { - txtBarcode.Text = ""; - } - } - /// - /// Gestione output da mostrare (opzionale - /// - /// - /// - public void showOutput(string cssClass, string messaggio) - { - // In primis: mostro qualcosa SOLO SE ho del testo - lblOutput.Visible = (messaggio != ""); - lblOutput.Text = messaggio; - lblOutput.Attributes.Remove("class"); - lblOutput.Attributes.Add("class", cssClass); - } - } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_barcode.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_barcode.ascx.designer.cs index 7acd04b..6f70ae0 100644 --- a/NKC_WF/WebUserControls/cmp_barcode.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_barcode.ascx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF.WebUserControls { - - - public partial class cmp_barcode { - +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_barcode + { + /// /// Controllo txtBarcode. /// @@ -20,7 +22,7 @@ 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.TextBox txtBarcode; - + /// /// Controllo lblOutput. /// @@ -29,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.Label lblOutput; + + /// + /// Controllo hfLastCmd. + /// + /// + /// 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 hfLastCmd; } } diff --git a/NKC_WF/WebUserControls/cmp_orderRunning.ascx b/NKC_WF/WebUserControls/cmp_orderRunning.ascx index 99edb21..3ad669b 100644 --- a/NKC_WF/WebUserControls/cmp_orderRunning.ascx +++ b/NKC_WF/WebUserControls/cmp_orderRunning.ascx @@ -1,6 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_orderRunning.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_orderRunning" %> +

<%: traduci("RunningOrders") %>

diff --git a/NKC_WF/WebUserControls/cmp_orderSched.ascx b/NKC_WF/WebUserControls/cmp_orderSched.ascx index 4815d09..be87a9b 100644 --- a/NKC_WF/WebUserControls/cmp_orderSched.ascx +++ b/NKC_WF/WebUserControls/cmp_orderSched.ascx @@ -1,6 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_orderSched.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_orderSched" %> +

<%: traduci("ScheduledOrders") %>

@@ -26,4 +27,4 @@ - \ No newline at end of file + diff --git a/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs b/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs index 83ab54e..55093f0 100644 --- a/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_orderSched.ascx.cs @@ -1,4 +1,5 @@ using AppData; +using SteamWare; using System; using System.Collections.Generic; using System.Linq; @@ -66,7 +67,9 @@ namespace NKC_WF.WebUserControls DataLayer.man.taBL.updateSchedPrior(BatchId, step); // ricalcolo fixSchedOrd(); + grView.SelectedIndex = -1; grView.DataBind(); + lblTitle.Focus(); } /// /// Verifica visibilità da posizione diff --git a/NKC_WF/WebUserControls/cmp_orderSched.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_orderSched.ascx.designer.cs index 461ef53..484c969 100644 --- a/NKC_WF/WebUserControls/cmp_orderSched.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_orderSched.ascx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF.WebUserControls public partial class cmp_orderSched { + /// + /// 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 grView. /// diff --git a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs index fe279e0..f685012 100644 --- a/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackBuilding.ascx.cs @@ -5,161 +5,161 @@ using System.Web.UI; namespace NKC_WF.WebUserControls { - public partial class cmp_stackBuilding : BaseUserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class cmp_stackBuilding : BaseUserControl { - if (!Page.IsPostBack) - { - // svuoto input barcode... - cmp_barcode.inputAcquired = ""; - lastCmd = ""; - // pulisco dir temp dai file dei cartellini stampati - reportPrinter.obj.pulisciDir(); - } - cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; - } - // se NON ci sono altri campi "next" allora posso msotrare stampa... - private void checkPrint() - { - DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); - // se tab vuota --> HO FINITO, mostro stampa... - divPrint.Visible = (nextTbl.Count == 0); - } - - /// - /// Comando barcode letto - /// - protected string lastCmd - { - get - { - return hfBarcode.Value; - } - set - { - hfBarcode.Value = value; - } - } - - private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e) - { - // processo evento.. - lastCmd = cmp_barcode.inputAcquired.ToUpper(); - // processiamo barcode letto - decodedData decoData = DataLayer.man.decodeBcode(lastCmd); - switch (decoData.codeType) - { - case codeType.UNK: - cmp_barcode.showOutput("text-danger", "Unknown Data"); - break; - case codeType.Item: - case codeType.ItemGeneric: - cmp_barcode.showOutput("text-warning", "Item - ignored"); - break; - case codeType.Material: - // 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) - { - cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}"); - } - // se ho valori --> controllo se corretto... - else - { - string codReq = nextTbl[0].MatExtCode.ToString(); - if (codReq == decoData.codeInt.ToString()) + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) { - cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); - // chiamo stored x indicare preparato - DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); + // svuoto input barcode... + cmp_barcode.inputAcquired = ""; + lastCmd = ""; + // pulisco dir temp dai file dei cartellini stampati + reportPrinter.obj.pulisciDir(); + } + cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; + } + // se NON ci sono altri campi "next" allora posso msotrare stampa... + private void checkPrint() + { + DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); + // se tab vuota --> HO FINITO, mostro stampa... + divPrint.Visible = (nextTbl.Count == 0); + } + + /// + /// Comando barcode letto + /// + protected string lastCmd + { + get + { + return hfBarcode.Value; + } + set + { + hfBarcode.Value = value; + } + } + + private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e) + { + // processo evento.. + lastCmd = cmp_barcode.inputAcquired.ToUpper(); + // processiamo barcode letto + decodedData decoData = DataLayer.man.decodeBcode(lastCmd); + switch (decoData.codeType) + { + case codeType.UNK: + cmp_barcode.showOutput("text-danger", "Unknown Data"); + break; + case codeType.Item: + case codeType.ItemGeneric: + cmp_barcode.showOutput("text-warning", "Item - ignored"); + break; + case codeType.Material: + // 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) + { + cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}"); + } + // se ho valori --> controllo se corretto... + else + { + string codReq = nextTbl[0].MatExtCode.ToString(); + if (codReq == decoData.codeInt.ToString()) + { + cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); + // chiamo stored x indicare preparato + DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); + } + else + { + cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); + } + } + break; + case codeType.Sheet: + cmp_barcode.showOutput("badge badge-warning", "Sheet - ignored"); + break; + case codeType.Stack: + cmp_barcode.showOutput("badge badge-warning", "Stack - ignored"); + break; + case codeType.Batch: + cmp_barcode.showOutput("badge badge-warning", "Batch - ignored"); + break; + default: + break; + } + // reset comando + cmp_barcode.resetInput(); + // aggiorno... + doUpdate(); + } + + public void doUpdate() + { + repCtrl.DataBind(); + checkPrint(); + } + + public int StackId + { + set + { + hfStackId.Value = value.ToString(); + lastCmd = ""; + cmp_barcode.resetMessage(); + ComLib.updateBatchPositionByBunk(value); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfStackId.Value, out answ); + return answ; + } + } + + public string cssFlashNext(object _isNext) + { + string answ = ""; + if (_isNext.ToString() == "1") + { + answ = " flashColor"; + } + return answ; + } + public string cssByPrepared(object _prepared, object _isNext) + { + string answ = "table-secondary border border-secondary border-thick rounded"; + if (_isNext.ToString() == "1") + { + answ = "table-primary flashColor rounded"; } else { - cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); + if (_prepared.ToString() != "") + { + answ = "table-success border border-success border-thick rounded"; + } } - } - break; - case codeType.Sheet: - cmp_barcode.showOutput("badge badge-warning", "Sheet - ignored"); - break; - case codeType.Stack: - cmp_barcode.showOutput("badge badge-warning", "Stack - ignored"); - break; - case codeType.Batch: - cmp_barcode.showOutput("badge badge-warning", "Batch - ignored"); - break; - default: - break; - } - // reset comando - cmp_barcode.inputAcquired = ""; - // aggiorno... - doUpdate(); - } - - public void doUpdate() - { - repCtrl.DataBind(); - checkPrint(); - } - - public int StackId - { - set - { - hfStackId.Value = value.ToString(); - lastCmd = ""; - cmp_barcode.resetMessage(); - ComLib.updateBatchPositionByBunk(value); - doUpdate(); - } - get - { - int answ = 0; - int.TryParse(hfStackId.Value, out answ); - return answ; - } - } - - public string cssFlashNext(object _isNext) - { - string answ = ""; - if (_isNext.ToString() == "1") - { - answ = " flashColor"; - } - return answ; - } - public string cssByPrepared(object _prepared, object _isNext) - { - string answ = "table-secondary border border-secondary border-thick rounded"; - if (_isNext.ToString() == "1") - { - answ = "table-primary flashColor rounded"; - } - else - { - if (_prepared.ToString() != "") - { - answ = "table-success border border-success border-thick rounded"; + return answ; + } + /// + /// Chiesta stampa stack corrente + /// + /// + /// + protected void lbtPrint_Click(object sender, EventArgs e) + { + // chiamo procedura stampa report x stack + string printer = DataLayer.man.getPrinter("PC-MACHINE-STACK-BUILD"); + DataLayer.man.stampaDoc(StackId.ToString(), printer, tipoDocumento.docStack, Request.UserHostName); + // aggiorno stato BATCH + ComLib.updateBatchPositionByBunk(StackId); } - } - return answ; } - /// - /// Chiesta stampa stack corrente - /// - /// - /// - protected void lbtPrint_Click(object sender, EventArgs e) - { - // chiamo procedura stampa report x stack - string printer = DataLayer.man.getPrinter("PC-MACHINE-STACK-BUILD"); - DataLayer.man.stampaDoc(StackId.ToString(), printer, tipoDocumento.docStack, Request.UserHostName); - // aggiorno stato BATCH - ComLib.updateBatchPositionByBunk(StackId); - } - } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx b/NKC_WF/WebUserControls/cmp_stackLoading.ascx index d3caba1..7e8b620 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx @@ -28,7 +28,7 @@
- <%: traduci("BunkReading") %> + <%: traduci("BatchCurrent") %>
TOT SHEETS: diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs index 7908706..2610210 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs @@ -76,7 +76,10 @@ namespace NKC_WF.WebUserControls bool doRaiseEv = false; // processo evento.. lastCmd = cmp_barcode.inputAcquired.ToUpper(); - if (lastCmd == "") doRaiseEv = true; + if (lastCmd == "") + { + doRaiseEv = true; + } // processiamo barcode letto decodedData decoData = DataLayer.man.decodeBcode(lastCmd); switch (decoData.codeType) @@ -178,7 +181,7 @@ namespace NKC_WF.WebUserControls break; } // reset comando - cmp_barcode.inputAcquired = ""; + cmp_barcode.resetInput(); // aggiorno... doUpdate(); // se richiesto faccio raiseEvent @@ -280,13 +283,11 @@ namespace NKC_WF.WebUserControls cmp_stackNextloading.doUpdate(); // segnalo avanzamento su redis x pagina unload ComLib.advaceSheetRevByBunk(BatchIdCurr); + // controllo update stato BATCH/BUNK + ComLib.updateBatchPosition(BatchIdCurr); raiseEvent(); } } - 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_stackNextloading.ascx b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx index 7a2088e..5dbbb7c 100644 --- a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx +++ b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx @@ -20,12 +20,12 @@
PREVIOUS BUNK: - (/2) + ()
CURRENT BUNK: - (/2) + ()
@@ -61,7 +61,7 @@
- <%: traduci("CollectRedo") %> + <%: traduci("CollectRedo") %>
@@ -70,7 +70,7 @@
NEXT BUNK: - (/2) + ()
sheets: | printed: @@ -99,14 +99,11 @@ - - - - +
- <%: traduci("CollectRedoOnEnd") %> + <%: traduci("CollectRedoOnEnd") %>
diff --git a/NKC_WF/WebUserControls/cmp_taktList.ascx b/NKC_WF/WebUserControls/cmp_taktList.ascx index 6947c24..36d8ba1 100644 --- a/NKC_WF/WebUserControls/cmp_taktList.ascx +++ b/NKC_WF/WebUserControls/cmp_taktList.ascx @@ -52,16 +52,11 @@
- <%-- - - - - --%> - + - +
diff --git a/NKC_WF/WebUserControls/cmp_taktList.ascx.cs b/NKC_WF/WebUserControls/cmp_taktList.ascx.cs index 821e4c6..426ab4f 100644 --- a/NKC_WF/WebUserControls/cmp_taktList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_taktList.ascx.cs @@ -160,6 +160,12 @@ namespace NKC_WF.WebUserControls case 2: answ = "table-success border border-success border-thick rounded"; break; + case 3: + answ = "table-warning border border-warning border-thick rounded"; + break; + case 4: + answ = "table-dark border border-dark border-thick rounded"; + break; default: break; } diff --git a/NKC_WF/site/MachineLoad.aspx.cs b/NKC_WF/site/MachineLoad.aspx.cs index f290b92..1f5a2fe 100644 --- a/NKC_WF/site/MachineLoad.aspx.cs +++ b/NKC_WF/site/MachineLoad.aspx.cs @@ -2,28 +2,34 @@ namespace NKC_WF { - public partial class MachineLoad : BasePage - { - protected void Page_Load(object sender, EventArgs e) + public partial class MachineLoad : BasePage { - if (!Page.IsPostBack) - { - ((SiteContent)this.Master).showSearch = false; - } - cmp_stackLoading.eh_doRefresh += Cmp_stackLoading_eh_doRefresh; - } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + ((SiteContent)this.Master).showSearch = false; + } + forceRefresh(); + cmp_stackLoading.eh_doRefresh += Cmp_stackLoading_eh_doRefresh; + } - private void Cmp_stackLoading_eh_doRefresh(object sender, EventArgs e) - { - cmp_ML_ShDet.BatchId = cmp_stackLoading.BatchIdCurr; - cmp_ML_ShDet1.BatchId = cmp_stackLoading.BatchIdCurr; - cmp_ML_ShDet2.BatchId = cmp_stackLoading.BatchIdCurr; - cmp_ML_ShDet3.BatchId = cmp_stackLoading.BatchIdCurr; - // refresh vari! - cmp_ML_ShDet.doUpdate(); - cmp_ML_ShDet1.doUpdate(); - cmp_ML_ShDet2.doUpdate(); - cmp_ML_ShDet3.doUpdate(); + private void Cmp_stackLoading_eh_doRefresh(object sender, EventArgs e) + { + forceRefresh(); + } + + private void forceRefresh() + { + cmp_ML_ShDet.BatchId = cmp_stackLoading.BatchIdCurr; + cmp_ML_ShDet1.BatchId = cmp_stackLoading.BatchIdCurr; + cmp_ML_ShDet2.BatchId = cmp_stackLoading.BatchIdCurr; + cmp_ML_ShDet3.BatchId = cmp_stackLoading.BatchIdCurr; + // refresh vari! + cmp_ML_ShDet.doUpdate(); + cmp_ML_ShDet1.doUpdate(); + cmp_ML_ShDet2.doUpdate(); + cmp_ML_ShDet3.doUpdate(); + } } - } } \ No newline at end of file diff --git a/NKC_WF/site/OrderScheduler.aspx b/NKC_WF/site/OrderScheduler.aspx index 8bff8b2..a039641 100644 --- a/NKC_WF/site/OrderScheduler.aspx +++ b/NKC_WF/site/OrderScheduler.aspx @@ -14,9 +14,7 @@
-

<%: traduci("RunningOrders") %>

-

<%: traduci("ScheduledOrders") %>

diff --git a/NKC_WF/site/StackManager.aspx b/NKC_WF/site/StackManager.aspx index f0f87cc..cb30b13 100644 --- a/NKC_WF/site/StackManager.aspx +++ b/NKC_WF/site/StackManager.aspx @@ -7,16 +7,20 @@ -
-
-
-

<%: traduci("StackManager") %>

-
- - - -
+
+
+
+

<%: traduci("StackManager") %>

+
+
+
+
+ + + +
+
+
+
-
-