diff --git a/ETS-WS/ETS-WS/WebShipUtils.cs b/ETS-WS/ETS-WS/WebShipUtils.cs index 241c73b..4dd3039 100644 --- a/ETS-WS/ETS-WS/WebShipUtils.cs +++ b/ETS-WS/ETS-WS/WebShipUtils.cs @@ -132,5 +132,9 @@ namespace ETS_WS /// boolean: comunicazioen RED (riservata) /// public bool isRed; + /// + /// elenco tags + /// + public List tags; } } \ No newline at end of file diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx index 05b1181..67544e6 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx @@ -76,7 +76,7 @@

- +
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs index aa183af..90764a3 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs @@ -151,14 +151,6 @@ namespace ETS_WS.WebUserControls { docMetaDataSet answ = new docMetaDataSet(); // popolo! - answ.commessa = utils.cleanPathName(tacCommesse.valore); - answ.fase = utils.cleanPathName(tacFasi.label); - answ.fonte = utils.cleanPathName(tacFonti.label); - answ.oggetto = utils.cleanPathName(txtOggetto.Text); - answ.dataDoc = Convert.ToDateTime(txtDataDoc.Text); - answ.dataRic = Convert.ToDateTime(txtDataRic.Text); - answ.isRed = chkIsRed.Checked; - answ.InOut = rblInOut.SelectedValue; try { answ.reqProto = Convert.ToBoolean(rblInOut.SelectedValue); @@ -167,6 +159,24 @@ namespace ETS_WS.WebUserControls { answ.reqProto = false; } + answ.InOut = rblInOut.SelectedValue; + answ.commessa = utils.cleanPathName(tacCommesse.valore); + answ.fase = utils.cleanPathName(tacFasi.label); + answ.fonte = utils.cleanPathName(tacFonti.label); + answ.oggetto = utils.cleanPathName(txtOggetto.Text); + answ.dataDoc = Convert.ToDateTime(txtDataDoc.Text); + answ.dataRic = Convert.ToDateTime(txtDataRic.Text); + // salvo i tags... + List tags = new List(); + foreach (ListItem tag in cblTags.Items) + { + if (tag.Selected) + { + tags.Add(tag.Value); + } + } + answ.tags = tags; + answ.isRed = chkIsRed.Checked; answ.path = WebShipUtils.mng.path(answ); return answ; } @@ -205,7 +215,15 @@ namespace ETS_WS.WebUserControls /// protected void chkIsRed_CheckedChanged(object sender, EventArgs e) { - // aggiorno + updateVisual(); + } + /// + /// update dei tags selezionati + /// + /// + /// + protected void cblTags_SelectedIndexChanged(object sender, EventArgs e) + { updateVisual(); } } diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs index baab3d9..2c6f8b4 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs @@ -227,7 +227,25 @@ namespace ETS_WS.WebUserControls catch { } // salvo su db le info del file... - utils.obj.taDoc.insertQuery(nomeFile, path, utils.obj.currUserAD, docsData.reqProto, docsData.dataRic, docsData.dataDoc, numComm, annoComm, docsData.fase, docsData.fonte, docsData.oggetto, docsData.InOut, autore, redattore); + int? newIdxFile = 0; + utils.obj.taDoc.insertQuery(nomeFile, path, utils.obj.currUserAD, docsData.reqProto, docsData.dataRic, docsData.dataDoc, numComm, annoComm, docsData.fase, docsData.fonte, docsData.oggetto, docsData.InOut, autore, redattore, docsData.isRed, ref newIdxFile); + // salvo i tags! + if (newIdxFile > 0) + { + // se ho tags... + if (docsData.tags.Count > 0) + { + foreach (string tag in docsData.tags) + { + try + { + utils.obj.taTags2Doc.Insert((int)newIdxFile, Convert.ToInt32(tag)); + } + catch + { } + } + } + } // sposto il file! fileMover.obj.muoviFile(UserTempPath, path, nomeFile); } diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll index 94df4e6..abeebca 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS-WS.dll and b/ETS-WS/ETS-WS/bin/ETS-WS.dll differ diff --git a/ETS-WS/ETS-WS/bin/ETS_Data.dll b/ETS-WS/ETS-WS/bin/ETS_Data.dll index b145a0f..bae6be6 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS_Data.dll and b/ETS-WS/ETS-WS/bin/ETS_Data.dll differ diff --git a/ETS_Data/DS_WebScip.Designer.cs b/ETS_Data/DS_WebScip.Designer.cs index 1ea21b1..e3f464f 100644 --- a/ETS_Data/DS_WebScip.Designer.cs +++ b/ETS_Data/DS_WebScip.Designer.cs @@ -32,6 +32,12 @@ namespace ETS_Data { private AnagTagsDataTable tableAnagTags; + private Tags2DocDataTable tableTags2Doc; + + private global::System.Data.DataRelation relationFK_Tags2Doc_AnagTags; + + private global::System.Data.DataRelation relationFK_Tags2Doc_tbDocumenti; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -72,6 +78,9 @@ namespace ETS_Data { if ((ds.Tables["AnagTags"] != null)) { base.Tables.Add(new AnagTagsDataTable(ds.Tables["AnagTags"])); } + if ((ds.Tables["Tags2Doc"] != null)) { + base.Tables.Add(new Tags2DocDataTable(ds.Tables["Tags2Doc"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -130,6 +139,16 @@ namespace ETS_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 Tags2DocDataTable Tags2Doc { + get { + return this.tableTags2Doc; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -209,6 +228,9 @@ namespace ETS_Data { if ((ds.Tables["AnagTags"] != null)) { base.Tables.Add(new AnagTagsDataTable(ds.Tables["AnagTags"])); } + if ((ds.Tables["Tags2Doc"] != null)) { + base.Tables.Add(new Tags2DocDataTable(ds.Tables["Tags2Doc"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -266,6 +288,14 @@ namespace ETS_Data { this.tableAnagTags.InitVars(); } } + this.tableTags2Doc = ((Tags2DocDataTable)(base.Tables["Tags2Doc"])); + if ((initTable == true)) { + if ((this.tableTags2Doc != null)) { + this.tableTags2Doc.InitVars(); + } + } + this.relationFK_Tags2Doc_AnagTags = this.Relations["FK_Tags2Doc_AnagTags"]; + this.relationFK_Tags2Doc_tbDocumenti = this.Relations["FK_Tags2Doc_tbDocumenti"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -284,6 +314,16 @@ namespace ETS_Data { base.Tables.Add(this.tableAnagFasi); this.tableAnagTags = new AnagTagsDataTable(); base.Tables.Add(this.tableAnagTags); + this.tableTags2Doc = new Tags2DocDataTable(); + base.Tables.Add(this.tableTags2Doc); + this.relationFK_Tags2Doc_AnagTags = new global::System.Data.DataRelation("FK_Tags2Doc_AnagTags", new global::System.Data.DataColumn[] { + this.tableAnagTags.idxTagColumn}, new global::System.Data.DataColumn[] { + this.tableTags2Doc.idxTagColumn}, false); + this.Relations.Add(this.relationFK_Tags2Doc_AnagTags); + this.relationFK_Tags2Doc_tbDocumenti = new global::System.Data.DataRelation("FK_Tags2Doc_tbDocumenti", new global::System.Data.DataColumn[] { + this.tabletbDocumenti.idxFileColumn}, new global::System.Data.DataColumn[] { + this.tableTags2Doc.idxFileColumn}, false); + this.Relations.Add(this.relationFK_Tags2Doc_tbDocumenti); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -310,6 +350,12 @@ namespace ETS_Data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeTags2Doc() { + 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) { @@ -377,6 +423,9 @@ namespace ETS_Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void AnagTagsRowChangeEventHandler(object sender, AnagTagsRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void Tags2DocRowChangeEventHandler(object sender, Tags2DocRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -2078,6 +2127,286 @@ namespace ETS_Data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class Tags2DocDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidxFile; + + private global::System.Data.DataColumn columnidxTag; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public Tags2DocDataTable() { + this.TableName = "Tags2Doc"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal Tags2DocDataTable(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 Tags2DocDataTable(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 idxFileColumn { + get { + return this.columnidxFile; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn idxTagColumn { + get { + return this.columnidxTag; + } + } + + [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 Tags2DocRow this[int index] { + get { + return ((Tags2DocRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event Tags2DocRowChangeEventHandler Tags2DocRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event Tags2DocRowChangeEventHandler Tags2DocRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event Tags2DocRowChangeEventHandler Tags2DocRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event Tags2DocRowChangeEventHandler Tags2DocRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddTags2DocRow(Tags2DocRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public Tags2DocRow AddTags2DocRow(tbDocumentiRow parenttbDocumentiRowByFK_Tags2Doc_tbDocumenti, AnagTagsRow parentAnagTagsRowByFK_Tags2Doc_AnagTags) { + Tags2DocRow rowTags2DocRow = ((Tags2DocRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + null}; + if ((parenttbDocumentiRowByFK_Tags2Doc_tbDocumenti != null)) { + columnValuesArray[0] = parenttbDocumentiRowByFK_Tags2Doc_tbDocumenti[0]; + } + if ((parentAnagTagsRowByFK_Tags2Doc_AnagTags != null)) { + columnValuesArray[1] = parentAnagTagsRowByFK_Tags2Doc_AnagTags[0]; + } + rowTags2DocRow.ItemArray = columnValuesArray; + this.Rows.Add(rowTags2DocRow); + return rowTags2DocRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public Tags2DocRow FindByidxFileidxTag(int idxFile, int idxTag) { + return ((Tags2DocRow)(this.Rows.Find(new object[] { + idxFile, + idxTag}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + Tags2DocDataTable cln = ((Tags2DocDataTable)(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 Tags2DocDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnidxFile = base.Columns["idxFile"]; + this.columnidxTag = base.Columns["idxTag"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnidxFile = new global::System.Data.DataColumn("idxFile", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxFile); + this.columnidxTag = new global::System.Data.DataColumn("idxTag", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxTag); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidxFile, + this.columnidxTag}, true)); + this.columnidxFile.AllowDBNull = false; + this.columnidxTag.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public Tags2DocRow NewTags2DocRow() { + return ((Tags2DocRow)(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 Tags2DocRow(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(Tags2DocRow); + } + + [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.Tags2DocRowChanged != null)) { + this.Tags2DocRowChanged(this, new Tags2DocRowChangeEvent(((Tags2DocRow)(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.Tags2DocRowChanging != null)) { + this.Tags2DocRowChanging(this, new Tags2DocRowChangeEvent(((Tags2DocRow)(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.Tags2DocRowDeleted != null)) { + this.Tags2DocRowDeleted(this, new Tags2DocRowChangeEvent(((Tags2DocRow)(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.Tags2DocRowDeleting != null)) { + this.Tags2DocRowDeleting(this, new Tags2DocRowChangeEvent(((Tags2DocRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveTags2DocRow(Tags2DocRow 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_WebScip ds = new DS_WebScip(); + 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 = "Tags2DocDataTable"; + 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. /// @@ -3090,6 +3419,17 @@ namespace ETS_Data { public void SetNum_FatturaNull() { this[this.tabletbDocumenti.Num_FatturaColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public Tags2DocRow[] GetTags2DocRows() { + if ((this.Table.ChildRelations["FK_Tags2Doc_tbDocumenti"] == null)) { + return new Tags2DocRow[0]; + } + else { + return ((Tags2DocRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Tags2Doc_tbDocumenti"]))); + } + } } /// @@ -3237,6 +3577,76 @@ namespace ETS_Data { this[this.tableAnagTags.tagColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public Tags2DocRow[] GetTags2DocRows() { + if ((this.Table.ChildRelations["FK_Tags2Doc_AnagTags"] == null)) { + return new Tags2DocRow[0]; + } + else { + return ((Tags2DocRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Tags2Doc_AnagTags"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class Tags2DocRow : global::System.Data.DataRow { + + private Tags2DocDataTable tableTags2Doc; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal Tags2DocRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableTags2Doc = ((Tags2DocDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int idxFile { + get { + return ((int)(this[this.tableTags2Doc.idxFileColumn])); + } + set { + this[this.tableTags2Doc.idxFileColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int idxTag { + get { + return ((int)(this[this.tableTags2Doc.idxTagColumn])); + } + set { + this[this.tableTags2Doc.idxTagColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AnagTagsRow AnagTagsRow { + get { + return ((AnagTagsRow)(this.GetParentRow(this.Table.ParentRelations["FK_Tags2Doc_AnagTags"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_Tags2Doc_AnagTags"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public tbDocumentiRow tbDocumentiRow { + get { + return ((tbDocumentiRow)(this.GetParentRow(this.Table.ParentRelations["FK_Tags2Doc_tbDocumenti"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_Tags2Doc_tbDocumenti"]); + } + } } /// @@ -3374,6 +3784,40 @@ namespace ETS_Data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class Tags2DocRowChangeEvent : global::System.EventArgs { + + private Tags2DocRow 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 Tags2DocRowChangeEvent(Tags2DocRow 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 Tags2DocRow 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 ETS_Data.DS_WebScipTableAdapters { @@ -4548,6 +4992,8 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Autore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@newIdxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5819,7 +6265,23 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat [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 insertQuery(string nome, string fullPath, string userId, global::System.Nullable isProtocollo, global::System.Nullable DataRic, global::System.Nullable DataDoc, string NumeroCommessa, string AnnoCommessa, string Fase, string Fonte, string Oggetto, string InOut, string Autore, string Redattore) { + public virtual int insertQuery( + string nome, + string fullPath, + string userId, + global::System.Nullable isProtocollo, + global::System.Nullable DataRic, + global::System.Nullable DataDoc, + string NumeroCommessa, + string AnnoCommessa, + string Fase, + string Fonte, + string Oggetto, + string InOut, + string Autore, + string Redattore, + global::System.Nullable isRed, + ref global::System.Nullable newIdxFile) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((nome == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -5905,6 +6367,18 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat else { command.Parameters[14].Value = ((string)(Redattore)); } + if ((isRed.HasValue == true)) { + command.Parameters[15].Value = ((bool)(isRed.Value)); + } + else { + command.Parameters[15].Value = global::System.DBNull.Value; + } + if ((newIdxFile.HasValue == true)) { + command.Parameters[16].Value = ((int)(newIdxFile.Value)); + } + else { + command.Parameters[16].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -5919,6 +6393,13 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat command.Connection.Close(); } } + if (((command.Parameters[16].Value == null) + || (command.Parameters[16].Value.GetType() == typeof(global::System.DBNull)))) { + newIdxFile = new global::System.Nullable(); + } + else { + newIdxFile = new global::System.Nullable(((int)(command.Parameters[16].Value))); + } return returnValue; } } @@ -6798,6 +7279,307 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = } } + /// + ///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 Tags2DocTableAdapter : 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 Tags2DocTableAdapter() { + 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 = "Tags2Doc"; + tableMapping.ColumnMappings.Add("idxFile", "idxFile"); + tableMapping.ColumnMappings.Add("idxTag", "idxTag"); + 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].[Tags2Doc] WHERE (([idxFile] = @Original_idxFile) AND ([idxTag]" + + " = @Original_idxTag))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFile", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxTag", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxTag", 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].[Tags2Doc] ([idxFile], [idxTag]) VALUES (@idxFile, @idxTag);\r\nS" + + "ELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @id" + + "xTag)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFile", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxTag", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxTag", 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].[Tags2Doc] SET [idxFile] = @idxFile, [idxTag] = @idxTag WHERE (([idx" + + "File] = @Original_idxFile) AND ([idxTag] = @Original_idxTag));\r\nSELECT idxFile, " + + "idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @idxTag)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFile", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxTag", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxTag", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxFile", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxTag", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxTag", 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 = global::ETS_Data.Properties.Settings.Default.ETS_WSConnectionString; + } + + [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[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idxFile, idxTag FROM dbo.Tags2Doc"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [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_WebScip.Tags2DocDataTable 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_WebScip.Tags2DocDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_WebScip.Tags2DocDataTable dataTable = new DS_WebScip.Tags2DocDataTable(); + 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_WebScip.Tags2DocDataTable 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_WebScip dataSet) { + return this.Adapter.Update(dataSet, "Tags2Doc"); + } + + [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(int Original_idxFile, int Original_idxTag) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxFile)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_idxTag)); + 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(int idxFile, int idxTag) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idxFile)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(idxTag)); + 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(int idxFile, int idxTag, int Original_idxFile, int Original_idxTag) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idxFile)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(idxTag)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_idxFile)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_idxTag)); + 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(int Original_idxFile, int Original_idxTag) { + return this.Update(Original_idxFile, Original_idxTag, Original_idxFile, Original_idxTag); + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -6818,6 +7600,8 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = private AnagTagsTableAdapter _anagTagsTableAdapter; + private Tags2DocTableAdapter _tags2DocTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -6889,6 +7673,20 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = } } + [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 Tags2DocTableAdapter Tags2DocTableAdapter { + get { + return this._tags2DocTableAdapter; + } + set { + this._tags2DocTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -6924,6 +7722,10 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = && (this._anagTagsTableAdapter.Connection != null))) { return this._anagTagsTableAdapter.Connection; } + if (((this._tags2DocTableAdapter != null) + && (this._tags2DocTableAdapter.Connection != null))) { + return this._tags2DocTableAdapter.Connection; + } return null; } set { @@ -6949,6 +7751,9 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = if ((this._anagTagsTableAdapter != null)) { count = (count + 1); } + if ((this._tags2DocTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -6960,15 +7765,6 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateUpdatedRows(DS_WebScip dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { int result = 0; - if ((this._tmpFileUtTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._tmpFileUtTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._tbDocumentiTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.tbDocumenti.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -6978,6 +7774,24 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = allChangedRows.AddRange(updatedRows); } } + if ((this._anagTagsTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.AnagTags.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._anagTagsTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._tmpFileUtTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tmpFileUtTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._anagFasiTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.AnagFasi.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -6987,12 +7801,12 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = allChangedRows.AddRange(updatedRows); } } - if ((this._anagTagsTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.AnagTags.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + if ((this._tags2DocTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); if (((updatedRows != null) && (0 < updatedRows.Length))) { - result = (result + this._anagTagsTableAdapter.Update(updatedRows)); + result = (result + this._tags2DocTableAdapter.Update(updatedRows)); allChangedRows.AddRange(updatedRows); } } @@ -7006,14 +7820,6 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateInsertedRows(DS_WebScip dataSet, global::System.Collections.Generic.List allAddedRows) { int result = 0; - if ((this._tmpFileUtTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._tmpFileUtTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._tbDocumentiTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.tbDocumenti.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -7022,6 +7828,22 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = allAddedRows.AddRange(addedRows); } } + if ((this._anagTagsTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.AnagTags.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._anagTagsTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._tmpFileUtTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tmpFileUtTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._anagFasiTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.AnagFasi.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -7030,11 +7852,11 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = allAddedRows.AddRange(addedRows); } } - if ((this._anagTagsTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.AnagTags.Select(null, null, global::System.Data.DataViewRowState.Added); + if ((this._tags2DocTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) && (0 < addedRows.Length))) { - result = (result + this._anagTagsTableAdapter.Update(addedRows)); + result = (result + this._tags2DocTableAdapter.Update(addedRows)); allAddedRows.AddRange(addedRows); } } @@ -7048,11 +7870,11 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(DS_WebScip dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._anagTagsTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.AnagTags.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if ((this._tags2DocTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Tags2Doc.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) && (0 < deletedRows.Length))) { - result = (result + this._anagTagsTableAdapter.Update(deletedRows)); + result = (result + this._tags2DocTableAdapter.Update(deletedRows)); allChangedRows.AddRange(deletedRows); } } @@ -7064,14 +7886,6 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = allChangedRows.AddRange(deletedRows); } } - if ((this._tbDocumentiTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.tbDocumenti.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._tbDocumentiTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._tmpFileUtTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.tmpFileUt.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -7080,6 +7894,22 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = allChangedRows.AddRange(deletedRows); } } + if ((this._anagTagsTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.AnagTags.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._anagTagsTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._tbDocumentiTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tbDocumenti.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tbDocumentiTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } return result; } @@ -7139,6 +7969,11 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._tags2DocTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tags2DocTableAdapter.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" + @@ -7207,6 +8042,15 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = adaptersWithAcceptChangesDuringUpdate.Add(this._anagTagsTableAdapter.Adapter); } } + if ((this._tags2DocTableAdapter != null)) { + revertConnections.Add(this._tags2DocTableAdapter, this._tags2DocTableAdapter.Connection); + this._tags2DocTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tags2DocTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tags2DocTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tags2DocTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tags2DocTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -7281,6 +8125,10 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = this._anagTagsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagTagsTableAdapter])); this._anagTagsTableAdapter.Transaction = null; } + if ((this._tags2DocTableAdapter != null)) { + this._tags2DocTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tags2DocTableAdapter])); + this._tags2DocTableAdapter.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/ETS_Data/DS_WebScip.xsd b/ETS_Data/DS_WebScip.xsd index 2477a70..e896934 100644 --- a/ETS_Data/DS_WebScip.xsd +++ b/ETS_Data/DS_WebScip.xsd @@ -429,6 +429,8 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat + + @@ -595,6 +597,54 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag) + + + + + + DELETE FROM [dbo].[Tags2Doc] WHERE (([idxFile] = @Original_idxFile) AND ([idxTag] = @Original_idxTag)) + + + + + + + + + INSERT INTO [dbo].[Tags2Doc] ([idxFile], [idxTag]) VALUES (@idxFile, @idxTag); +SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @idxTag) + + + + + + + + + SELECT idxFile, idxTag FROM dbo.Tags2Doc + + + + + + UPDATE [dbo].[Tags2Doc] SET [idxFile] = @idxFile, [idxTag] = @idxTag WHERE (([idxFile] = @Original_idxFile) AND ([idxTag] = @Original_idxTag)); +SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @idxTag) + + + + + + + + + + + + + + + + @@ -877,6 +927,14 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag) + + + + + + + + @@ -895,5 +953,16 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag) + + + + + + + + + + + \ No newline at end of file diff --git a/ETS_Data/DS_WebScip.xss b/ETS_Data/DS_WebScip.xss index 418cf92..cfc76e5 100644 --- a/ETS_Data/DS_WebScip.xss +++ b/ETS_Data/DS_WebScip.xss @@ -4,12 +4,38 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - - + + + - + + + + + 844 + 254 + + + 844 + 345 + + + + + + + 642 + 459 + + + 736 + 459 + + + + \ No newline at end of file diff --git a/ETS_Data/utils.cs b/ETS_Data/utils.cs index 3a36732..5416f98 100644 --- a/ETS_Data/utils.cs +++ b/ETS_Data/utils.cs @@ -24,6 +24,7 @@ namespace ETS_Data public DS_utilsTableAdapters.stp_calcolaProtocolloTableAdapter taCalcProto; public DS_WebScipTableAdapters.tbDocumentiTableAdapter taDoc; + public DS_WebScipTableAdapters.Tags2DocTableAdapter taTags2Doc; /// @@ -40,8 +41,9 @@ namespace ETS_Data taTDSelCommesse = new DS_utilsTableAdapters.v_tbDocs_selCommesseTableAdapter(); taTDSelFasi = new DS_utilsTableAdapters.v_tbDocs_selFasiTableAdapter(); taTDSelOggetti = new DS_utilsTableAdapters.v_tbDocs_selOggettoTableAdapter(); - taDoc = new DS_WebScipTableAdapters.tbDocumentiTableAdapter(); taCalcProto = new DS_utilsTableAdapters.stp_calcolaProtocolloTableAdapter(); + taDoc = new DS_WebScipTableAdapters.tbDocumentiTableAdapter(); + taTags2Doc = new DS_WebScipTableAdapters.Tags2DocTableAdapter(); } /// /// effettua setup dei connection strings da web.config delal singola applicazione @@ -61,8 +63,9 @@ namespace ETS_Data taTDSelCommesse.Connection.ConnectionString = connStringETS_WS; taTDSelFasi.Connection.ConnectionString = connStringETS_WS; taTDSelOggetti.Connection.ConnectionString = connStringETS_WS; - taDoc.Connection.ConnectionString = connStringETS_WS; taCalcProto.Connection.ConnectionString = connStringETS_WS; + taDoc.Connection.ConnectionString = connStringETS_WS; + taTags2Doc.Connection.ConnectionString = connStringETS_WS; } #endregion @@ -350,7 +353,7 @@ namespace ETS_Data #endregion - #region area vaire + #region area varie /// /// ripulisce la stringa da eventuali caratteri non ammessi quali