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/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx index 77db5ca..2fb9c67 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx @@ -23,4 +23,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 8b31830..4bb2091 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.cs @@ -20,6 +20,8 @@ namespace NKC_WF.WebUserControls set { hfBatchID.Value = value.ToString(); + calcSheet(); + doUpdate(); } get { @@ -45,13 +47,54 @@ namespace NKC_WF.WebUserControls return answ; } } + /// + /// Percorso file calcolato + /// + public string filename + { + get + { + return hfFilename.Value; + } + set + { + hfFilename.Value = value; + } + } + protected void calcSheet() + { + // base path + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); + //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; +#if false + 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); +#endif + } + } +#if false + else if (SheetId > 0) + { + filename = DataLayer.man.taSHL.getByItemID(SheetId)[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); + } +#endif + } public void doUpdate() { // recupero ID del foglio corrente string answ = ""; - string filename = ""; try { +#if false // FORSE 5/5?!? var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5); if (sheetList.Count > 0) @@ -63,6 +106,14 @@ namespace NKC_WF.WebUserControls 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); + } +#endif + string baseOrig = memLayer.ML.CRS("drawBaseBath").ToLower(); + string baseCurr = memLayer.ML.CRS("srvDrawBaseBath").ToLower(); + var tabSheets = DataLayer.man.taSHL.getBySheetId(SheetId); + if (tabSheets.Count > 0) + { + filename = tabSheets[0].DrawFilePath.ToLower().Replace(baseOrig, baseCurr); 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..e9c5721 100644 --- a/NKC_WF/WebUserControls/cmp_MU_svgViewer.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_svgViewer.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.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/site/BatchPreview.aspx.cs b/NKC_WF/site/BatchPreview.aspx.cs index 58e63df..ca8f6ac 100644 --- a/NKC_WF/site/BatchPreview.aspx.cs +++ b/NKC_WF/site/BatchPreview.aspx.cs @@ -54,7 +54,6 @@ namespace NKC_WF.site private void doUpdate() { cmp_BP_bunkList.BatchId = BatchId; - cmp_MU_svgViewer.BatchId = BatchId; } ///