From 72e3bbc16db9a4a4e69c3f6eb5274a496987622c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 15 Oct 2019 16:59:22 +0200 Subject: [PATCH] iniziata aggiunta dettaglio offline order --- AppData/DS_App.Designer.cs | 276 ++++-------------- AppData/DS_App.xsd | 58 ++-- AppData/DS_App.xss | 4 +- NKC_WF/NKC_WF.csproj | 8 + .../WebUserControls/cmp_offOrderDetail.ascx | 17 ++ .../cmp_offOrderDetail.ascx.cs | 26 ++ .../cmp_offOrderDetail.ascx.designer.cs | 42 +++ NKC_WF/WebUserControls/cmp_offlineOrders.ascx | 8 +- .../WebUserControls/cmp_offlineOrders.ascx.cs | 19 ++ .../cmp_offlineOrders.ascx.designer.cs | 9 + 10 files changed, 211 insertions(+), 256 deletions(-) create mode 100644 NKC_WF/WebUserControls/cmp_offOrderDetail.ascx create mode 100644 NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 222bfa9..3bc2ad3 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -4318,6 +4318,8 @@ namespace AppData { private global::System.Data.DataColumn columnNumItems; + private global::System.Data.DataColumn columnDrawFilePath; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public OfflineOrderListDataTable() { @@ -4391,6 +4393,14 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DrawFilePathColumn { + get { + return this.columnDrawFilePath; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -4428,14 +4438,15 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public OfflineOrderListRow AddOfflineOrderListRow(System.DateTime CreationDate, int OrdStatus, string StatusDesc, int NumItems) { + public OfflineOrderListRow AddOfflineOrderListRow(System.DateTime CreationDate, int OrdStatus, string StatusDesc, int NumItems, string DrawFilePath) { OfflineOrderListRow rowOfflineOrderListRow = ((OfflineOrderListRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, CreationDate, OrdStatus, StatusDesc, - NumItems}; + NumItems, + DrawFilePath}; rowOfflineOrderListRow.ItemArray = columnValuesArray; this.Rows.Add(rowOfflineOrderListRow); return rowOfflineOrderListRow; @@ -4470,6 +4481,7 @@ namespace AppData { this.columnOrdStatus = base.Columns["OrdStatus"]; this.columnStatusDesc = base.Columns["StatusDesc"]; this.columnNumItems = base.Columns["NumItems"]; + this.columnDrawFilePath = base.Columns["DrawFilePath"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4485,6 +4497,8 @@ namespace AppData { base.Columns.Add(this.columnStatusDesc); this.columnNumItems = new global::System.Data.DataColumn("NumItems", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumItems); + this.columnDrawFilePath = new global::System.Data.DataColumn("DrawFilePath", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDrawFilePath); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnOrdID}, true)); this.columnOrdID.AutoIncrement = true; @@ -4497,6 +4511,8 @@ namespace AppData { this.columnOrdStatus.AllowDBNull = false; this.columnStatusDesc.ReadOnly = true; this.columnStatusDesc.MaxLength = 9; + this.columnDrawFilePath.AllowDBNull = false; + this.columnDrawFilePath.MaxLength = 500; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6730,6 +6746,17 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string DrawFilePath { + get { + return ((string)(this[this.tableOfflineOrderList.DrawFilePathColumn])); + } + set { + this[this.tableOfflineOrderList.DrawFilePathColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsStatusDescNull() { @@ -11405,35 +11432,8 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart tableMapping.ColumnMappings.Add("OrdStatus", "OrdStatus"); tableMapping.ColumnMappings.Add("StatusDesc", "StatusDesc"); tableMapping.ColumnMappings.Add("NumItems", "NumItems"); + tableMapping.ColumnMappings.Add("DrawFilePath", "DrawFilePath"); this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OfflineOrderList] WHERE (([OrdID] = @Original_OrdID) AND ([Cre" + - "ationDate] = @Original_CreationDate) AND ([OrdStatus] = @Original_OrdStatus))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdStatus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdStatus", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OfflineOrderList] ([OrdID], [CreationDate], [OrdStatus]) VALUE" + - "S (@OrdID, @CreationDate, @OrdStatus)"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdStatus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdStatus", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OfflineOrderList] SET [OrdID] = @OrdID, [CreationDate] = @CreationD" + - "ate, [OrdStatus] = @OrdStatus WHERE (([OrdID] = @Original_OrdID) AND ([CreationD" + - "ate] = @Original_CreationDate) AND ([OrdStatus] = @Original_OrdStatus))"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdStatus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdStatus", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreationDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreationDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrdStatus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrdStatus", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -11446,23 +11446,28 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart [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[3]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT OrdID, CreationDate, OrdStatus, StatusDesc, NumItems\r\nFROM " + - " v_OOL"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_OOL"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_OOL_search"; + this._commandCollection[1].CommandText = "dbo.stp_OOL_getByKey"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxOrdStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_OOL_insert"; + this._commandCollection[2].CommandText = "dbo.stp_OOL_search"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxOrdStatus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_OOL_insert"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -11493,8 +11498,25 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart [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.OfflineOrderListDataTable getBySearch(global::System.Nullable MaxOrdStatus) { + public virtual DS_App.OfflineOrderListDataTable getByKey(global::System.Nullable OrdId) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((OrdId.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(OrdId.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.OfflineOrderListDataTable dataTable = new DS_App.OfflineOrderListDataTable(); + 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.OfflineOrderListDataTable getBySearch(global::System.Nullable MaxOrdStatus) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((MaxOrdStatus.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(MaxOrdStatus.Value)); } @@ -11511,123 +11533,11 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_App.OfflineOrderListDataTable insertNew() { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; DS_App.OfflineOrderListDataTable dataTable = new DS_App.OfflineOrderListDataTable(); this.Adapter.Fill(dataTable); return dataTable; } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_App.OfflineOrderListDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_App dataSet) { - return this.Adapter.Update(dataSet, "OfflineOrderList"); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_OrdID, System.DateTime Original_CreationDate, int Original_OrdStatus) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_OrdID)); - this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_CreationDate)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_OrdStatus)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int OrdID, System.DateTime CreationDate, int OrdStatus) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(OrdID)); - this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(CreationDate)); - this.Adapter.InsertCommand.Parameters[2].Value = ((int)(OrdStatus)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int OrdID, System.DateTime CreationDate, int OrdStatus, int Original_OrdID, System.DateTime Original_CreationDate, int Original_OrdStatus) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(OrdID)); - this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(CreationDate)); - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(OrdStatus)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_OrdID)); - this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(Original_CreationDate)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_OrdStatus)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(System.DateTime CreationDate, int OrdStatus, int Original_OrdID, System.DateTime Original_CreationDate, int Original_OrdStatus) { - return this.Update(Original_OrdID, CreationDate, OrdStatus, Original_OrdID, Original_CreationDate, Original_OrdStatus); - } } /// @@ -11996,8 +11906,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart private CartsTableAdapter _cartsTableAdapter; - private OfflineOrderListTableAdapter _offlineOrderListTableAdapter; - private OffOrd2ItemTableAdapter _offOrd2ItemTableAdapter; private bool _backupDataSetBeforeUpdate; @@ -12099,20 +12007,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public OfflineOrderListTableAdapter OfflineOrderListTableAdapter { - get { - return this._offlineOrderListTableAdapter; - } - set { - this._offlineOrderListTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + @@ -12170,10 +12064,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart && (this._cartsTableAdapter.Connection != null))) { return this._cartsTableAdapter.Connection; } - if (((this._offlineOrderListTableAdapter != null) - && (this._offlineOrderListTableAdapter.Connection != null))) { - return this._offlineOrderListTableAdapter.Connection; - } if (((this._offOrd2ItemTableAdapter != null) && (this._offOrd2ItemTableAdapter.Connection != null))) { return this._offOrd2ItemTableAdapter.Connection; @@ -12209,9 +12099,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart if ((this._cartsTableAdapter != null)) { count = (count + 1); } - if ((this._offlineOrderListTableAdapter != null)) { - count = (count + 1); - } if ((this._offOrd2ItemTableAdapter != null)) { count = (count + 1); } @@ -12244,15 +12131,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart allChangedRows.AddRange(updatedRows); } } - if ((this._offlineOrderListTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.OfflineOrderList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._offlineOrderListTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._batchReqListTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -12324,14 +12202,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart allAddedRows.AddRange(addedRows); } } - if ((this._offlineOrderListTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.OfflineOrderList.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._offlineOrderListTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._batchReqListTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -12422,14 +12292,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart allChangedRows.AddRange(deletedRows); } } - if ((this._offlineOrderListTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.OfflineOrderList.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._offlineOrderListTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._materialsTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -12515,11 +12377,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } - if (((this._offlineOrderListTableAdapter != null) - && (this.MatchTableAdapterConnection(this._offlineOrderListTableAdapter.Connection) == false))) { - throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + - "a stessa stringa di connessione."); - } if (((this._offOrd2ItemTableAdapter != null) && (this.MatchTableAdapterConnection(this._offOrd2ItemTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + @@ -12612,15 +12469,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart adaptersWithAcceptChangesDuringUpdate.Add(this._cartsTableAdapter.Adapter); } } - if ((this._offlineOrderListTableAdapter != null)) { - revertConnections.Add(this._offlineOrderListTableAdapter, this._offlineOrderListTableAdapter.Connection); - this._offlineOrderListTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._offlineOrderListTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._offlineOrderListTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._offlineOrderListTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._offlineOrderListTableAdapter.Adapter); - } - } if ((this._offOrd2ItemTableAdapter != null)) { revertConnections.Add(this._offOrd2ItemTableAdapter, this._offOrd2ItemTableAdapter.Connection); this._offOrd2ItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); @@ -12712,10 +12560,6 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart this._cartsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._cartsTableAdapter])); this._cartsTableAdapter.Transaction = null; } - if ((this._offlineOrderListTableAdapter != null)) { - this._offlineOrderListTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._offlineOrderListTableAdapter])); - this._offlineOrderListTableAdapter.Transaction = null; - } if ((this._offOrd2ItemTableAdapter != null)) { this._offOrd2ItemTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._offOrd2ItemTableAdapter])); this._offOrd2ItemTableAdapter.Transaction = null; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index a50ad8a..2555237 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -909,47 +909,14 @@ SELECT CartID, CreationCarts, CartNum, CartDtmx FROM Carts WHERE (CartID = @Cart - - - - DELETE FROM [dbo].[OfflineOrderList] WHERE (([OrdID] = @Original_OrdID) AND ([CreationDate] = @Original_CreationDate) AND ([OrdStatus] = @Original_OrdStatus)) - - - - - - - - - - INSERT INTO [dbo].[OfflineOrderList] ([OrdID], [CreationDate], [OrdStatus]) VALUES (@OrdID, @CreationDate, @OrdStatus) - - - - - - - + - - SELECT OrdID, CreationDate, OrdStatus, StatusDesc, NumItems + + SELECT * FROM v_OOL - - - UPDATE [dbo].[OfflineOrderList] SET [OrdID] = @OrdID, [CreationDate] = @CreationDate, [OrdStatus] = @OrdStatus WHERE (([OrdID] = @Original_OrdID) AND ([CreationDate] = @Original_CreationDate) AND ([OrdStatus] = @Original_OrdStatus)) - - - - - - - - - - @@ -958,8 +925,20 @@ FROM v_OOL + + + + + dbo.stp_OOL_getByKey + + + + + + + @@ -1381,6 +1360,13 @@ SELECT OrdID, ItemID FROM OffOrd2Item WHERE (ItemID = @ItemID) AND (OrdID = @Ord + + + + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index c393fef..b158123 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -15,7 +15,7 @@ - + diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 102d904..ca44dfc 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -233,6 +233,7 @@ + @@ -588,6 +589,13 @@ cmp_offlineOrders.ascx + + cmp_offOrderDetail.ascx + ASPXCodeBehind + + + cmp_offOrderDetail.ascx + cmp_orderStatus.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx new file mode 100644 index 0000000..c41c79d --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx @@ -0,0 +1,17 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_offOrderDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_offOrderDetail" %> + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs new file mode 100644 index 0000000..757a944 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.cs @@ -0,0 +1,26 @@ +using System; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_offOrderDetail : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public int OffOrdId + { + get + { + int answ = 0; + int.TryParse(hfOffOrderId.Value, out answ); + return answ; + } + set + { + hfOffOrderId.Value = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs new file mode 100644 index 0000000..3e0b387 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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_offOrderDetail { + + /// + /// Controllo detView. + /// + /// + /// 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.DetailsView detView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfOffOrderId. + /// + /// + /// 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 hfOffOrderId; + } +} diff --git a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx index eedda0a..71f355f 100644 --- a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx +++ b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx @@ -1,5 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_offlineOrders.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_offlineOrders" %> <%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagPrefix="uc1" TagName="mod_righePag" %> +<%@ Register Src="~/WebUserControls/cmp_offOrderDetail.ascx" TagPrefix="uc1" TagName="cmp_offOrderDetail" %> +
@@ -7,7 +9,9 @@

Offline Orders

- + + + No Data Available @@ -21,7 +25,7 @@ - + <%----%> <%----%> diff --git a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.cs b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.cs index 14ec9ad..fc2f164 100644 --- a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.cs @@ -10,6 +10,7 @@ namespace NKC_WF.WebUserControls if (!Page.IsPostBack) { mod_righePag.numRowPag = 10; + cmp_offOrderDetail.Visible = false; } mod_righePag.eh_newNum += Mod_righePag_eh_newNum; } @@ -26,6 +27,24 @@ namespace NKC_WF.WebUserControls protected void lbtReset_Click(object sender, EventArgs e) { grView.SelectedIndex = -1; + cmp_offOrderDetail.Visible = false; + } + + protected int selOrdId + { + get + { + int answ = 0; + int.TryParse(grView.SelectedValue.ToString(), out answ); + return answ; + } + } + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // visualizzo dettaglio ordine... + cmp_offOrderDetail.OffOrdId = selOrdId; + cmp_offOrderDetail.Visible = true; } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.designer.cs index 4f60d97..945636b 100644 --- a/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_offlineOrders.ascx.designer.cs @@ -12,6 +12,15 @@ namespace NKC_WF.WebUserControls { public partial class cmp_offlineOrders { + /// + /// Controllo cmp_offOrderDetail. + /// + /// + /// 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_offOrderDetail cmp_offOrderDetail; + /// /// Controllo grView. ///