From efac09035dddd64781aa676747b7c3d91af1363d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 27 Nov 2015 18:05:43 +0100 Subject: [PATCH] creato nuovo campo x ordinamento (Ordinale) in SCFM, SCM, Misure generati script x setup iniziale dei valori "default" delle schede di colllaudo --- CMS-SC-Data/DS_Applicazione.xsd | 77 ++++++++------ CMS-SC-Data/DS_Applicazione1.Designer.cs | 113 ++++++++++++++++----- CMS-SC-Data/app.config | 2 +- CMS_SC/DettScheda.aspx | 2 +- CMS_SC/WebUserControls/mod_DettScheda.ascx | 2 +- CMS_SC/sql/ManualUpdate_2.0_2.1.sql | 29 ++++++ 6 files changed, 163 insertions(+), 62 deletions(-) create mode 100644 CMS_SC/sql/ManualUpdate_2.0_2.1.sql diff --git a/CMS-SC-Data/DS_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index 228c00b..9a8a040 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -643,7 +643,9 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH - SELECT CodFam, CodScheda, Vers, CodSchedaVers, DescrScheda, Path, NumSchede, Descrizione, opz FROM v_SchemaCollFamMacc + SELECT * +FROM v_SchemaCollFamMacc +ORDER BY Ordinale, CodSchedaVers @@ -659,6 +661,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH + @@ -831,7 +834,7 @@ FROM v_ElencoDossier - DELETE FROM [dbo].[SchemaCollMacc] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz)) + DELETE FROM [dbo].[SchemaCollMacc] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz) AND ([Ordinale] = @Original_Ordinale)) @@ -840,13 +843,14 @@ FROM v_ElencoDossier + - INSERT INTO [dbo].[SchemaCollMacc] ([IdxDossier], [CodScheda], [Vers], [NumScheda], [Descrizione], [opz], [FasiEnab]) VALUES (@IdxDossier, @CodScheda, @Vers, @NumScheda, @Descrizione, @opz, @FasiEnab); -SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) + INSERT INTO [dbo].[SchemaCollMacc] ([IdxDossier], [CodScheda], [Vers], [NumScheda], [Descrizione], [opz], [FasiEnab], [Ordinale]) VALUES (@IdxDossier, @CodScheda, @Vers, @NumScheda, @Descrizione, @opz, @FasiEnab, @Ordinale); +SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordinale FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) ORDER BY Ordinale, CodScheda, Vers, NumScheda @@ -855,20 +859,22 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S + SELECT * -FROM dbo.SchemaCollMacc +FROM dbo.SchemaCollMacc +ORDER BY Ordinale, CodScheda, Vers, NumScheda - UPDATE [dbo].[SchemaCollMacc] SET [IdxDossier] = @IdxDossier, [CodScheda] = @CodScheda, [Vers] = @Vers, [NumScheda] = @NumScheda, [Descrizione] = @Descrizione, [opz] = @opz, [FasiEnab] = @FasiEnab WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz)); -SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) + UPDATE [dbo].[SchemaCollMacc] SET [IdxDossier] = @IdxDossier, [CodScheda] = @CodScheda, [Vers] = @Vers, [NumScheda] = @NumScheda, [Descrizione] = @Descrizione, [opz] = @opz, [FasiEnab] = @FasiEnab, [Ordinale] = @Ordinale WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz) AND ([Ordinale] = @Original_Ordinale)); +SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordinale FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) ORDER BY Ordinale, CodScheda, Vers, NumScheda @@ -877,6 +883,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S + @@ -884,6 +891,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S + @@ -897,6 +905,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S + @@ -1402,7 +1411,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1423,7 +1432,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1461,7 +1470,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1481,7 +1490,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1523,7 +1532,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1572,7 +1581,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1597,7 +1606,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1651,10 +1660,11 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa + - + @@ -1700,7 +1710,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1734,10 +1744,11 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa + - + @@ -1830,7 +1841,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1944,7 +1955,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1964,7 +1975,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -1984,7 +1995,7 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - + @@ -2086,18 +2097,18 @@ SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParNa - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/CMS-SC-Data/DS_Applicazione1.Designer.cs b/CMS-SC-Data/DS_Applicazione1.Designer.cs index 797bf57..38a0b40 100644 --- a/CMS-SC-Data/DS_Applicazione1.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione1.Designer.cs @@ -2836,6 +2836,8 @@ namespace CMS_SC_Data { private global::System.Data.DataColumn columnopz; + private global::System.Data.DataColumn columnOrdinale; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public SchemaCollFamMaccDataTable() { @@ -2941,6 +2943,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 OrdinaleColumn { + get { + return this.columnOrdinale; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -2978,7 +2988,7 @@ namespace CMS_SC_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public SchemaCollFamMaccRow AddSchemaCollFamMaccRow(ElencoFamMaccRow parentElencoFamMaccRowByFK_SchemaCollFamMacc_ElencoFamMacc, string CodScheda, int Vers, string CodSchedaVers, string DescrScheda, string Path, int NumSchede, string Descrizione, string opz) { + public SchemaCollFamMaccRow AddSchemaCollFamMaccRow(ElencoFamMaccRow parentElencoFamMaccRowByFK_SchemaCollFamMacc_ElencoFamMacc, string CodScheda, int Vers, string CodSchedaVers, string DescrScheda, string Path, int NumSchede, string Descrizione, string opz, int Ordinale) { SchemaCollFamMaccRow rowSchemaCollFamMaccRow = ((SchemaCollFamMaccRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -2989,7 +2999,8 @@ namespace CMS_SC_Data { Path, NumSchede, Descrizione, - opz}; + opz, + Ordinale}; if ((parentElencoFamMaccRowByFK_SchemaCollFamMacc_ElencoFamMacc != null)) { columnValuesArray[0] = parentElencoFamMaccRowByFK_SchemaCollFamMacc_ElencoFamMacc[0]; } @@ -3033,6 +3044,7 @@ namespace CMS_SC_Data { this.columnNumSchede = base.Columns["NumSchede"]; this.columnDescrizione = base.Columns["Descrizione"]; this.columnopz = base.Columns["opz"]; + this.columnOrdinale = base.Columns["Ordinale"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3056,6 +3068,8 @@ namespace CMS_SC_Data { base.Columns.Add(this.columnDescrizione); this.columnopz = new global::System.Data.DataColumn("opz", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnopz); + this.columnOrdinale = new global::System.Data.DataColumn("Ordinale", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrdinale); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCodFam, this.columnCodScheda, @@ -3075,6 +3089,7 @@ namespace CMS_SC_Data { this.columnDescrizione.MaxLength = 250; this.columnopz.AllowDBNull = false; this.columnopz.MaxLength = 50; + this.columnOrdinale.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3625,6 +3640,8 @@ namespace CMS_SC_Data { private global::System.Data.DataColumn columnFasiEnab; + private global::System.Data.DataColumn columnOrdinale; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public SchemaCollMaccDataTable() { @@ -3714,6 +3731,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 OrdinaleColumn { + get { + return this.columnOrdinale; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -3751,7 +3776,7 @@ namespace CMS_SC_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public SchemaCollMaccRow AddSchemaCollMaccRow(ElencoDossierRow parentElencoDossierRowByFK_SchemaCollMacc_ElencoDossier, string CodScheda, int Vers, int NumScheda, string Descrizione, string opz, string FasiEnab) { + public SchemaCollMaccRow AddSchemaCollMaccRow(ElencoDossierRow parentElencoDossierRowByFK_SchemaCollMacc_ElencoDossier, string CodScheda, int Vers, int NumScheda, string Descrizione, string opz, string FasiEnab, int Ordinale) { SchemaCollMaccRow rowSchemaCollMaccRow = ((SchemaCollMaccRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -3760,7 +3785,8 @@ namespace CMS_SC_Data { NumScheda, Descrizione, opz, - FasiEnab}; + FasiEnab, + Ordinale}; if ((parentElencoDossierRowByFK_SchemaCollMacc_ElencoDossier != null)) { columnValuesArray[0] = parentElencoDossierRowByFK_SchemaCollMacc_ElencoDossier[0]; } @@ -3803,6 +3829,7 @@ namespace CMS_SC_Data { this.columnDescrizione = base.Columns["Descrizione"]; this.columnopz = base.Columns["opz"]; this.columnFasiEnab = base.Columns["FasiEnab"]; + this.columnOrdinale = base.Columns["Ordinale"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3822,6 +3849,8 @@ namespace CMS_SC_Data { base.Columns.Add(this.columnopz); this.columnFasiEnab = new global::System.Data.DataColumn("FasiEnab", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnFasiEnab); + this.columnOrdinale = new global::System.Data.DataColumn("Ordinale", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrdinale); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnIdxDossier, this.columnCodScheda, @@ -3837,6 +3866,7 @@ namespace CMS_SC_Data { this.columnopz.MaxLength = 50; this.columnFasiEnab.AllowDBNull = false; this.columnFasiEnab.MaxLength = 2147483647; + this.columnOrdinale.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6794,6 +6824,17 @@ namespace CMS_SC_Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Ordinale { + get { + return ((int)(this[this.tableSchemaCollFamMacc.OrdinaleColumn])); + } + set { + this[this.tableSchemaCollFamMacc.OrdinaleColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public AnagSchedeRow AnagSchedeRowParent { @@ -7203,6 +7244,17 @@ namespace CMS_SC_Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Ordinale { + get { + return ((int)(this[this.tableSchemaCollMacc.OrdinaleColumn])); + } + set { + this[this.tableSchemaCollMacc.OrdinaleColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public AnagSchedeRow AnagSchedeRowParent { @@ -11902,6 +11954,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH tableMapping.ColumnMappings.Add("NumSchede", "NumSchede"); tableMapping.ColumnMappings.Add("Descrizione", "Descrizione"); tableMapping.ColumnMappings.Add("opz", "opz"); + tableMapping.ColumnMappings.Add("Ordinale", "Ordinale"); this._adapter.TableMappings.Add(tableMapping); } @@ -11918,8 +11971,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT CodFam, CodScheda, Vers, CodSchedaVers, DescrScheda, Path, NumSchede, Desc" + - "rizione, opz FROM v_SchemaCollFamMacc"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_SchemaCollFamMacc\r\nORDER BY Ordinale, CodSchedaVers"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -12687,10 +12739,11 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH tableMapping.ColumnMappings.Add("Descrizione", "Descrizione"); tableMapping.ColumnMappings.Add("opz", "opz"); tableMapping.ColumnMappings.Add("FasiEnab", "FasiEnab"); + tableMapping.ColumnMappings.Add("Ordinale", "Ordinale"); 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].[SchemaCollMacc] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[SchemaCollMacc] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz) AND ([Ordinale] = @Original_Ordinale))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxDossier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxDossier", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 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, "", "", "")); @@ -12699,10 +12752,11 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Descrizione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Original, true, 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_opz", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "opz", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinale", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinale", 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].[SchemaCollMacc] ([IdxDossier], [CodScheda], [Vers], [NumScheda], [Descrizione], [opz], [FasiEnab]) VALUES (@IdxDossier, @CodScheda, @Vers, @NumScheda, @Descrizione, @opz, @FasiEnab); -SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers)"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[SchemaCollMacc] ([IdxDossier], [CodScheda], [Vers], [NumScheda], [Descrizione], [opz], [FasiEnab], [Ordinale]) VALUES (@IdxDossier, @CodScheda, @Vers, @NumScheda, @Descrizione, @opz, @FasiEnab, @Ordinale); +SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordinale FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) ORDER BY Ordinale, CodScheda, Vers, NumScheda"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxDossier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxDossier", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 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, "", "", "")); @@ -12711,10 +12765,11 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S 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("@opz", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "opz", 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("@Ordinale", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinale", 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].[SchemaCollMacc] SET [IdxDossier] = @IdxDossier, [CodScheda] = @CodScheda, [Vers] = @Vers, [NumScheda] = @NumScheda, [Descrizione] = @Descrizione, [opz] = @opz, [FasiEnab] = @FasiEnab WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz)); -SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[SchemaCollMacc] SET [IdxDossier] = @IdxDossier, [CodScheda] = @CodScheda, [Vers] = @Vers, [NumScheda] = @NumScheda, [Descrizione] = @Descrizione, [opz] = @opz, [FasiEnab] = @FasiEnab, [Ordinale] = @Ordinale WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ((@IsNull_Descrizione = 1 AND [Descrizione] IS NULL) OR ([Descrizione] = @Original_Descrizione)) AND ([opz] = @Original_opz) AND ([Ordinale] = @Original_Ordinale)); +SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab, Ordinale FROM SchemaCollMacc WHERE (CodScheda = @CodScheda) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) ORDER BY Ordinale, CodScheda, Vers, NumScheda"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxDossier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxDossier", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 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, "", "", "")); @@ -12723,6 +12778,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S 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("@opz", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "opz", 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("@Ordinale", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinale", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxDossier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxDossier", global::System.Data.DataRowVersion.Original, 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, "", "", "")); @@ -12730,6 +12786,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Descrizione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Descrizione", global::System.Data.DataRowVersion.Original, true, 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_opz", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "opz", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinale", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinale", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12745,7 +12802,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.SchemaCollMacc"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.SchemaCollMacc\r\nORDER BY Ordinale, CodScheda, Vers, NumScheda"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; @@ -12870,7 +12927,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S [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_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_Descrizione, string Original_opz) { + public virtual int Delete(int Original_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_Descrizione, string Original_opz, int Original_Ordinale) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_IdxDossier)); if ((Original_CodScheda == null)) { throw new global::System.ArgumentNullException("Original_CodScheda"); @@ -12894,6 +12951,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S else { this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_opz)); } + this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(Original_Ordinale)); 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)) { @@ -12914,7 +12972,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int IdxDossier, string CodScheda, int Vers, int NumScheda, string Descrizione, string opz, string FasiEnab) { + public virtual int Insert(int IdxDossier, string CodScheda, int Vers, int NumScheda, string Descrizione, string opz, string FasiEnab, int Ordinale) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(IdxDossier)); if ((CodScheda == null)) { throw new global::System.ArgumentNullException("CodScheda"); @@ -12942,6 +13000,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S else { this.Adapter.InsertCommand.Parameters[6].Value = ((string)(FasiEnab)); } + this.Adapter.InsertCommand.Parameters[7].Value = ((int)(Ordinale)); 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)) { @@ -12962,7 +13021,7 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int IdxDossier, string CodScheda, int Vers, int NumScheda, string Descrizione, string opz, string FasiEnab, int Original_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_Descrizione, string Original_opz) { + public virtual int Update(int IdxDossier, string CodScheda, int Vers, int NumScheda, string Descrizione, string opz, string FasiEnab, int Ordinale, int Original_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_Descrizione, string Original_opz, int Original_Ordinale) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(IdxDossier)); if ((CodScheda == null)) { throw new global::System.ArgumentNullException("CodScheda"); @@ -12990,29 +13049,31 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S else { this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(FasiEnab)); } - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_IdxDossier)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Ordinale)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_IdxDossier)); if ((Original_CodScheda == null)) { throw new global::System.ArgumentNullException("Original_CodScheda"); } else { - this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_CodScheda)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_CodScheda)); } - this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_Vers)); - this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_NumScheda)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_Vers)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_NumScheda)); if ((Original_Descrizione == null)) { - this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Descrizione)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Descrizione)); } if ((Original_opz == null)) { throw new global::System.ArgumentNullException("Original_opz"); } else { - this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_opz)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_opz)); } + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_Ordinale)); 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)) { @@ -13033,8 +13094,8 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione, opz, FasiEnab FROM S [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 opz, string FasiEnab, int Original_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_Descrizione, string Original_opz) { - return this.Update(Original_IdxDossier, Original_CodScheda, Original_Vers, Original_NumScheda, Descrizione, opz, FasiEnab, Original_IdxDossier, Original_CodScheda, Original_Vers, Original_NumScheda, Original_Descrizione, Original_opz); + public virtual int Update(string Descrizione, string opz, string FasiEnab, int Ordinale, int Original_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_Descrizione, string Original_opz, int Original_Ordinale) { + return this.Update(Original_IdxDossier, Original_CodScheda, Original_Vers, Original_NumScheda, Descrizione, opz, FasiEnab, Ordinale, Original_IdxDossier, Original_CodScheda, Original_Vers, Original_NumScheda, Original_Descrizione, Original_opz, Original_Ordinale); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] diff --git a/CMS-SC-Data/app.config b/CMS-SC-Data/app.config index e0a1490..71b6150 100644 --- a/CMS-SC-Data/app.config +++ b/CMS-SC-Data/app.config @@ -4,7 +4,7 @@ \ No newline at end of file diff --git a/CMS_SC/DettScheda.aspx b/CMS_SC/DettScheda.aspx index 7caf996..647d0cd 100644 --- a/CMS_SC/DettScheda.aspx +++ b/CMS_SC/DettScheda.aspx @@ -22,7 +22,7 @@ -
+
diff --git a/CMS_SC/WebUserControls/mod_DettScheda.ascx b/CMS_SC/WebUserControls/mod_DettScheda.ascx index 3b5cd93..e2a1cc4 100644 --- a/CMS_SC/WebUserControls/mod_DettScheda.ascx +++ b/CMS_SC/WebUserControls/mod_DettScheda.ascx @@ -58,7 +58,7 @@
- + diff --git a/CMS_SC/sql/ManualUpdate_2.0_2.1.sql b/CMS_SC/sql/ManualUpdate_2.0_2.1.sql new file mode 100644 index 0000000..8961e0c --- /dev/null +++ b/CMS_SC/sql/ManualUpdate_2.0_2.1.sql @@ -0,0 +1,29 @@ +-- genero calcolo x valori ordinali ATTUALI +exec util.stp_setupOrdinal_SCFM +SELECT ROW_NUMBER() OVER(PARTITION BY CodFam ORDER BY CodScheda, Vers) AS Riga, * +FROM SchemaCollFamMacc + +exec util.stp_setupOrdinal_SCM +SELECT ROW_NUMBER() OVER(PARTITION BY IdxDossier ORDER BY CodScheda, Vers, NumScheda) AS Riga, * +FROM SchemaCollMacc + + +exec util.stp_setupOrdinal_Mis +SELECT ROW_NUMBER() OVER(PARTITION BY IdxDossier, Fase ORDER BY CodScheda, Vers, NumScheda, CodMisura) AS Riga, * +FROM Misure + +/****************************************************** +* FARE!!!! +* +* - verifica di modifiche x procedure insert x SCFM, SCM, Misure +* - verifica di modifiche x procedure update x SCFM, SCM, Misure +* - modifica interfaccia x effettuare spostamenti ordine x SCFM e SCM (mis CREDO di no) +* - testare funzionamento pagine SCFM, SCM (Dossier), Misure (Collaudi) +* +******************************************************/ + + + + +-- update vocabolario +exec voc.stp_insNewLemma 'btnClonaConfFamMacch', 'Merge da Famiglia Esistente'