diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll index d274a5b4..8f7ba6cd 100644 Binary files a/GMW-RT/bin/GMW-RT.dll and b/GMW-RT/bin/GMW-RT.dll differ diff --git a/GMW-RT/bin/GMW_data.dll b/GMW-RT/bin/GMW_data.dll index d1a0ddf7..6308c028 100644 Binary files a/GMW-RT/bin/GMW_data.dll and b/GMW-RT/bin/GMW_data.dll differ diff --git a/GMW-RT/bin/SteamWare.dll b/GMW-RT/bin/SteamWare.dll index 8b45116b..862c5be7 100644 Binary files a/GMW-RT/bin/SteamWare.dll and b/GMW-RT/bin/SteamWare.dll differ diff --git a/GMW/WebUserControls/mod_sterrTaglio.ascx.cs b/GMW/WebUserControls/mod_sterrTaglio.ascx.cs index 16bf9dd9..78156251 100644 --- a/GMW/WebUserControls/mod_sterrTaglio.ascx.cs +++ b/GMW/WebUserControls/mod_sterrTaglio.ascx.cs @@ -415,9 +415,20 @@ namespace GMW.WebUserControls { // controllo SE esista già UDC in AL dest... altrimenti CREO!!! udcDest = checkCreaUDC(); - // associo UDC con quello di destinazione SE NECESSARIO - MagClass.magazzino.associaUdcParent(udcDest, barcodeIn, true); + // verifico che NON SIA GIA' associato... + bool udcGiaAssociato = false; + try + { + udcGiaAssociato = MagClass.magazzino.checkAssociazioneUdcParent(udcDest, barcodeIn); + } + catch + { } + if (!udcGiaAssociato) + { + // associo UDC con quello di destinazione SE NECESSARIO + MagClass.magazzino.associaUdcParent(udcDest, barcodeIn, true); + } // controllo se UDC non sia già stato spostato in posizione... ds magazzino, posiz udc corrente, get By udc if (idxCellaCurr == Postazione.currIdxCella) { diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 73dfc27f..b20c0cc1 100644 Binary files a/GMW/bin/GMW.dll and b/GMW/bin/GMW.dll differ diff --git a/GMW/bin/GMW_data.dll b/GMW/bin/GMW_data.dll index d1a0ddf7..6308c028 100644 Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ diff --git a/GMW/bin/SteamWare.dll b/GMW/bin/SteamWare.dll index 8b45116b..862c5be7 100644 Binary files a/GMW/bin/SteamWare.dll and b/GMW/bin/SteamWare.dll differ diff --git a/GMW/bin/VersGen.dll b/GMW/bin/VersGen.dll index cff557a5..3faf879a 100644 Binary files a/GMW/bin/VersGen.dll and b/GMW/bin/VersGen.dll differ diff --git a/GMW_data/DS_Applicazione.Designer.cs b/GMW_data/DS_Applicazione.Designer.cs index 0dbcece8..304a3243 100644 --- a/GMW_data/DS_Applicazione.Designer.cs +++ b/GMW_data/DS_Applicazione.Designer.cs @@ -1811,6 +1811,8 @@ namespace GMW_data { private global::System.Data.DataColumn columnUDC_child; + private global::System.Data.DataColumn columndataMod; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public RelazUDCDataTable() { @@ -1860,6 +1862,14 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn dataModColumn { + get { + return this.columndataMod; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -1897,11 +1907,12 @@ namespace GMW_data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public RelazUDCRow AddRelazUDCRow(string UDC_parent, string UDC_child) { + public RelazUDCRow AddRelazUDCRow(string UDC_parent, string UDC_child, System.DateTime dataMod) { RelazUDCRow rowRelazUDCRow = ((RelazUDCRow)(this.NewRow())); object[] columnValuesArray = new object[] { UDC_parent, - UDC_child}; + UDC_child, + dataMod}; rowRelazUDCRow.ItemArray = columnValuesArray; this.Rows.Add(rowRelazUDCRow); return rowRelazUDCRow; @@ -1934,6 +1945,7 @@ namespace GMW_data { internal void InitVars() { this.columnUDC_parent = base.Columns["UDC_parent"]; this.columnUDC_child = base.Columns["UDC_child"]; + this.columndataMod = base.Columns["dataMod"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1943,6 +1955,8 @@ namespace GMW_data { base.Columns.Add(this.columnUDC_parent); this.columnUDC_child = new global::System.Data.DataColumn("UDC_child", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnUDC_child); + this.columndataMod = new global::System.Data.DataColumn("dataMod", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndataMod); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnUDC_parent, this.columnUDC_child}, true)); @@ -8937,6 +8951,34 @@ namespace GMW_data { this[this.tableRelazUDC.UDC_childColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public System.DateTime dataMod { + get { + try { + return ((global::System.DateTime)(this[this.tableRelazUDC.dataModColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'dataMod\' in table \'RelazUDC\' is DBNull.", e); + } + } + set { + this[this.tableRelazUDC.dataModColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsdataModNull() { + return this.IsNull(this.tableRelazUDC.dataModColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetdataModNull() { + this[this.tableRelazUDC.dataModColumn] = global::System.Convert.DBNull; + } } /// @@ -15317,31 +15359,39 @@ SELECT CodStato, DescStato FROM AnagStatiProdotto WHERE (CodStato = @CodStato)"; tableMapping.DataSetTable = "RelazUDC"; tableMapping.ColumnMappings.Add("UDC_parent", "UDC_parent"); tableMapping.ColumnMappings.Add("UDC_child", "UDC_child"); + tableMapping.ColumnMappings.Add("dataMod", "dataMod"); 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].[RelazUDC] WHERE (([UDC_parent] = @Original_UDC_parent) AND ([U" + - "DC_child] = @Original_UDC_child))"; + "DC_child] = @Original_UDC_child) AND ((@IsNull_dataMod = 1 AND [dataMod] IS NULL" + + ") OR ([dataMod] = @Original_dataMod)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC_parent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_parent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC_child", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_child", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dataMod", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataMod", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataMod", 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].[RelazUDC] ([UDC_parent], [UDC_child]) VALUES (@UDC_parent, @UD" + - "C_child);\r\nSELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_ch" + - "ild) AND (UDC_parent = @UDC_parent)"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[RelazUDC] ([UDC_parent], [UDC_child], [dataMod]) VALUES (@UDC_" + + "parent, @UDC_child, @dataMod);\r\nSELECT UDC_parent, UDC_child, dataMod FROM Relaz" + + "UDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_parent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_child", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_child", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataMod", 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].[RelazUDC] SET [UDC_parent] = @UDC_parent, [UDC_child] = @UDC_child WHERE (([UDC_parent] = @Original_UDC_parent) AND ([UDC_child] = @Original_UDC_child)); -SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[RelazUDC] SET [UDC_parent] = @UDC_parent, [UDC_child] = @UDC_child, [dataMod] = @dataMod WHERE (([UDC_parent] = @Original_UDC_parent) AND ([UDC_child] = @Original_UDC_child) AND ((@IsNull_dataMod = 1 AND [dataMod] IS NULL) OR ([dataMod] = @Original_dataMod))); +SELECT UDC_parent, UDC_child, dataMod FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_parent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_child", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_child", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataMod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC_parent", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_parent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC_child", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC_child", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dataMod", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataMod", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dataMod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -15354,10 +15404,10 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT UDC_parent, UDC_child FROM dbo.RelazUDC"; + this._commandCollection[0].CommandText = "SELECT * FROM dbo.RelazUDC"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -15367,16 +15417,23 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_getUDC_Child"; + this._commandCollection[2].CommandText = "dbo.stp_RelUdc_check"; 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("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_child", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_getUDC_parent"; + this._commandCollection[3].CommandText = "dbo.stp_getUDC_Child"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_getUDC_parent"; + 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("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -15407,8 +15464,31 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Applicazione.RelazUDCDataTable stp_getChild(string UDC) { + public virtual DS_Applicazione.RelazUDCDataTable getByParentChild(string UDC_child, string UDC_parent) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((UDC_child == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC_child)); + } + if ((UDC_parent == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(UDC_parent)); + } + DS_Applicazione.RelazUDCDataTable dataTable = new DS_Applicazione.RelazUDCDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Applicazione.RelazUDCDataTable stp_getChild(string UDC) { + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -15425,7 +15505,7 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_Applicazione.RelazUDCDataTable stp_getParent(string UDC) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -15470,7 +15550,7 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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(string Original_UDC_parent, string Original_UDC_child) { + public virtual int Delete(string Original_UDC_parent, string Original_UDC_child, global::System.Nullable Original_dataMod) { if ((Original_UDC_parent == null)) { throw new global::System.ArgumentNullException("Original_UDC_parent"); } @@ -15483,6 +15563,14 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U else { this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_UDC_child)); } + if ((Original_dataMod.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_dataMod.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -15503,7 +15591,7 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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(string UDC_parent, string UDC_child) { + public virtual int Insert(string UDC_parent, string UDC_child, global::System.Nullable dataMod) { if ((UDC_parent == null)) { throw new global::System.ArgumentNullException("UDC_parent"); } @@ -15516,6 +15604,12 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U else { this.Adapter.InsertCommand.Parameters[1].Value = ((string)(UDC_child)); } + if ((dataMod.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(dataMod.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -15536,7 +15630,7 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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(string UDC_parent, string UDC_child, string Original_UDC_parent, string Original_UDC_child) { + public virtual int Update(string UDC_parent, string UDC_child, global::System.Nullable dataMod, string Original_UDC_parent, string Original_UDC_child, global::System.Nullable Original_dataMod) { if ((UDC_parent == null)) { throw new global::System.ArgumentNullException("UDC_parent"); } @@ -15549,17 +15643,31 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(UDC_child)); } + if ((dataMod.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(dataMod.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } if ((Original_UDC_parent == null)) { throw new global::System.ArgumentNullException("Original_UDC_parent"); } else { - this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_UDC_parent)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_UDC_parent)); } if ((Original_UDC_child == null)) { throw new global::System.ArgumentNullException("Original_UDC_child"); } else { - this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_UDC_child)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_UDC_child)); + } + if ((Original_dataMod.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_dataMod.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -15581,8 +15689,8 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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(string Original_UDC_parent, string Original_UDC_child) { - return this.Update(Original_UDC_parent, Original_UDC_child, Original_UDC_parent, Original_UDC_child); + public virtual int Update(global::System.Nullable dataMod, string Original_UDC_parent, string Original_UDC_child, global::System.Nullable Original_dataMod) { + return this.Update(Original_UDC_parent, Original_UDC_child, dataMod, Original_UDC_parent, Original_UDC_child, Original_dataMod); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] diff --git a/GMW_data/DS_Applicazione.xsd b/GMW_data/DS_Applicazione.xsd index 711ae778..b249d7ae 100644 --- a/GMW_data/DS_Applicazione.xsd +++ b/GMW_data/DS_Applicazione.xsd @@ -171,41 +171,47 @@ where CodStato=@CodStato - + - DELETE FROM [dbo].[RelazUDC] WHERE (([UDC_parent] = @Original_UDC_parent) AND ([UDC_child] = @Original_UDC_child)) + DELETE FROM [dbo].[RelazUDC] WHERE (([UDC_parent] = @Original_UDC_parent) AND ([UDC_child] = @Original_UDC_child) AND ((@IsNull_dataMod = 1 AND [dataMod] IS NULL) OR ([dataMod] = @Original_dataMod))) + + - INSERT INTO [dbo].[RelazUDC] ([UDC_parent], [UDC_child]) VALUES (@UDC_parent, @UDC_child); -SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent) + INSERT INTO [dbo].[RelazUDC] ([UDC_parent], [UDC_child], [dataMod]) VALUES (@UDC_parent, @UDC_child, @dataMod); +SELECT UDC_parent, UDC_child, dataMod FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent) + - - SELECT UDC_parent, UDC_child FROM dbo.RelazUDC + + SELECT * FROM dbo.RelazUDC - UPDATE [dbo].[RelazUDC] SET [UDC_parent] = @UDC_parent, [UDC_child] = @UDC_child WHERE (([UDC_parent] = @Original_UDC_parent) AND ([UDC_child] = @Original_UDC_child)); -SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent) + UPDATE [dbo].[RelazUDC] SET [UDC_parent] = @UDC_parent, [UDC_child] = @UDC_child, [dataMod] = @dataMod WHERE (([UDC_parent] = @Original_UDC_parent) AND ([UDC_child] = @Original_UDC_child) AND ((@IsNull_dataMod = 1 AND [dataMod] IS NULL) OR ([dataMod] = @Original_dataMod))); +SELECT UDC_parent, UDC_child, dataMod FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (UDC_parent = @UDC_parent) + + + @@ -214,6 +220,7 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U + @@ -227,6 +234,18 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U + + + + dbo.stp_RelUdc_check + + + + + + + + @@ -757,7 +776,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - + dbo.stp_UDC_sbloccaFusoDaPost @@ -891,7 +910,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - + dbo.stp_riattivaUdc @@ -903,7 +922,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - + dbo.stp_sbloccaUdc @@ -915,7 +934,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - + dbo.stp_UDC_associaParent @@ -929,7 +948,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - + dbo.stp_UDC_delete_byRdQ @@ -941,7 +960,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - + dbo.stp_UDC_updateNote @@ -1841,6 +1860,7 @@ SELECT codPostazione, stampante FROM ElencoPostazioni WHERE (codPostazione = @co + @@ -2996,12 +3016,12 @@ SELECT codPostazione, stampante FROM ElencoPostazioni WHERE (codPostazione = @co - - - - - - + + + + + + \ No newline at end of file diff --git a/GMW_data/DS_Applicazione.xss b/GMW_data/DS_Applicazione.xss index 3bf993e5..88364110 100644 --- a/GMW_data/DS_Applicazione.xss +++ b/GMW_data/DS_Applicazione.xss @@ -4,31 +4,31 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + 1129 @@ -40,7 +40,7 @@ - + 1170 @@ -56,7 +56,7 @@ - + 336 @@ -72,7 +72,7 @@ - + 1154 @@ -88,7 +88,7 @@ - + 1248 @@ -100,7 +100,7 @@ - + 488 diff --git a/GMW_data/MagClass.cs b/GMW_data/MagClass.cs index e1c34b79..afbca923 100644 --- a/GMW_data/MagClass.cs +++ b/GMW_data/MagClass.cs @@ -1098,7 +1098,7 @@ namespace GMW_data try { // salvo associazione parent-child tra UDC! - DataProxy.obj.taRelazUDC.Insert(UDC_parentTrim, answ); + DataProxy.obj.taRelazUDC.Insert(UDC_parentTrim, answ, DateTime.Now); } catch { } @@ -1232,7 +1232,7 @@ namespace GMW_data try { // salvo associazione parent-child tra UDC! - DataProxy.obj.taRelazUDC.Insert(UDC_parentTrim, answ); + DataProxy.obj.taRelazUDC.Insert(UDC_parentTrim, answ, DateTime.Now); } catch { } @@ -1262,6 +1262,23 @@ namespace GMW_data return answ; } /// + /// VERIFICA se ci sia associazione tra udc e l'UDCParent e restituisce TRUE se sia già associato + /// + /// UDC destinazione + /// UDC parent + /// + public bool checkAssociazioneUdcParent(string codUdc, string codParent) + { + bool answ = false; + try + { + answ = DataProxy.obj.taRelazUDC.getByParentChild(codUdc, codParent).Rows.Count > 0; + } + catch + { } + return answ; + } + /// /// associa udc all'UDCParent /// /// UDC destinazione diff --git a/VersGen/GMW.cs b/VersGen/GMW.cs index 229d5418..c9cd9f2d 100644 --- a/VersGen/GMW.cs +++ b/VersGen/GMW.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("2.8.769.1897")] -[assembly: AssemblyFileVersion("2.8.769.1897")] +[assembly: AssemblyVersion("2.8.770.1897")] +[assembly: AssemblyFileVersion("2.8.770.1897")] [assembly: AssemblyCopyright("Steamware © 2007-2015")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/GMW.tt b/VersGen/GMW.tt index 852dd100..34cf51b4 100644 --- a/VersGen/GMW.tt +++ b/VersGen/GMW.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("2.8.769.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("2.8.769.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("2.8.770.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("2.8.770.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Steamware © 2007-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+