diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 2bb8917..34c9a53 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -738,7 +738,17 @@ namespace AppData return answ; } /// - /// Salvo dati su PartList ricevuti da Nesting (COMPETATO) + /// Resetto i dati PRIMA di salvare i nuovi dati dal nesting + /// + /// + /// + public static void resetPrevDataFromNesting(int BatchID) + { + //elimino dati child MA NON il batch... + DataLayer.man.taBL.deleteTree(BatchID, 0); + } + /// + /// Salvo dati Bunks/Sheets/Parts ricevuti da Nesting (COMPETATO) /// /// /// diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 36bc43e..9376b0e 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -14158,7 +14158,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[10]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[11]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_SheetList"; @@ -14185,52 +14185,58 @@ namespace AppData.DS_AppTableAdapters { 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_getByStack"; + this._commandCollection[4].CommandText = "dbo.stp_Sheets_getBySheetID"; 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[4].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[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_Sheets_getNextByStack"; + this._commandCollection[5].CommandText = "dbo.stp_Sheets_getByStack"; 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("@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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_Sheets_insert"; + this._commandCollection[6].CommandText = "dbo.stp_Sheets_getNextByStack"; 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("@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_resetPrepared"; + this._commandCollection[7].CommandText = "dbo.stp_Sheets_insert"; 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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[8] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_Sheets_setPrepared"; + this._commandCollection[8].CommandText = "dbo.stp_Sheets_resetPrepared"; 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("@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].CommandText = "dbo.stp_Sheets_setPrepared"; 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, "", "", "")); + this._commandCollection[9].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[10] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[10].Connection = this.Connection; + this._commandCollection[10].CommandText = "dbo.stp_Sheets_updDate"; + 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("@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[10].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[10].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[10].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[10].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[10].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[10].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()] @@ -14307,10 +14313,10 @@ 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 getByStack(global::System.Nullable StackID) { + public virtual DS_App.SheetListDataTable getBySheetId(global::System.Nullable SheetID) { this.Adapter.SelectCommand = this.CommandCollection[4]; - if ((StackID.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); + if ((SheetID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SheetID.Value)); } else { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -14324,7 +14330,7 @@ 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 getNextByStack(global::System.Nullable StackID) { + public virtual DS_App.SheetListDataTable getByStack(global::System.Nullable StackID) { this.Adapter.SelectCommand = this.CommandCollection[5]; if ((StackID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(StackID.Value)); @@ -14341,8 +14347,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[6]; + 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[7]; if ((SheetIndex.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SheetIndex.Value)); } @@ -14422,34 +14445,6 @@ 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")] 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)); - } - 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 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)); @@ -14477,8 +14472,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[9]; + 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[10]; 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 045f938..d688bee 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -369,6 +369,17 @@ FROM v_SheetList + + + + dbo.stp_Sheets_getBySheetID + + + + + + + @@ -1999,7 +2010,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2047,7 +2058,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2069,7 +2080,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2124,7 +2135,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2197,7 +2208,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2205,7 +2216,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2274,7 +2285,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2307,7 +2318,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2333,7 +2344,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2352,7 +2363,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2376,7 +2387,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2384,7 +2395,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2401,7 +2412,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2410,7 +2421,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2441,7 +2452,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2449,7 +2460,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2465,7 +2476,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2473,7 +2484,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2501,7 +2512,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2537,7 +2548,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2553,7 +2564,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2563,7 +2574,7 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt - + @@ -2668,18 +2679,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 2455c52..7409636 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. --> - + - + diff --git a/Jenkinsfile b/Jenkinsfile index 0bafec8..ac456f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=221']) { + withEnv(['NEXT_BUILD_NUMBER=226']) { // 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}') @@ -84,28 +84,10 @@ pipeline { sleep 3 } }, - // SITE_IIS01: { - // if(env.enableIIS01 == "Y") - // { - // sleep 3 - // // SITE - // bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ NKC_WF/NKC_WF.csproj" - // sleep 1 - // } - // }, failFast: false) } else if (env.BRANCH_NAME == "develop") { parallel ( - // SITE_IIS02: { - // if(env.enableIIS02 == "Y") - // { - // sleep 1 - // // SITE - // bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ NKC_WF/NKC_WF.csproj" - // sleep 3 - // } - // }, SITE_IIS01: { if(env.enableIIS01 == "Y") { diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index c08bf1b..c223ff8 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -104,7 +104,7 @@ namespace NKC_WF.Controllers // deserializzo. baseNestAnsw batchProcAnsw = JsonConvert.DeserializeObject(content); - // se ho errori inizioa salvarli... + // se ho errori inizio a salvarli... if (batchProcAnsw.ErrorList.Count > 0) { // procedura idempotente: elimino eventuali dati della "busta" precedente... @@ -122,8 +122,8 @@ namespace NKC_WF.Controllers /************************************************* * IN BASE al tipo di risposta saprò se * - è BatchReq / OfflineOrder - * - è stima iniziale o dettaglio (x batch) - * - si tratta di una stima di validazione o meno... + * - è stima iniziale o NEST dettagliato + * - si tratta di una stima di validazione ITEM ... * *************************************************/ if (batchProcAnsw.OrderType == oType.BatchRequest) @@ -137,7 +137,7 @@ namespace NKC_WF.Controllers // 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" + // recupero info sul batch / KIT specifico x capire se sia di tipo "validation" bool isValidation = false; var tabOrd = DataLayer.man.taOL.getByBatch(rispStima.BatchID); if (tabOrd.Count > 0) @@ -255,17 +255,19 @@ namespace NKC_WF.Controllers bStatus = 2; break; } - // SALVO info riguardo al batch completato - DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime / 60); // aggiorno il resto SOLO SE status == completo... if (rispNest.ProcessStatus == procStatus.completed) { + // resetto le precedenti elaborazioni: elimino dati child MA NON il batch... + DataLayer.man.taBL.deleteTree(rispNest.BatchID, 0); // salvo info riguardo ai vari Bunk / Sheets / Items... ComLib.updateBunksFromNesting(rispNest.BatchID, rispNest.BunkList); // salvo info x CART & BINS previsti ComLib.updateBinsFromNesting(rispNest.BatchID, rispNest.BinList); ComLib.updateCartsFromNesting(rispNest.BatchID, rispNest.CartList); } + // SALVO info riguardo al batch completato + DataLayer.man.taBL.updateStatus(rispNest.BatchID, bStatus, rispNest.EnvNum, (decimal)rispNest.EstimatedWorktime / 60); // registro OK answ = "OK"; } diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 13e9884..790ecb7 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -334,6 +334,7 @@ + @@ -373,6 +374,8 @@ + + @@ -530,6 +533,13 @@ ASPXCodeBehind + + BatchPreview.aspx + ASPXCodeBehind + + + BatchPreview.aspx + Contact.aspx ASPXCodeBehind @@ -763,6 +773,20 @@ cmp_batchList.ascx + + cmp_BP_bunkList.ascx + ASPXCodeBehind + + + cmp_BP_bunkList.ascx + + + cmp_BP_sheetList.ascx + ASPXCodeBehind + + + cmp_BP_sheetList.ascx + cmp_devUtils.ascx ASPXCodeBehind @@ -1029,6 +1053,12 @@ + + Always + + + Always + Web.config diff --git a/NKC_WF/SHARE_NEST/.PlaceHolder.file b/NKC_WF/SHARE_NEST/.PlaceHolder.file new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/NKC_WF/SHARE_NEST/.PlaceHolder.file @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/NKC_WF/SHARE_SQL/.PlaceHolder.file b/NKC_WF/SHARE_SQL/.PlaceHolder.file new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/NKC_WF/SHARE_SQL/.PlaceHolder.file @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/NKC_WF/Web.Release.config b/NKC_WF/Web.Release.config index 6831f9c..54e54cd 100644 --- a/NKC_WF/Web.Release.config +++ b/NKC_WF/Web.Release.config @@ -5,11 +5,14 @@ - + + + - - + + + diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 2ca0e82..382a8f6 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -63,6 +63,7 @@ + diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx new file mode 100644 index 0000000..05377b7 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx @@ -0,0 +1,45 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BP_bunkList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BP_bunkList" %> + + + + + + + + + + No Record + + + + + + + + + + + + +
+ +
+
+ + +
+
Sheets: <%# Eval("NumSheetsPrepared") %> / <%# Eval("NumSheets") %>
+
items: <%# Eval("NumItems") %>
+
+
+ +
+ +
+
+ + + + + + diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs new file mode 100644 index 0000000..d3077de --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.cs @@ -0,0 +1,112 @@ +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_BP_bunkList : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + + protected void grView_RowCommand(object sender, GridViewCommandEventArgs e) + { + // recupero argomento = Takt... + try + { + string stack = e.CommandArgument.ToString(); + //lblStack.Text = stack; + } + catch + { } + } + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + checkVisibility(); + raiseEvent(); + } + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + private void checkVisibility() + { + //divSelected.Visible = StackIdSel > 0; + //grView.Visible = !divSelected.Visible; + //// imposto css titolo... + //string titleClass = "row font-weight-bold"; + //if (divSelected.Visible) + //{ + // titleClass += " table-info"; + //} + //divTitle.Attributes.Remove("class"); + //divTitle.Attributes.Add("class", titleClass); + } + public void resetSelezione() + { + //lblStack.Text = ""; + grView.SelectedIndex = -1; + grView.DataBind(); + checkVisibility(); + raiseEvent(); + } + /// + /// Indice selezionato + /// + public int selIndex + { + get + { + return grView.SelectedIndex; + } + set + { + grView.SelectedIndex = value; + } + } + /// + /// BunkId selezionato + /// + public int BunkIdSel + { + get + { + int answ = 0; + try + { + int.TryParse(grView.SelectedValue.ToString(), out answ); + } + catch + { } + return answ; + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs new file mode 100644 index 0000000..9772c52 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_bunkList.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// 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_BP_bunkList + { + + /// + /// 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 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; + } +} diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx new file mode 100644 index 0000000..908301d --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx @@ -0,0 +1,35 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BP_sheetList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BP_sheetList" %> + + + + + + + + + No Record + + + + + + + + + + + + + +
+ +
+
+ +
+
+ + + + + diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs new file mode 100644 index 0000000..eee7644 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.cs @@ -0,0 +1,86 @@ +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_BP_sheetList : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// Bunk corrente... + /// + public int BunkId + { + set + { + hfStackID.Value = value.ToString(); + grView.DataBind(); + } + get + { + int answ = 0; + int.TryParse(hfStackID.Value, out answ); + return answ; + } + } + // + /// Indice selezionato + /// + public int selIndex + { + get + { + return grView.SelectedIndex; + } + set + { + grView.SelectedIndex = value; + } + } + /// + /// SheetId selezionato + /// + public int SheetIdSel + { + get + { + int answ = 0; + try + { + int.TryParse(grView.SelectedValue.ToString(), out answ); + } + catch + { } + return answ; + } + } + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + public void resetSelezione() + { + //lblStack.Text = ""; + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(); + } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(); + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs new file mode 100644 index 0000000..7284886 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BP_sheetList.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// 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_BP_sheetList + { + + /// + /// 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 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; + } +} diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index cff9501..d463d19 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -5,23 +5,23 @@
-
+
-
+
-
+
-
+
-
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index 77db5ca..f2bca66 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -22,5 +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 2b34712..4f24d08 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -12,23 +12,6 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_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; - } - } /// /// Foglio corrente... /// @@ -37,6 +20,7 @@ namespace NKC_WF.WebUserControls set { hfSheetId.Value = value.ToString(); + doUpdate(); } get { @@ -45,24 +29,36 @@ namespace NKC_WF.WebUserControls return answ; } } + /// + /// Percorso file calcolato + /// + public string filename + { + get + { + return hfFilename.Value; + } + set + { + hfFilename.Value = value; + } + } public void doUpdate() { // recupero ID del foglio corrente string answ = ""; - string filename = ""; + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); try { - // FORSE 5/5?!? - var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); - if (sheetList.Count > 0) + var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId); + if (tabSheets.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); + filename = tabSheets[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); + if(memLayer.ML.CRB("userVirtDir")) + { + filename = Server.MapPath(filename); + } answ = File.ReadAllText(filename); } } @@ -70,6 +66,8 @@ namespace NKC_WF.WebUserControls { } if (answ == "") { + // loggo... + logger.lg.scriviLog($"SVG not found | filename: {filename} | baseOrig: {baseOrig} | baseCurr: {baseCurr} | used default SVG"); // leggo SVG DI DEFAULT che indica NON PRESENTE... filename = Server.MapPath("~/Images/NoData.svg"); answ = File.ReadAllText(filename); diff --git a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs index 6322cc7..52b6bbd 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs @@ -23,15 +23,6 @@ namespace NKC_WF.WebUserControls /// 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; - /// /// Controllo hfSheetId. /// @@ -40,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 hfSheetId; + + /// + /// Controllo hfFilename. + /// + /// + /// 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 hfFilename; } } diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index e9f9b64..d11cb97 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -60,6 +60,7 @@ + <%# BStatus(Eval("Status")) %> @@ -102,3 +103,4 @@
+
diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index 9abfdfd..55b7b43 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -138,6 +138,23 @@ namespace NKC_WF.WebUserControls } return answ; } + /// + /// Verifica se sia visualizzabile preview dato stato + /// + /// + /// + public bool isPreviewVisible(object _status) + { + bool answ = false; + int status = -1; + int.TryParse(_status.ToString(), out status); + if (status > 3) + { + answ = true; + } + return answ; + } + /// /// Converte il codice stato in effettivo campo /// diff --git a/NKC_WF/WebUserControls/cmp_devUtils.ascx b/NKC_WF/WebUserControls/cmp_devUtils.ascx index a68b48c..c52c181 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx @@ -10,5 +10,8 @@
SAVE
LAST Call
+
+ DEBUG
QRCode
+
diff --git a/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs index 9e4cc58..4292d9a 100644 --- a/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_devUtils.ascx.designer.cs @@ -40,5 +40,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 lbtSaveLastAnsw; + + /// + /// Controllo hlDbgQrCode. + /// + /// + /// 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.HyperLink hlDbgQrCode; } } diff --git a/NKC_WF/site/BatchPreview.aspx b/NKC_WF/site/BatchPreview.aspx new file mode 100644 index 0000000..c0df410 --- /dev/null +++ b/NKC_WF/site/BatchPreview.aspx @@ -0,0 +1,21 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="BatchPreview.aspx.cs" Inherits="NKC_WF.site.BatchPreview" %> + +<%@ Register Src="~/WebUserControls/cmp_BP_bunkList.ascx" TagPrefix="uc1" TagName="cmp_BP_bunkList" %> +<%@ Register Src="~/WebUserControls/cmp_MU_svgViewer.ascx" TagPrefix="uc1" TagName="cmp_MU_svgViewer" %> +<%@ Register Src="~/WebUserControls/cmp_BP_sheetList.ascx" TagPrefix="uc1" TagName="cmp_BP_sheetList" %> + + + +
+
+ +
+
+

