diff --git a/CMS-SC-Data/DS_Applicazione.Designer.cs b/CMS-SC-Data/DS_Applicazione.Designer.cs index 20133f4..bf7ded0 100644 --- a/CMS-SC-Data/DS_Applicazione.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione.Designer.cs @@ -1713,6 +1713,8 @@ namespace CMS_SC_Data { private global::System.Data.DataColumn columnFasiEnab; + private global::System.Data.DataColumn columnCodVisib; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public AnagSchedeDataTable() { @@ -1786,6 +1788,14 @@ namespace CMS_SC_Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn CodVisibColumn { + get { + return this.columnCodVisib; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -1823,14 +1833,15 @@ namespace CMS_SC_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public AnagSchedeRow AddAnagSchedeRow(string CodScheda, int Vers, string Descrizione, string Path, string FasiEnab) { + public AnagSchedeRow AddAnagSchedeRow(string CodScheda, int Vers, string Descrizione, string Path, string FasiEnab, string CodVisib) { AnagSchedeRow rowAnagSchedeRow = ((AnagSchedeRow)(this.NewRow())); object[] columnValuesArray = new object[] { CodScheda, Vers, Descrizione, Path, - FasiEnab}; + FasiEnab, + CodVisib}; rowAnagSchedeRow.ItemArray = columnValuesArray; this.Rows.Add(rowAnagSchedeRow); return rowAnagSchedeRow; @@ -1866,6 +1877,7 @@ namespace CMS_SC_Data { this.columnDescrizione = base.Columns["Descrizione"]; this.columnPath = base.Columns["Path"]; this.columnFasiEnab = base.Columns["FasiEnab"]; + this.columnCodVisib = base.Columns["CodVisib"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1881,6 +1893,8 @@ namespace CMS_SC_Data { base.Columns.Add(this.columnPath); this.columnFasiEnab = new global::System.Data.DataColumn("FasiEnab", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnFasiEnab); + this.columnCodVisib = new global::System.Data.DataColumn("CodVisib", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodVisib); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnVers, this.columnCodScheda}, true)); @@ -1893,6 +1907,8 @@ namespace CMS_SC_Data { this.columnPath.MaxLength = 2147483647; this.columnFasiEnab.AllowDBNull = false; this.columnFasiEnab.MaxLength = 2147483647; + this.columnCodVisib.AllowDBNull = false; + this.columnCodVisib.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5981,6 +5997,17 @@ namespace CMS_SC_Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string CodVisib { + get { + return ((string)(this[this.tableAnagSchede.CodVisibColumn])); + } + set { + this[this.tableAnagSchede.CodVisibColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public DettSchedaRow[] GetDettSchedaRows() { @@ -9797,38 +9824,44 @@ SELECT Fase, Descrizione FROM AnagFasi WHERE (Fase = @Fase)"; tableMapping.ColumnMappings.Add("Descrizione", "Descrizione"); tableMapping.ColumnMappings.Add("Path", "Path"); tableMapping.ColumnMappings.Add("FasiEnab", "FasiEnab"); + tableMapping.ColumnMappings.Add("CodVisib", "CodVisib"); 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].[AnagSchede] WHERE (([CodScheda] = @Original_CodScheda) AND ([V" + - "ers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione))"; + "ers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione) AND ([CodVisi" + + "b] = @Original_CodVisib))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodScheda", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodScheda", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vers", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vers", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Descrizione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodVisib", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodVisib", 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].[AnagSchede] ([CodScheda], [Vers], [Descrizione], [Path], [FasiEnab]) VALUES (@CodScheda, @Vers, @Descrizione, @Path, @FasiEnab); -SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers)"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[AnagSchede] ([CodScheda], [Vers], [Descrizione], [Path], [FasiEnab], [CodVisib]) VALUES (@CodScheda, @Vers, @Descrizione, @Path, @FasiEnab, @CodVisib); +SELECT CodScheda, Vers, Descrizione, Path, FasiEnab, CodVisib FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodScheda", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodScheda", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Vers", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vers", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Path", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Path", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FasiEnab", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FasiEnab", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodVisib", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodVisib", 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].[AnagSchede] SET [CodScheda] = @CodScheda, [Vers] = @Vers, [Descrizione] = @Descrizione, [Path] = @Path, [FasiEnab] = @FasiEnab WHERE (([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione)); -SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[AnagSchede] SET [CodScheda] = @CodScheda, [Vers] = @Vers, [Descrizione] = @Descrizione, [Path] = @Path, [FasiEnab] = @FasiEnab, [CodVisib] = @CodVisib WHERE (([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione) AND ([CodVisib] = @Original_CodVisib)); +SELECT CodScheda, Vers, Descrizione, Path, FasiEnab, CodVisib FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodScheda", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodScheda", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Vers", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vers", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Path", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Path", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FasiEnab", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FasiEnab", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodVisib", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodVisib", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodScheda", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodScheda", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vers", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vers", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Descrizione", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodVisib", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodVisib", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9879,6 +9912,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Path", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FasiEnab", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodVisib", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodScheda", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vers", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -9957,7 +9991,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc [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_CodScheda, int Original_Vers, string Original_Descrizione) { + public virtual int Delete(string Original_CodScheda, int Original_Vers, string Original_Descrizione, string Original_CodVisib) { if ((Original_CodScheda == null)) { throw new global::System.ArgumentNullException("Original_CodScheda"); } @@ -9971,6 +10005,12 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc else { this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Descrizione)); } + if ((Original_CodVisib == null)) { + throw new global::System.ArgumentNullException("Original_CodVisib"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_CodVisib)); + } 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)) { @@ -9991,7 +10031,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc [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 CodScheda, int Vers, string Descrizione, string Path, string FasiEnab) { + public virtual int Insert(string CodScheda, int Vers, string Descrizione, string Path, string FasiEnab, string CodVisib) { if ((CodScheda == null)) { throw new global::System.ArgumentNullException("CodScheda"); } @@ -10017,6 +10057,12 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc else { this.Adapter.InsertCommand.Parameters[4].Value = ((string)(FasiEnab)); } + if ((CodVisib == null)) { + throw new global::System.ArgumentNullException("CodVisib"); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(CodVisib)); + } 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)) { @@ -10037,7 +10083,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc [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 CodScheda, int Vers, string Descrizione, string Path, string FasiEnab, string Original_CodScheda, int Original_Vers, string Original_Descrizione) { + public virtual int Update(string CodScheda, int Vers, string Descrizione, string Path, string FasiEnab, string CodVisib, string Original_CodScheda, int Original_Vers, string Original_Descrizione, string Original_CodVisib) { if ((CodScheda == null)) { throw new global::System.ArgumentNullException("CodScheda"); } @@ -10063,18 +10109,30 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc else { this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(FasiEnab)); } + if ((CodVisib == null)) { + throw new global::System.ArgumentNullException("CodVisib"); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(CodVisib)); + } if ((Original_CodScheda == null)) { throw new global::System.ArgumentNullException("Original_CodScheda"); } else { - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_CodScheda)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_CodScheda)); } - this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Vers)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Vers)); if ((Original_Descrizione == null)) { throw new global::System.ArgumentNullException("Original_Descrizione"); } else { - this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Descrizione)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Descrizione)); + } + if ((Original_CodVisib == null)) { + throw new global::System.ArgumentNullException("Original_CodVisib"); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CodVisib)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -10096,8 +10154,8 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc [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 Descrizione, string Path, string FasiEnab, string Original_CodScheda, int Original_Vers, string Original_Descrizione) { - return this.Update(Original_CodScheda, Original_Vers, Descrizione, Path, FasiEnab, Original_CodScheda, Original_Vers, Original_Descrizione); + public virtual int Update(string Descrizione, string Path, string FasiEnab, string CodVisib, string Original_CodScheda, int Original_Vers, string Original_Descrizione, string Original_CodVisib) { + return this.Update(Original_CodScheda, Original_Vers, Descrizione, Path, FasiEnab, CodVisib, Original_CodScheda, Original_Vers, Original_Descrizione, Original_CodVisib); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10192,7 +10250,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc [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 CodScheda, global::System.Nullable Vers, string Descrizione, string Path, string FasiEnab, string Original_CodScheda, global::System.Nullable Original_Vers) { + public virtual int updateQuery(string CodScheda, global::System.Nullable Vers, string Descrizione, string Path, string FasiEnab, string CodVisib, string Original_CodScheda, global::System.Nullable Original_Vers) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((CodScheda == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -10224,17 +10282,23 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc else { command.Parameters[5].Value = ((string)(FasiEnab)); } - if ((Original_CodScheda == null)) { + if ((CodVisib == null)) { command.Parameters[6].Value = global::System.DBNull.Value; } else { - command.Parameters[6].Value = ((string)(Original_CodScheda)); + command.Parameters[6].Value = ((string)(CodVisib)); } - if ((Original_Vers.HasValue == true)) { - command.Parameters[7].Value = ((int)(Original_Vers.Value)); + if ((Original_CodScheda == null)) { + command.Parameters[7].Value = global::System.DBNull.Value; } else { - command.Parameters[7].Value = global::System.DBNull.Value; + command.Parameters[7].Value = ((string)(Original_CodScheda)); + } + if ((Original_Vers.HasValue == true)) { + command.Parameters[8].Value = ((int)(Original_Vers.Value)); + } + else { + command.Parameters[8].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) diff --git a/CMS-SC-Data/DS_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index bad7722..c736973 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -4,7 +4,7 @@ - + @@ -304,24 +304,26 @@ SELECT Fase, Descrizione FROM AnagFasi WHERE (Fase = @Fase) - DELETE FROM [dbo].[AnagSchede] WHERE (([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione)) + DELETE FROM [dbo].[AnagSchede] WHERE (([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione) AND ([CodVisib] = @Original_CodVisib)) + - INSERT INTO [dbo].[AnagSchede] ([CodScheda], [Vers], [Descrizione], [Path], [FasiEnab]) VALUES (@CodScheda, @Vers, @Descrizione, @Path, @FasiEnab); -SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers) + INSERT INTO [dbo].[AnagSchede] ([CodScheda], [Vers], [Descrizione], [Path], [FasiEnab], [CodVisib]) VALUES (@CodScheda, @Vers, @Descrizione, @Path, @FasiEnab, @CodVisib); +SELECT CodScheda, Vers, Descrizione, Path, FasiEnab, CodVisib FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers) + @@ -333,17 +335,19 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc - UPDATE [dbo].[AnagSchede] SET [CodScheda] = @CodScheda, [Vers] = @Vers, [Descrizione] = @Descrizione, [Path] = @Path, [FasiEnab] = @FasiEnab WHERE (([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione)); -SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers) + UPDATE [dbo].[AnagSchede] SET [CodScheda] = @CodScheda, [Vers] = @Vers, [Descrizione] = @Descrizione, [Path] = @Path, [FasiEnab] = @FasiEnab, [CodVisib] = @CodVisib WHERE (([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([Descrizione] = @Original_Descrizione) AND ([CodVisib] = @Original_CodVisib)); +SELECT CodScheda, Vers, Descrizione, Path, FasiEnab, CodVisib FROM AnagSchede WHERE (CodScheda = @CodScheda) AND (Vers = @Vers) + + @@ -355,6 +359,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc + @@ -406,6 +411,7 @@ SELECT CodScheda, Vers, Descrizione, Path, FasiEnab FROM AnagSchede WHERE (CodSc + @@ -1483,6 +1489,13 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) + + + + + + + diff --git a/CMS-SC-Data/DS_Applicazione.xss b/CMS-SC-Data/DS_Applicazione.xss index 8c6879e..12c5592 100644 --- a/CMS-SC-Data/DS_Applicazione.xss +++ b/CMS-SC-Data/DS_Applicazione.xss @@ -4,17 +4,17 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + - + @@ -25,11 +25,11 @@ 367 - 574 + 566 414 - 574 + 566 @@ -40,7 +40,7 @@ 53 - 1006 + 1029 53 @@ -61,7 +61,7 @@ 227 - 371 + 363 227 @@ -97,11 +97,11 @@ 367 - 410 + 402 738 - 410 + 402 @@ -112,7 +112,7 @@ 379 - 994 + 1018 379 @@ -133,7 +133,7 @@ 807 - 518 + 529 807 diff --git a/CMS-SC-Data/DS_Utility.Designer.cs b/CMS-SC-Data/DS_Utility.Designer.cs index 9d7c465..6ae1b38 100644 --- a/CMS-SC-Data/DS_Utility.Designer.cs +++ b/CMS-SC-Data/DS_Utility.Designer.cs @@ -42,6 +42,8 @@ namespace CMS_SC_Data { private VocabolarioDataTable tableVocabolario; + private tblFilesDataTable tabletblFiles; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -97,6 +99,9 @@ namespace CMS_SC_Data { if ((ds.Tables["Vocabolario"] != null)) { base.Tables.Add(new VocabolarioDataTable(ds.Tables["Vocabolario"])); } + if ((ds.Tables["tblFiles"] != null)) { + base.Tables.Add(new tblFilesDataTable(ds.Tables["tblFiles"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -205,6 +210,16 @@ namespace CMS_SC_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 tblFilesDataTable tblFiles { + get { + return this.tabletblFiles; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -299,6 +314,9 @@ namespace CMS_SC_Data { if ((ds.Tables["Vocabolario"] != null)) { base.Tables.Add(new VocabolarioDataTable(ds.Tables["Vocabolario"])); } + if ((ds.Tables["tblFiles"] != null)) { + base.Tables.Add(new tblFilesDataTable(ds.Tables["tblFiles"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -386,6 +404,12 @@ namespace CMS_SC_Data { this.tableVocabolario.InitVars(); } } + this.tabletblFiles = ((tblFilesDataTable)(base.Tables["tblFiles"])); + if ((initTable == true)) { + if ((this.tabletblFiles != null)) { + this.tabletblFiles.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -414,6 +438,8 @@ namespace CMS_SC_Data { base.Tables.Add(this.tablev_selLingue); this.tableVocabolario = new VocabolarioDataTable(); base.Tables.Add(this.tableVocabolario); + this.tabletblFiles = new tblFilesDataTable(); + base.Tables.Add(this.tabletblFiles); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -470,6 +496,12 @@ namespace CMS_SC_Data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializetblFiles() { + 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) { @@ -552,6 +584,9 @@ namespace CMS_SC_Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void VocabolarioRowChangeEventHandler(object sender, VocabolarioRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void tblFilesRowChangeEventHandler(object sender, tblFilesRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -3085,6 +3120,345 @@ namespace CMS_SC_Data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class tblFilesDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidxFile; + + private global::System.Data.DataColumn columnDataMod; + + private global::System.Data.DataColumn columnFileName; + + private global::System.Data.DataColumn columnContentType; + + private global::System.Data.DataColumn columnData; + + private global::System.Data.DataColumn columnSize; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public tblFilesDataTable() { + this.TableName = "tblFiles"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal tblFilesDataTable(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 tblFilesDataTable(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 DataModColumn { + get { + return this.columnDataMod; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn FileNameColumn { + get { + return this.columnFileName; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn ContentTypeColumn { + get { + return this.columnContentType; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn DataColumn { + get { + return this.columnData; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn SizeColumn { + get { + return this.columnSize; + } + } + + [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 tblFilesRow this[int index] { + get { + return ((tblFilesRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event tblFilesRowChangeEventHandler tblFilesRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event tblFilesRowChangeEventHandler tblFilesRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event tblFilesRowChangeEventHandler tblFilesRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event tblFilesRowChangeEventHandler tblFilesRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddtblFilesRow(tblFilesRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public tblFilesRow AddtblFilesRow(System.DateTime DataMod, string FileName, string ContentType, byte[] Data, long Size) { + tblFilesRow rowtblFilesRow = ((tblFilesRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + DataMod, + FileName, + ContentType, + Data, + Size}; + rowtblFilesRow.ItemArray = columnValuesArray; + this.Rows.Add(rowtblFilesRow); + return rowtblFilesRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public tblFilesRow FindByidxFile(int idxFile) { + return ((tblFilesRow)(this.Rows.Find(new object[] { + idxFile}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + tblFilesDataTable cln = ((tblFilesDataTable)(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 tblFilesDataTable(); + } + + [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.columnDataMod = base.Columns["DataMod"]; + this.columnFileName = base.Columns["FileName"]; + this.columnContentType = base.Columns["ContentType"]; + this.columnData = base.Columns["Data"]; + this.columnSize = base.Columns["Size"]; + } + + [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.columnDataMod = new global::System.Data.DataColumn("DataMod", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDataMod); + this.columnFileName = new global::System.Data.DataColumn("FileName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFileName); + this.columnContentType = new global::System.Data.DataColumn("ContentType", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnContentType); + this.columnData = new global::System.Data.DataColumn("Data", typeof(byte[]), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnData); + this.columnSize = new global::System.Data.DataColumn("Size", typeof(long), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSize); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidxFile}, true)); + this.columnidxFile.AutoIncrement = true; + this.columnidxFile.AutoIncrementSeed = -1; + this.columnidxFile.AutoIncrementStep = -1; + this.columnidxFile.AllowDBNull = false; + this.columnidxFile.ReadOnly = true; + this.columnidxFile.Unique = true; + this.columnDataMod.AllowDBNull = false; + this.columnFileName.AllowDBNull = false; + this.columnFileName.MaxLength = 50; + this.columnContentType.AllowDBNull = false; + this.columnContentType.MaxLength = 250; + this.columnData.AllowDBNull = false; + this.columnSize.ReadOnly = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public tblFilesRow NewtblFilesRow() { + return ((tblFilesRow)(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 tblFilesRow(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(tblFilesRow); + } + + [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.tblFilesRowChanged != null)) { + this.tblFilesRowChanged(this, new tblFilesRowChangeEvent(((tblFilesRow)(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.tblFilesRowChanging != null)) { + this.tblFilesRowChanging(this, new tblFilesRowChangeEvent(((tblFilesRow)(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.tblFilesRowDeleted != null)) { + this.tblFilesRowDeleted(this, new tblFilesRowChangeEvent(((tblFilesRow)(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.tblFilesRowDeleting != null)) { + this.tblFilesRowDeleting(this, new tblFilesRowChangeEvent(((tblFilesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemovetblFilesRow(tblFilesRow 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_Utility ds = new DS_Utility(); + 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 = "tblFilesDataTable"; + 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. /// @@ -3626,6 +4000,104 @@ namespace CMS_SC_Data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class tblFilesRow : global::System.Data.DataRow { + + private tblFilesDataTable tabletblFiles; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal tblFilesRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabletblFiles = ((tblFilesDataTable)(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.tabletblFiles.idxFileColumn])); + } + set { + this[this.tabletblFiles.idxFileColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public System.DateTime DataMod { + get { + return ((global::System.DateTime)(this[this.tabletblFiles.DataModColumn])); + } + set { + this[this.tabletblFiles.DataModColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string FileName { + get { + return ((string)(this[this.tabletblFiles.FileNameColumn])); + } + set { + this[this.tabletblFiles.FileNameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string ContentType { + get { + return ((string)(this[this.tabletblFiles.ContentTypeColumn])); + } + set { + this[this.tabletblFiles.ContentTypeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public byte[] Data { + get { + return ((byte[])(this[this.tabletblFiles.DataColumn])); + } + set { + this[this.tabletblFiles.DataColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public long Size { + get { + try { + return ((long)(this[this.tabletblFiles.SizeColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Size\' in table \'tblFiles\' is DBNull.", e); + } + } + set { + this[this.tabletblFiles.SizeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsSizeNull() { + return this.IsNull(this.tabletblFiles.SizeColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetSizeNull() { + this[this.tabletblFiles.SizeColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -3931,6 +4403,40 @@ namespace CMS_SC_Data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class tblFilesRowChangeEvent : global::System.EventArgs { + + private tblFilesRow 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 tblFilesRowChangeEvent(tblFilesRow 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 tblFilesRow 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 CMS_SC_Data.DS_UtilityTableAdapters { @@ -6282,6 +6788,557 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li } } + /// + ///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 tblFilesTableAdapter : 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 tblFilesTableAdapter() { + 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 = "tblFiles"; + tableMapping.ColumnMappings.Add("idxFile", "idxFile"); + tableMapping.ColumnMappings.Add("DataMod", "DataMod"); + tableMapping.ColumnMappings.Add("FileName", "FileName"); + tableMapping.ColumnMappings.Add("ContentType", "ContentType"); + tableMapping.ColumnMappings.Add("Data", "Data"); + tableMapping.ColumnMappings.Add("Size", "Size"); + 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].[tblFiles] WHERE (([idxFile] = @Original_idxFile) AND ([DataMod] = @Original_DataMod) AND ([FileName] = @Original_FileName) AND ([ContentType] = @Original_ContentType) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([Size] = @Original_Size)))"; + 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_DataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataMod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FileName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContentType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContentType", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Size", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Size", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", 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].[tblFiles] ([DataMod], [FileName], [ContentType], [Data]) VALUE" + + "S (@DataMod, @FileName, @ContentType, @Data);\r\nSELECT idxFile, DataMod, FileName" + + ", ContentType, Data, Size FROM tblFiles WHERE (idxFile = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataMod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FileName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContentType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContentType", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Data", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Data", 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].[tblFiles] SET [DataMod] = @DataMod, [FileName] = @FileName, [ContentType] = @ContentType, [Data] = @Data WHERE (([idxFile] = @Original_idxFile) AND ([DataMod] = @Original_DataMod) AND ([FileName] = @Original_FileName) AND ([ContentType] = @Original_ContentType) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([Size] = @Original_Size))); +SELECT idxFile, DataMod, FileName, ContentType, Data, Size FROM tblFiles WHERE (idxFile = @idxFile)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataMod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FileName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContentType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContentType", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Data", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Data", 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_DataMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataMod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FileName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContentType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContentType", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Size", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Size", global::System.Data.SqlDbType.BigInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Size", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idxFile", global::System.Data.DataRowVersion.Current, 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::CMS_SC_Data.Properties.Settings.Default.CMS_SCConnectionString; + } + + [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[5]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idxFile, DataMod, FileName, ContentType, Data, Size FROM dbo.tblFiles"; + 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_file_DeleteQuery"; + 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_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_file_getByKey"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_file_InsertQuery"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FileName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContentType", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Data", global::System.Data.SqlDbType.VarBinary, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_file_UpdateQuery"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FileName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContentType", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Data", global::System.Data.SqlDbType.VarBinary, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_Utility.tblFilesDataTable 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_Utility.tblFilesDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Utility.tblFilesDataTable dataTable = new DS_Utility.tblFilesDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Utility.tblFilesDataTable getByKey(global::System.Nullable idxFile) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((idxFile.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxFile.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_Utility.tblFilesDataTable dataTable = new DS_Utility.tblFilesDataTable(); + 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_Utility.tblFilesDataTable 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_Utility dataSet) { + return this.Adapter.Update(dataSet, "tblFiles"); + } + + [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, System.DateTime Original_DataMod, string Original_FileName, string Original_ContentType, global::System.Nullable Original_Size) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxFile)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_DataMod)); + if ((Original_FileName == null)) { + throw new global::System.ArgumentNullException("Original_FileName"); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_FileName)); + } + if ((Original_ContentType == null)) { + throw new global::System.ArgumentNullException("Original_ContentType"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ContentType)); + } + if ((Original_Size.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((long)(Original_Size.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + 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(System.DateTime DataMod, string FileName, string ContentType, byte[] Data) { + this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(DataMod)); + if ((FileName == null)) { + throw new global::System.ArgumentNullException("FileName"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(FileName)); + } + if ((ContentType == null)) { + throw new global::System.ArgumentNullException("ContentType"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ContentType)); + } + if ((Data == null)) { + throw new global::System.ArgumentNullException("Data"); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((byte[])(Data)); + } + 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(System.DateTime DataMod, string FileName, string ContentType, byte[] Data, int Original_idxFile, System.DateTime Original_DataMod, string Original_FileName, string Original_ContentType, global::System.Nullable Original_Size, int idxFile) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((System.DateTime)(DataMod)); + if ((FileName == null)) { + throw new global::System.ArgumentNullException("FileName"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(FileName)); + } + if ((ContentType == null)) { + throw new global::System.ArgumentNullException("ContentType"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ContentType)); + } + if ((Data == null)) { + throw new global::System.ArgumentNullException("Data"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((byte[])(Data)); + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_idxFile)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_DataMod)); + if ((Original_FileName == null)) { + throw new global::System.ArgumentNullException("Original_FileName"); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_FileName)); + } + if ((Original_ContentType == null)) { + throw new global::System.ArgumentNullException("Original_ContentType"); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_ContentType)); + } + if ((Original_Size.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((long)(Original_Size.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(idxFile)); + 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(System.DateTime DataMod, string FileName, string ContentType, byte[] Data, int Original_idxFile, System.DateTime Original_DataMod, string Original_FileName, string Original_ContentType, global::System.Nullable Original_Size) { + return this.Update(DataMod, FileName, ContentType, Data, Original_idxFile, Original_DataMod, Original_FileName, Original_ContentType, Original_Size, Original_idxFile); + } + + [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 deleteQuery(global::System.Nullable Original_idxFile) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_idxFile.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_idxFile.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertQuery(string FileName, string ContentType, byte[] Data) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((FileName == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(FileName)); + } + if ((ContentType == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ContentType)); + } + if ((Data == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((byte[])(Data)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateQuery(string FileName, string ContentType, byte[] Data, global::System.Nullable Original_idxFile) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + if ((FileName == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(FileName)); + } + if ((ContentType == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ContentType)); + } + if ((Data == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((byte[])(Data)); + } + if ((Original_idxFile.HasValue == true)) { + command.Parameters[4].Value = ((int)(Original_idxFile.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -6298,6 +7355,8 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li private VocabolarioTableAdapter _vocabolarioTableAdapter; + private tblFilesTableAdapter _tblFilesTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -6341,6 +7400,20 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li } } + [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 tblFilesTableAdapter tblFilesTableAdapter { + get { + return this._tblFilesTableAdapter; + } + set { + this._tblFilesTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -6368,6 +7441,10 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li && (this._vocabolarioTableAdapter.Connection != null))) { return this._vocabolarioTableAdapter.Connection; } + if (((this._tblFilesTableAdapter != null) + && (this._tblFilesTableAdapter.Connection != null))) { + return this._tblFilesTableAdapter.Connection; + } return null; } set { @@ -6387,6 +7464,9 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li if ((this._vocabolarioTableAdapter != null)) { count = (count + 1); } + if ((this._tblFilesTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -6416,6 +7496,15 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li allChangedRows.AddRange(updatedRows); } } + if ((this._tblFilesTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.tblFiles.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._tblFilesTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -6442,6 +7531,14 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li allAddedRows.AddRange(addedRows); } } + if ((this._tblFilesTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.tblFiles.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._tblFilesTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -6452,6 +7549,14 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(DS_Utility dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._tblFilesTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.tblFiles.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._tblFilesTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._vocabolarioTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Vocabolario.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -6517,6 +7622,11 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._tblFilesTableAdapter != null) + && (this.MatchTableAdapterConnection(this._tblFilesTableAdapter.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" + @@ -6567,6 +7677,15 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li adaptersWithAcceptChangesDuringUpdate.Add(this._vocabolarioTableAdapter.Adapter); } } + if ((this._tblFilesTableAdapter != null)) { + revertConnections.Add(this._tblFilesTableAdapter, this._tblFilesTableAdapter.Connection); + this._tblFilesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._tblFilesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._tblFilesTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._tblFilesTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._tblFilesTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -6633,6 +7752,10 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li this._vocabolarioTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._vocabolarioTableAdapter])); this._vocabolarioTableAdapter.Transaction = null; } + if ((this._tblFilesTableAdapter != null)) { + this._tblFilesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._tblFilesTableAdapter])); + this._tblFilesTableAdapter.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/CMS-SC-Data/DS_Utility.xsd b/CMS-SC-Data/DS_Utility.xsd index ce16233..726d7bb 100644 --- a/CMS-SC-Data/DS_Utility.xsd +++ b/CMS-SC-Data/DS_Utility.xsd @@ -386,6 +386,121 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li + + + + + + DELETE FROM [dbo].[tblFiles] WHERE (([idxFile] = @Original_idxFile) AND ([DataMod] = @Original_DataMod) AND ([FileName] = @Original_FileName) AND ([ContentType] = @Original_ContentType) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([Size] = @Original_Size))) + + + + + + + + + + + + + INSERT INTO [dbo].[tblFiles] ([DataMod], [FileName], [ContentType], [Data]) VALUES (@DataMod, @FileName, @ContentType, @Data); +SELECT idxFile, DataMod, FileName, ContentType, Data, Size FROM tblFiles WHERE (idxFile = SCOPE_IDENTITY()) + + + + + + + + + + + SELECT idxFile, DataMod, FileName, ContentType, Data, Size FROM dbo.tblFiles + + + + + + UPDATE [dbo].[tblFiles] SET [DataMod] = @DataMod, [FileName] = @FileName, [ContentType] = @ContentType, [Data] = @Data WHERE (([idxFile] = @Original_idxFile) AND ([DataMod] = @Original_DataMod) AND ([FileName] = @Original_FileName) AND ([ContentType] = @Original_ContentType) AND ((@IsNull_Size = 1 AND [Size] IS NULL) OR ([Size] = @Original_Size))); +SELECT idxFile, DataMod, FileName, ContentType, Data, Size FROM tblFiles WHERE (idxFile = @idxFile) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_file_DeleteQuery + + + + + + + + + + + dbo.stp_file_getByKey + + + + + + + + + + + dbo.stp_file_InsertQuery + + + + + + + + + + + + + dbo.stp_file_UpdateQuery + + + + + + + + + + + + @@ -394,7 +509,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -414,7 +529,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -434,7 +549,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -454,7 +569,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -474,7 +589,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -495,7 +610,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -515,7 +630,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -550,7 +665,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -570,7 +685,7 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li - + @@ -597,6 +712,30 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li + + + + + + + + + + + + + + + + + + + + + + + + @@ -630,5 +769,9 @@ SELECT Lingua, Lemma, Traduzione FROM Vocabolario WHERE (Lemma = @Lemma) AND (Li + + + + \ No newline at end of file diff --git a/CMS-SC-Data/DS_Utility.xss b/CMS-SC-Data/DS_Utility.xss index 64dd9ea..df11243 100644 --- a/CMS-SC-Data/DS_Utility.xss +++ b/CMS-SC-Data/DS_Utility.xss @@ -6,15 +6,16 @@ --> - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/CMS-SC-Data/DtProxy.cs b/CMS-SC-Data/DtProxy.cs index 58e6ddf..de8c8b0 100644 --- a/CMS-SC-Data/DtProxy.cs +++ b/CMS-SC-Data/DtProxy.cs @@ -36,6 +36,7 @@ namespace CMS_SC_Data taSCM = new DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter(); taT2M = new DS_ApplicazioneTableAdapters.Tags2MacchineTableAdapter(); taVV = new DS_ApplicazioneTableAdapters.ValidValTableAdapter(); + taFiles = new DS_UtilityTableAdapters.tblFilesTableAdapter(); taListVal = new DS_UtilityTableAdapters.ListValuesTableAdapter(); taVoc = new DS_UtilityTableAdapters.VocabolarioTableAdapter(); taVSMacc = new DS_UtilityTableAdapters.v_selMacchineTableAdapter(); @@ -61,6 +62,7 @@ namespace CMS_SC_Data taSCM.Connection.ConnectionString = connStr; taT2M.Connection.ConnectionString = connStr; taVV.Connection.ConnectionString = connStr; + taFiles.Connection.ConnectionString = connStr; taListVal.Connection.ConnectionString = connStr; taVoc.Connection.ConnectionString = connStr; taVSMacc.Connection.ConnectionString = connStr; @@ -83,6 +85,7 @@ namespace CMS_SC_Data public DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter taSCM; public DS_ApplicazioneTableAdapters.Tags2MacchineTableAdapter taT2M; public DS_ApplicazioneTableAdapters.ValidValTableAdapter taVV; + public DS_UtilityTableAdapters.tblFilesTableAdapter taFiles; public DS_UtilityTableAdapters.ListValuesTableAdapter taListVal; public DS_UtilityTableAdapters.VocabolarioTableAdapter taVoc; public DS_UtilityTableAdapters.v_selMacchineTableAdapter taVSMacc; diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll index 3cf4fd9..e37be3d 100644 Binary files a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll and b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll differ diff --git a/CMS-SC-Data/bin/Debug/SteamWare.dll b/CMS-SC-Data/bin/Debug/SteamWare.dll index 2d46955..faf9e97 100644 Binary files a/CMS-SC-Data/bin/Debug/SteamWare.dll and b/CMS-SC-Data/bin/Debug/SteamWare.dll differ diff --git a/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll b/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll index 3cf4fd9..e37be3d 100644 Binary files a/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll and b/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll differ diff --git a/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll b/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll index 2617177..308af97 100644 Binary files a/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll b/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll index cd8df47..881ef0a 100644 Binary files a/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll and b/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll differ diff --git a/CMS_SC/ToDo.txt b/CMS_SC/ToDo.txt index 6ba6d36..1c6df71 100644 --- a/CMS_SC/ToDo.txt +++ b/CMS_SC/ToDo.txt @@ -4,11 +4,8 @@ - TODO's ---------------------------------------------------------------------------------------------------------------- -- FCS: mettere a livello SC e NON dettaglio valori (modifiche in cascata) - - - gestione allegati tipo FILE (blob? in scheda o "generale"?) -- allegati FILE (su DB come link) +- allegati FILE (su DB come link?) - Potrebbero servire schede speciali in cui i valori di Minimo e Massimo sono variabili (tolleranze variabili a FDO) -> si è deciso con Carlo di costruire delle schede con 2 valori TESTUALI + un file allegato, x cui misura 1 = valori massimi da ORDINE, misura 2 valori massimi rilevati, misura 3 OK / KO (con deroga...), misura 4 = allegato file @@ -61,6 +58,14 @@ TEMPLATE FASI per schede FIX grafici - fix paginazione gridViews + +FIX CodVisib da "radice" +- FCS: mettere a livello SC e NON dettaglio valori (modifiche in cascata) + +Gestione FILES +- creazione tabella allegati +- creazione stored files + oggetti dataset + ................................................................................................................ diff --git a/CMS_SC/WebUserControls/mod_anagSchedeColl.ascx b/CMS_SC/WebUserControls/mod_anagSchedeColl.ascx index c9aa9c5..79baabf 100644 --- a/CMS_SC/WebUserControls/mod_anagSchedeColl.ascx +++ b/CMS_SC/WebUserControls/mod_anagSchedeColl.ascx @@ -25,7 +25,8 @@ - + + @@ -68,6 +69,7 @@ + diff --git a/CMS_SC/bin/CMS-SC-Data.dll b/CMS_SC/bin/CMS-SC-Data.dll index 3cf4fd9..e37be3d 100644 Binary files a/CMS_SC/bin/CMS-SC-Data.dll and b/CMS_SC/bin/CMS-SC-Data.dll differ diff --git a/CMS_SC/bin/CMS_SC.dll b/CMS_SC/bin/CMS_SC.dll index bce19ad..852afe6 100644 Binary files a/CMS_SC/bin/CMS_SC.dll and b/CMS_SC/bin/CMS_SC.dll differ diff --git a/CMS_SC/bin/SteamWare.dll b/CMS_SC/bin/SteamWare.dll index 2d46955..faf9e97 100644 Binary files a/CMS_SC/bin/SteamWare.dll and b/CMS_SC/bin/SteamWare.dll differ diff --git a/VersGen/CMS_SC.cs b/VersGen/CMS_SC.cs index 8538e60..e48104a 100644 --- a/VersGen/CMS_SC.cs +++ b/VersGen/CMS_SC.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.8.067.349")] -[assembly: AssemblyFileVersion("1.8.067.349")] +[assembly: AssemblyVersion("1.8.071.349")] +[assembly: AssemblyFileVersion("1.8.071.349")] [assembly: AssemblyCopyright("Steamware © 2009-2015")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/CMS_SC.tt b/VersGen/CMS_SC.tt index 3aca459..ba243c6 100644 --- a/VersGen/CMS_SC.tt +++ b/VersGen/CMS_SC.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("1.8.067.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("1.8.067.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("1.8.071.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("1.8.071.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Steamware © 2009-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+