diff --git a/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs b/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs index 42afa78..6601702 100644 --- a/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs +++ b/Projects/WebGIM/GIM_data/DS_Mag.Designer.cs @@ -42,6 +42,8 @@ namespace GIM_data { private AnagMacchineDataTable tableAnagMacchine; + private SinonimiTagDataTable tableSinonimiTag; + private global::System.Data.DataRelation relationFK_MagRic_AnagLocazioni; private global::System.Data.DataRelation relationFK_MagRic_AnagItems; @@ -111,6 +113,9 @@ namespace GIM_data { if ((ds.Tables["AnagMacchine"] != null)) { base.Tables.Add(new AnagMacchineDataTable(ds.Tables["AnagMacchine"])); } + if ((ds.Tables["SinonimiTag"] != null)) { + base.Tables.Add(new SinonimiTagDataTable(ds.Tables["SinonimiTag"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -219,6 +224,16 @@ namespace GIM_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public SinonimiTagDataTable SinonimiTag { + get { + return this.tableSinonimiTag; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -313,6 +328,9 @@ namespace GIM_data { if ((ds.Tables["AnagMacchine"] != null)) { base.Tables.Add(new AnagMacchineDataTable(ds.Tables["AnagMacchine"])); } + if ((ds.Tables["SinonimiTag"] != null)) { + base.Tables.Add(new SinonimiTagDataTable(ds.Tables["SinonimiTag"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -400,6 +418,12 @@ namespace GIM_data { this.tableAnagMacchine.InitVars(); } } + this.tableSinonimiTag = ((SinonimiTagDataTable)(base.Tables["SinonimiTag"])); + if ((initTable == true)) { + if ((this.tableSinonimiTag != null)) { + this.tableSinonimiTag.InitVars(); + } + } this.relationFK_MagRic_AnagLocazioni = this.Relations["FK_MagRic_AnagLocazioni"]; this.relationFK_MagRic_AnagItems = this.Relations["FK_MagRic_AnagItems"]; this.relationFK_MovMagRic_AnagItems = this.Relations["FK_MovMagRic_AnagItems"]; @@ -435,6 +459,8 @@ namespace GIM_data { base.Tables.Add(this.tableTag2Macc); this.tableAnagMacchine = new AnagMacchineDataTable(); base.Tables.Add(this.tableAnagMacchine); + this.tableSinonimiTag = new SinonimiTagDataTable(); + base.Tables.Add(this.tableSinonimiTag); this.relationFK_MagRic_AnagLocazioni = new global::System.Data.DataRelation("FK_MagRic_AnagLocazioni", new global::System.Data.DataColumn[] { this.tableAnagLocazioni.CodLocazioneColumn}, new global::System.Data.DataColumn[] { this.tableMagRic.CodLocazioneColumn}, false); @@ -519,6 +545,12 @@ namespace GIM_data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeSinonimiTag() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -601,6 +633,9 @@ namespace GIM_data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void AnagMacchineRowChangeEventHandler(object sender, AnagMacchineRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void SinonimiTagRowChangeEventHandler(object sender, SinonimiTagRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -3594,6 +3629,281 @@ namespace GIM_data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class SinonimiTagDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnTagCodeOrig; + + private global::System.Data.DataColumn columnTagCode; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagDataTable() { + this.TableName = "SinonimiTag"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SinonimiTagDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected SinonimiTagDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn TagCodeOrigColumn { + get { + return this.columnTagCodeOrig; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn TagCodeColumn { + get { + return this.columnTagCode; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagRow this[int index] { + get { + return ((SinonimiTagRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SinonimiTagRowChangeEventHandler SinonimiTagRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SinonimiTagRowChangeEventHandler SinonimiTagRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SinonimiTagRowChangeEventHandler SinonimiTagRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SinonimiTagRowChangeEventHandler SinonimiTagRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddSinonimiTagRow(SinonimiTagRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagRow AddSinonimiTagRow(string TagCodeOrig, string TagCode) { + SinonimiTagRow rowSinonimiTagRow = ((SinonimiTagRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + TagCodeOrig, + TagCode}; + rowSinonimiTagRow.ItemArray = columnValuesArray; + this.Rows.Add(rowSinonimiTagRow); + return rowSinonimiTagRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagRow FindByTagCodeOrig(string TagCodeOrig) { + return ((SinonimiTagRow)(this.Rows.Find(new object[] { + TagCodeOrig}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + SinonimiTagDataTable cln = ((SinonimiTagDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new SinonimiTagDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnTagCodeOrig = base.Columns["TagCodeOrig"]; + this.columnTagCode = base.Columns["TagCode"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnTagCodeOrig = new global::System.Data.DataColumn("TagCodeOrig", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTagCodeOrig); + this.columnTagCode = new global::System.Data.DataColumn("TagCode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTagCode); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnTagCodeOrig}, true)); + this.columnTagCodeOrig.AllowDBNull = false; + this.columnTagCodeOrig.Unique = true; + this.columnTagCodeOrig.MaxLength = 50; + this.columnTagCode.AllowDBNull = false; + this.columnTagCode.MaxLength = 50; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagRow NewSinonimiTagRow() { + return ((SinonimiTagRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new SinonimiTagRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(SinonimiTagRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.SinonimiTagRowChanged != null)) { + this.SinonimiTagRowChanged(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.SinonimiTagRowChanging != null)) { + this.SinonimiTagRowChanging(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.SinonimiTagRowDeleted != null)) { + this.SinonimiTagRowDeleted(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.SinonimiTagRowDeleting != null)) { + this.SinonimiTagRowDeleting(this, new SinonimiTagRowChangeEvent(((SinonimiTagRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveSinonimiTagRow(SinonimiTagRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_Mag ds = new DS_Mag(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "SinonimiTagDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -4699,6 +5009,43 @@ namespace GIM_data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class SinonimiTagRow : global::System.Data.DataRow { + + private SinonimiTagDataTable tableSinonimiTag; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SinonimiTagRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableSinonimiTag = ((SinonimiTagDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string TagCodeOrig { + get { + return ((string)(this[this.tableSinonimiTag.TagCodeOrigColumn])); + } + set { + this[this.tableSinonimiTag.TagCodeOrigColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string TagCode { + get { + return ((string)(this[this.tableSinonimiTag.TagCodeColumn])); + } + set { + this[this.tableSinonimiTag.TagCodeColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -5004,6 +5351,40 @@ namespace GIM_data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class SinonimiTagRowChangeEvent : global::System.EventArgs { + + private SinonimiTagRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagRowChangeEvent(SinonimiTagRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace GIM_data.DS_MagTableAdapters { @@ -8474,6 +8855,372 @@ namespace GIM_data.DS_MagTableAdapters { } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class SinonimiTagTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SinonimiTagTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "SinonimiTag"; + tableMapping.ColumnMappings.Add("TagCodeOrig", "TagCodeOrig"); + tableMapping.ColumnMappings.Add("TagCode", "TagCode"); + 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].[SinonimiTag] WHERE (([TagCodeOrig] = @Original_TagCodeOrig))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", 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].[SinonimiTag] ([TagCodeOrig], [TagCode]) VALUES (@TagCodeOrig, " + + "@TagCode)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCode", 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].[SinonimiTag] SET [TagCodeOrig] = @TagCodeOrig, [TagCode] = @TagCode" + + " WHERE (([TagCodeOrig] = @Original_TagCodeOrig))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TagCodeOrig", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["GIMConnectionString"].ConnectionString; + } + + [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[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT TagCodeOrig, TagCode FROM dbo.SinonimiTag"; + 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_SinTag_UpdateQuery"; + 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("@Original_TagCodeOrig", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [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.Fill, true)] + public virtual int Fill(DS_Mag.SinonimiTagDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [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, true)] + public virtual DS_Mag.SinonimiTagDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Mag.SinonimiTagDataTable dataTable = new DS_Mag.SinonimiTagDataTable(); + 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")] + public virtual int Update(DS_Mag.SinonimiTagDataTable dataTable) { + return this.Adapter.Update(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")] + public virtual int Update(DS_Mag dataSet) { + return this.Adapter.Update(dataSet, "SinonimiTag"); + } + + [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")] + 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", "4.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", "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_TagCodeOrig) { + if ((Original_TagCodeOrig == null)) { + throw new global::System.ArgumentNullException("Original_TagCodeOrig"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_TagCodeOrig)); + } + 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", "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 TagCodeOrig, string TagCode) { + if ((TagCodeOrig == null)) { + throw new global::System.ArgumentNullException("TagCodeOrig"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(TagCodeOrig)); + } + if ((TagCode == null)) { + throw new global::System.ArgumentNullException("TagCode"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(TagCode)); + } + 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", "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 TagCodeOrig, string TagCode, string Original_TagCodeOrig) { + if ((TagCodeOrig == null)) { + throw new global::System.ArgumentNullException("TagCodeOrig"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(TagCodeOrig)); + } + if ((TagCode == null)) { + throw new global::System.ArgumentNullException("TagCode"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(TagCode)); + } + if ((Original_TagCodeOrig == null)) { + throw new global::System.ArgumentNullException("Original_TagCodeOrig"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_TagCodeOrig)); + } + 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", "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 TagCode, string Original_TagCodeOrig) { + return this.Update(Original_TagCodeOrig, TagCode, Original_TagCodeOrig); + } + + [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.Update, false)] + public virtual int updateQuery(string Original_TagCodeOrig, string TagCode) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_TagCodeOrig == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Original_TagCodeOrig)); + } + if ((TagCode == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(TagCode)); + } + 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; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -8502,6 +9249,8 @@ namespace GIM_data.DS_MagTableAdapters { private AnagMacchineTableAdapter _anagMacchineTableAdapter; + private SinonimiTagTableAdapter _sinonimiTagTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -8629,6 +9378,20 @@ namespace GIM_data.DS_MagTableAdapters { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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 SinonimiTagTableAdapter SinonimiTagTableAdapter { + get { + return this._sinonimiTagTableAdapter; + } + set { + this._sinonimiTagTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -8680,6 +9443,10 @@ namespace GIM_data.DS_MagTableAdapters { && (this._anagMacchineTableAdapter.Connection != null))) { return this._anagMacchineTableAdapter.Connection; } + if (((this._sinonimiTagTableAdapter != null) + && (this._sinonimiTagTableAdapter.Connection != null))) { + return this._sinonimiTagTableAdapter.Connection; + } return null; } set { @@ -8717,6 +9484,9 @@ namespace GIM_data.DS_MagTableAdapters { if ((this._anagMacchineTableAdapter != null)) { count = (count + 1); } + if ((this._sinonimiTagTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -8800,6 +9570,15 @@ namespace GIM_data.DS_MagTableAdapters { allChangedRows.AddRange(updatedRows); } } + if ((this._sinonimiTagTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.SinonimiTag.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._sinonimiTagTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -8874,6 +9653,14 @@ namespace GIM_data.DS_MagTableAdapters { allAddedRows.AddRange(addedRows); } } + if ((this._sinonimiTagTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.SinonimiTag.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._sinonimiTagTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -8884,6 +9671,14 @@ namespace GIM_data.DS_MagTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(DS_Mag dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._sinonimiTagTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.SinonimiTag.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._sinonimiTagTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._tag2MaccTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Tag2Macc.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -9027,6 +9822,11 @@ namespace GIM_data.DS_MagTableAdapters { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._sinonimiTagTableAdapter != null) + && (this.MatchTableAdapterConnection(this._sinonimiTagTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" + @@ -9131,6 +9931,15 @@ namespace GIM_data.DS_MagTableAdapters { adaptersWithAcceptChangesDuringUpdate.Add(this._anagMacchineTableAdapter.Adapter); } } + if ((this._sinonimiTagTableAdapter != null)) { + revertConnections.Add(this._sinonimiTagTableAdapter, this._sinonimiTagTableAdapter.Connection); + this._sinonimiTagTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._sinonimiTagTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._sinonimiTagTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._sinonimiTagTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._sinonimiTagTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -9221,6 +10030,10 @@ namespace GIM_data.DS_MagTableAdapters { this._anagMacchineTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagMacchineTableAdapter])); this._anagMacchineTableAdapter.Transaction = null; } + if ((this._sinonimiTagTableAdapter != null)) { + this._sinonimiTagTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._sinonimiTagTableAdapter])); + this._sinonimiTagTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/Projects/WebGIM/GIM_data/DS_Mag.xsd b/Projects/WebGIM/GIM_data/DS_Mag.xsd index 6735504..ac46b31 100644 --- a/Projects/WebGIM/GIM_data/DS_Mag.xsd +++ b/Projects/WebGIM/GIM_data/DS_Mag.xsd @@ -611,6 +611,63 @@ FROM AnagTags + + + + + + DELETE FROM [dbo].[SinonimiTag] WHERE (([TagCodeOrig] = @Original_TagCodeOrig)) + + + + + + + + INSERT INTO [dbo].[SinonimiTag] ([TagCodeOrig], [TagCode]) VALUES (@TagCodeOrig, @TagCode) + + + + + + + + + SELECT TagCodeOrig, TagCode FROM dbo.SinonimiTag + + + + + + UPDATE [dbo].[SinonimiTag] SET [TagCodeOrig] = @TagCodeOrig, [TagCode] = @TagCode WHERE (([TagCodeOrig] = @Original_TagCodeOrig)) + + + + + + + + + + + + + + + + + + dbo.stp_SinTag_UpdateQuery + + + + + + + + + + @@ -874,6 +931,26 @@ FROM AnagTags + + + + + + + + + + + + + + + + + + + + @@ -916,6 +993,10 @@ FROM AnagTags + + + + diff --git a/Projects/WebGIM/GIM_data/TA_app.cs b/Projects/WebGIM/GIM_data/TA_app.cs index aa4d125..7444d0b 100644 --- a/Projects/WebGIM/GIM_data/TA_app.cs +++ b/Projects/WebGIM/GIM_data/TA_app.cs @@ -39,6 +39,7 @@ public class TA_app public GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter taAnagTags; public GIM_data.DS_MagTableAdapters.MagRicTableAdapter taMagRic; public GIM_data.DS_MagTableAdapters.MovMagRicTableAdapter taMovMag; + public GIM_data.DS_MagTableAdapters.SinonimiTagTableAdapter taSinTag; public GIM_data.DS_MagTableAdapters.StatoMagTableAdapter taStatoMag; public GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter taTag2Item; public GIM_data.DS_MagTableAdapters.Tag2MaccTableAdapter tatag2Macc; @@ -81,6 +82,7 @@ public class TA_app taAnagTags.Connection.ConnectionString = connString; taMagRic.Connection.ConnectionString = connString; taMovMag.Connection.ConnectionString = connString; + taSinTag.Connection.ConnectionString = connString; taStatoMag.Connection.ConnectionString = connString; taTag2Item.Connection.ConnectionString = connString; tatag2Macc.Connection.ConnectionString = connString; @@ -123,6 +125,7 @@ public class TA_app taAnagTags = new GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter(); taMagRic = new GIM_data.DS_MagTableAdapters.MagRicTableAdapter(); taMovMag = new GIM_data.DS_MagTableAdapters.MovMagRicTableAdapter(); + taSinTag = new GIM_data.DS_MagTableAdapters.SinonimiTagTableAdapter(); taStatoMag = new GIM_data.DS_MagTableAdapters.StatoMagTableAdapter(); taTag2Item = new GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter(); tatag2Macc = new GIM_data.DS_MagTableAdapters.Tag2MaccTableAdapter(); diff --git a/Projects/WebGIM/GIM_data/bin/GIM_data.dll b/Projects/WebGIM/GIM_data/bin/GIM_data.dll index 3ac89b6..08316db 100644 Binary files a/Projects/WebGIM/GIM_data/bin/GIM_data.dll and b/Projects/WebGIM/GIM_data/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_data/obj/Alumat/GIM_data.dll b/Projects/WebGIM/GIM_data/obj/Alumat/GIM_data.dll index 3ac89b6..08316db 100644 Binary files a/Projects/WebGIM/GIM_data/obj/Alumat/GIM_data.dll and b/Projects/WebGIM/GIM_data/obj/Alumat/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_site/AnagTags.aspx b/Projects/WebGIM/GIM_site/AnagTags.aspx index 29b28ed..c7f2d10 100644 --- a/Projects/WebGIM/GIM_site/AnagTags.aspx +++ b/Projects/WebGIM/GIM_site/AnagTags.aspx @@ -1,5 +1,8 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSearch.master" AutoEventWireup="true" CodeBehind="AnagTags.aspx.cs" Inherits="GIM_site.AnagTags" %> -<%@ Register src="WebUserControls/mod_anagTags.ascx" tagname="mod_anagTags" tagprefix="uc1" %> + +<%@ Register Src="~/WebUserControls/mod_tags.ascx" TagPrefix="uc1" TagName="mod_tags" %> + + - + diff --git a/Projects/WebGIM/GIM_site/AnagTags.aspx.designer.cs b/Projects/WebGIM/GIM_site/AnagTags.aspx.designer.cs index 15b7ead..dcb518c 100644 --- a/Projects/WebGIM/GIM_site/AnagTags.aspx.designer.cs +++ b/Projects/WebGIM/GIM_site/AnagTags.aspx.designer.cs @@ -13,12 +13,12 @@ namespace GIM_site { public partial class AnagTags { /// - /// mod_anagTags1 control. + /// mod_tags control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::GIM_site.WebUserControls.mod_anagTags mod_anagTags1; + protected global::GIM_site.WebUserControls.mod_tags mod_tags; } } diff --git a/Projects/WebGIM/GIM_site/GIM_site.csproj b/Projects/WebGIM/GIM_site/GIM_site.csproj index ebb8f03..f13dff7 100644 --- a/Projects/WebGIM/GIM_site/GIM_site.csproj +++ b/Projects/WebGIM/GIM_site/GIM_site.csproj @@ -1295,6 +1295,13 @@ mod_selettore_ajax.ascx + + mod_SinonimiTag.ascx + ASPXCodeBehind + + + mod_SinonimiTag.ascx + mod_tag2Item.ascx ASPXCodeBehind @@ -1309,6 +1316,13 @@ mod_tag2Macc.ascx + + mod_tags.ascx + ASPXCodeBehind + + + mod_tags.ascx + mod_tipoGuasto.ascx ASPXCodeBehind @@ -1503,8 +1517,10 @@ + + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx new file mode 100644 index 0000000..854bda9 --- /dev/null +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx @@ -0,0 +1,80 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_SinonimiTag.ascx.cs" Inherits="GIM_site.WebUserControls.mod_SinonimiTag" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> + +

<%: traduci("GestioneSinonimi") %>

+ + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + --%> + + <%-- + +  -->  + + --%> + + <%-- + + + + + + + + + + + + + + --%> + + + + + + + + + + + + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx.cs new file mode 100644 index 0000000..ff874c6 --- /dev/null +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; + +namespace GIM_site.WebUserControls +{ + public partial class mod_SinonimiTag : ApplicationUserControl + { + public event EventHandler eh_resetSelezione; + /// + /// evento dati associati a controllo + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + /// + /// reset delle selezioni + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + /// + /// seleziono valore in editing... + /// + /// + /// + protected void grView_RowEditing(object sender, GridViewEditEventArgs e) + { + // seleziono la riga corrente... + grView.SelectedIndex = e.NewEditIndex; + } + /// + /// gestione evento inserimento nuovo record standard (se ZERO presenti) + /// + /// + /// + protected void btnNewFromEmpty_Click(object sender, EventArgs e) + { + // reset selezione... + resetSelezione(); + // i primi valori ("0") di default sono "ND"... li inserisco come standard... + TA_app.obj.taAnagTags.Insert(memLayer.ML.confReadString("newTagCode"), memLayer.ML.confReadString("newTagClass"), memLayer.ML.confReadString("newTagDescr")); + grView.DataBind(); + } + /// + /// verifica se il tag abbia child (= associazioni a macchine o items...) + /// + /// + public bool hasChild(object _TagCode) + { + bool answ = false; + int trovati = 0; + string TagCode = ""; + try + { + TagCode = _TagCode.ToString(); + trovati += TA_app.obj.taTag2Item.getByTag(TagCode).Rows.Count; + trovati += TA_app.obj.tatag2Macc.getByTag(TagCode).Rows.Count; + answ = (trovati > 0); + } + catch + { } + return answ; + } + } +} \ No newline at end of file diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx.designer.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx.designer.cs new file mode 100644 index 0000000..feede5b --- /dev/null +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_SinonimiTag.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GIM_site.WebUserControls { + + + public partial class mod_SinonimiTag { + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// lblNumRec control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumRec; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + } +} diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx index b87078a..d4b2790 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx @@ -1,95 +1,87 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagTags.ascx.cs" Inherits="GIM_site.WebUserControls.mod_anagTags" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> -
- -
+

<%: traduci("GestioneTags") %>

-
-

FARE GESTIONE SINONIMI

- in modo da ricodificare i tags (salvando l'operazione in tab sinonimi x successivi import e però spostando i collegamenti verso items e macchine ai tags "raggruppati") -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.cs index 6fe68da..65d7295 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.cs +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.cs @@ -10,50 +10,6 @@ namespace GIM_site.WebUserControls { public partial class mod_anagTags : ApplicationUserControl { - - protected override void Page_Load(object sender, EventArgs e) - { - base.Page_Load(sender, e); - if (!Page.IsPostBack) - { - setMode(false); - } - } - - public bool _showRicodifica - { - get - { - return memLayer.ML.BoolSessionObj("showRicodifica"); - } - set - { - memLayer.ML.setSessionVal("showRicodifica", value); - } - } - /// - /// imposta modalità controllo - /// - /// - private void setMode(bool showRicodifica) - { - _showRicodifica = showRicodifica; - string txtBtn = ""; - if (showRicodifica) - { - txtBtn = "MostraTags"; - } - else - { - txtBtn = "MostraRicodifica"; - } - // traduco buttons! - btnMode.Text = traduci(txtBtn); - // sistemo visibilità tags - divRicodifica.Visible = showRicodifica; - divTags.Visible = !showRicodifica; - } - public event EventHandler eh_resetSelezione; /// /// evento dati associati a controllo @@ -149,10 +105,5 @@ namespace GIM_site.WebUserControls return answ; } - protected void btnMode_Click(object sender, EventArgs e) - { - // inverto modalità ricodifica (scambio si/no) - setMode(!_showRicodifica); - } } } \ No newline at end of file diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.designer.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.designer.cs index 2e8a2b1..52c90a6 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.designer.cs +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_anagTags.ascx.designer.cs @@ -12,33 +12,6 @@ namespace GIM_site.WebUserControls { public partial class mod_anagTags { - /// - /// btnMode control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnMode; - - /// - /// divRicodifica control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRicodifica; - - /// - /// divTags control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTags; - /// /// grView control. /// diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx new file mode 100644 index 0000000..634e903 --- /dev/null +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx @@ -0,0 +1,15 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_tags.ascx.cs" Inherits="GIM_site.WebUserControls.mod_tags" %> +<%@ Register Src="~/WebUserControls/mod_anagTags.ascx" TagPrefix="uc1" TagName="mod_anagTags" %> +<%@ Register Src="~/WebUserControls/mod_SinonimiTag.ascx" TagPrefix="uc1" TagName="mod_SinonimiTag" %> + + +
+ +
+ +
+ +
+
+ +
diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx.cs new file mode 100644 index 0000000..0f39e24 --- /dev/null +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx.cs @@ -0,0 +1,61 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GIM_site.WebUserControls +{ + public partial class mod_tags : SteamWare.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + setMode(false); + } + } + + public bool _showRicodifica + { + get + { + return memLayer.ML.BoolSessionObj("showRicodifica"); + } + set + { + memLayer.ML.setSessionVal("showRicodifica", value); + } + } + /// + /// imposta modalità controllo + /// + /// + private void setMode(bool showRicodifica) + { + _showRicodifica = showRicodifica; + string txtBtn = ""; + if (showRicodifica) + { + txtBtn = "MostraTags"; + } + else + { + txtBtn = "MostraRicodifica"; + } + // traduco buttons! + btnMode.Text = traduci(txtBtn); + // sistemo visibilità tags + divRicodifica.Visible = showRicodifica; + divTags.Visible = !showRicodifica; + } + + protected void btnMode_Click(object sender, EventArgs e) + { + // inverto modalità ricodifica (scambio si/no) + setMode(!_showRicodifica); + } + } +} \ No newline at end of file diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx.designer.cs b/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx.designer.cs new file mode 100644 index 0000000..cfb61c4 --- /dev/null +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_tags.ascx.designer.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GIM_site.WebUserControls { + + + public partial class mod_tags { + + /// + /// btnMode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnMode; + + /// + /// divRicodifica control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRicodifica; + + /// + /// mod_SinonimiTag control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GIM_site.WebUserControls.mod_SinonimiTag mod_SinonimiTag; + + /// + /// divTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTags; + + /// + /// mod_anagTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GIM_site.WebUserControls.mod_anagTags mod_anagTags; + } +} diff --git a/Projects/WebGIM/GIM_site/bin/GIM_data.dll b/Projects/WebGIM/GIM_site/bin/GIM_data.dll index 3ac89b6..08316db 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_data.dll and b/Projects/WebGIM/GIM_site/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/GIM_site.dll b/Projects/WebGIM/GIM_site/bin/GIM_site.dll index 333e1d6..09676f5 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_site.dll and b/Projects/WebGIM/GIM_site/bin/GIM_site.dll differ diff --git a/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql b/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql index 9f5d045..cfaa2a5 100644 --- a/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql +++ b/Projects/WebGIM/GIM_site/sql/GIM_1.6.256.sql @@ -47,4 +47,6 @@ exec voc.stp_insNewLemma 'DescrLocazione', 'Locazione' exec voc.stp_insNewLemma 'dtLastUpd', 'Last Update' exec voc.stp_insNewLemma 'MostraTags', 'Mostra Tags' exec voc.stp_insNewLemma 'MostraRicodifica', 'Mostra Ricodifica' +exec voc.stp_insNewLemma 'GestioneTags', 'Elenco Etichette' +exec voc.stp_insNewLemma 'GestioneSinonimi', 'Gestione ricodifica Etichette'