Batch preview - start | pause | stop

+ +
+
+ +
+
+
diff --git a/NKC_WF/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs new file mode 100644 index 0000000..ca8f6ac --- /dev/null +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -0,0 +1,71 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.site +{ + public partial class BatchPreview : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + doUpdate(); + } + cmp_BP_bunkList.eh_doRefresh += Cmp_BP_bunkList_eh_doRefresh; + cmp_BP_sheetList.eh_doRefresh += Cmp_BP_sheetList_eh_doRefresh; + } + + private void Cmp_BP_sheetList_eh_doRefresh(object sender, EventArgs e) + { + // imposto sheet sul foglio... + cmp_MU_svgViewer.SheetId = cmp_BP_sheetList.SheetIdSel; + } + + private void Cmp_BP_bunkList_eh_doRefresh(object sender, EventArgs e) + { + // aggiorno sheets + cmp_BP_sheetList.BunkId = cmp_BP_bunkList.BunkIdSel; + } + + protected int bunkIndex + { + get + { + return cmp_BP_bunkList.selIndex; + } + set + { + cmp_BP_bunkList.selIndex = value; + } + } + protected int StackId + { + get + { + return cmp_BP_bunkList.BunkIdSel; + } + } + + private void doUpdate() + { + cmp_BP_bunkList.BatchId = BatchId; + } + + /// + /// Batch corrente... + /// + public int BatchId + { + get + { + int answ = memLayer.ML.QSI("BatchId"); + return answ; + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/site/BatchPreview.aspx.designer.cs b/NKC_WF/site/BatchPreview.aspx.designer.cs new file mode 100644 index 0000000..6395e3f --- /dev/null +++ b/NKC_WF/site/BatchPreview.aspx.designer.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// +// 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.site +{ + + + public partial class BatchPreview + { + + /// + /// 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_BP_bunkList. + /// + /// + /// 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_BP_bunkList cmp_BP_bunkList; + + /// + /// 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_BP_sheetList. + /// + /// + /// 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_BP_sheetList cmp_BP_sheetList; + } +} diff --git a/NKC_WF/site/DBG_QRCode_Unload.aspx b/NKC_WF/site/DBG_QRCode_Unload.aspx index f783b8f..9b653e3 100644 --- a/NKC_WF/site/DBG_QRCode_Unload.aspx +++ b/NKC_WF/site/DBG_QRCode_Unload.aspx @@ -4,9 +4,6 @@ <%@ Register Src="~/WebUserControls/cmp_MU_bins.ascx" TagPrefix="uc1" TagName="cmp_MU_bins" %> <%@ Register Src="~/WebUserControls/cmp_MU_Items.ascx" TagPrefix="uc1" TagName="cmp_MU_Items" %> - - - diff --git a/NKC_WF/site/MachineUnload.aspx b/NKC_WF/site/MachineUnload.aspx index e83fc30..e95aec6 100644 --- a/NKC_WF/site/MachineUnload.aspx +++ b/NKC_WF/site/MachineUnload.aspx @@ -17,13 +17,13 @@
-
+
-
+
-
+
diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 39ceaea..1a21799 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -38,9 +38,21 @@ namespace NKC_WF 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; + // calcolo sheet x SVG viewer... + int SheetId = 0; + //SOLO SE ho batch != 0... + if (BatchId > 0) + { + // FORSE 5/5?!? + var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); + if (sheetList.Count > 0) + { + SheetId = sheetList[0].SheetID; + } + } + cmp_MU_svgViewer.SheetId = SheetId; } } } \ No newline at end of file