diff --git a/CMS-SC-Data/DS_Applicazione.Designer.cs b/CMS-SC-Data/DS_Applicazione.Designer.cs index 5d84f3e..31fa8e7 100644 --- a/CMS-SC-Data/DS_Applicazione.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione.Designer.cs @@ -3654,6 +3654,20 @@ namespace CMS_SC_Data { private global::System.Data.DataColumn columnCodDeroga; + private global::System.Data.DataColumn columnNomeMisura; + + private global::System.Data.DataColumn columnTipoValMisura; + + private global::System.Data.DataColumn columnNomePar; + + private global::System.Data.DataColumn columnMinPar; + + private global::System.Data.DataColumn columnMaxPar; + + private global::System.Data.DataColumn columnLIVal; + + private global::System.Data.DataColumn columnLSVal; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public MisureDataTable() { @@ -3783,6 +3797,62 @@ 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 NomeMisuraColumn { + get { + return this.columnNomeMisura; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn TipoValMisuraColumn { + get { + return this.columnTipoValMisura; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn NomeParColumn { + get { + return this.columnNomePar; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn MinParColumn { + get { + return this.columnMinPar; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn MaxParColumn { + get { + return this.columnMaxPar; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn LIValColumn { + get { + return this.columnLIVal; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn LSValColumn { + get { + return this.columnLSVal; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -3820,7 +3890,26 @@ namespace CMS_SC_Data { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public MisureRow AddMisureRow(int IdxDossier, string CodScheda, int Vers, int NumScheda, string CodMisura, AnagFasiRow parentAnagFasiRowByFK_IstanzeMisura_AnagFasi, string Operatore, System.DateTime DataOra, double ValorePar, string ValoreMis, bool OkValMis, string CodDeroga) { + public MisureRow AddMisureRow( + int IdxDossier, + string CodScheda, + int Vers, + int NumScheda, + string CodMisura, + AnagFasiRow parentAnagFasiRowByFK_IstanzeMisura_AnagFasi, + string Operatore, + System.DateTime DataOra, + double ValorePar, + string ValoreMis, + bool OkValMis, + string CodDeroga, + string NomeMisura, + string TipoValMisura, + string NomePar, + double MinPar, + double MaxPar, + double LIVal, + double LSVal) { MisureRow rowMisureRow = ((MisureRow)(this.NewRow())); object[] columnValuesArray = new object[] { IdxDossier, @@ -3834,7 +3923,14 @@ namespace CMS_SC_Data { ValorePar, ValoreMis, OkValMis, - CodDeroga}; + CodDeroga, + NomeMisura, + TipoValMisura, + NomePar, + MinPar, + MaxPar, + LIVal, + LSVal}; if ((parentAnagFasiRowByFK_IstanzeMisura_AnagFasi != null)) { columnValuesArray[5] = parentAnagFasiRowByFK_IstanzeMisura_AnagFasi[0]; } @@ -3884,6 +3980,13 @@ namespace CMS_SC_Data { this.columnValoreMis = base.Columns["ValoreMis"]; this.columnOkValMis = base.Columns["OkValMis"]; this.columnCodDeroga = base.Columns["CodDeroga"]; + this.columnNomeMisura = base.Columns["NomeMisura"]; + this.columnTipoValMisura = base.Columns["TipoValMisura"]; + this.columnNomePar = base.Columns["NomePar"]; + this.columnMinPar = base.Columns["MinPar"]; + this.columnMaxPar = base.Columns["MaxPar"]; + this.columnLIVal = base.Columns["LIVal"]; + this.columnLSVal = base.Columns["LSVal"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3913,6 +4016,20 @@ namespace CMS_SC_Data { base.Columns.Add(this.columnOkValMis); this.columnCodDeroga = new global::System.Data.DataColumn("CodDeroga", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodDeroga); + this.columnNomeMisura = new global::System.Data.DataColumn("NomeMisura", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNomeMisura); + this.columnTipoValMisura = new global::System.Data.DataColumn("TipoValMisura", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTipoValMisura); + this.columnNomePar = new global::System.Data.DataColumn("NomePar", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNomePar); + this.columnMinPar = new global::System.Data.DataColumn("MinPar", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnMinPar); + this.columnMaxPar = new global::System.Data.DataColumn("MaxPar", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnMaxPar); + this.columnLIVal = new global::System.Data.DataColumn("LIVal", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnLIVal); + this.columnLSVal = new global::System.Data.DataColumn("LSVal", typeof(double), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnLSVal); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnIdxDossier, this.columnCodScheda, @@ -3936,7 +4053,18 @@ namespace CMS_SC_Data { this.columnValoreMis.AllowDBNull = false; this.columnValoreMis.MaxLength = 4000; this.columnOkValMis.AllowDBNull = false; + this.columnCodDeroga.AllowDBNull = false; this.columnCodDeroga.MaxLength = 50; + this.columnNomeMisura.AllowDBNull = false; + this.columnNomeMisura.MaxLength = 50; + this.columnTipoValMisura.AllowDBNull = false; + this.columnTipoValMisura.MaxLength = 50; + this.columnNomePar.AllowDBNull = false; + this.columnNomePar.MaxLength = 50; + this.columnMinPar.AllowDBNull = false; + this.columnMaxPar.AllowDBNull = false; + this.columnLIVal.AllowDBNull = false; + this.columnLSVal.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5222,18 +5350,90 @@ namespace CMS_SC_Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public string CodDeroga { get { - try { - return ((string)(this[this.tableMisure.CodDerogaColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'CodDeroga\' in table \'Misure\' is DBNull.", e); - } + return ((string)(this[this.tableMisure.CodDerogaColumn])); } set { this[this.tableMisure.CodDerogaColumn] = value; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string NomeMisura { + get { + return ((string)(this[this.tableMisure.NomeMisuraColumn])); + } + set { + this[this.tableMisure.NomeMisuraColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string TipoValMisura { + get { + return ((string)(this[this.tableMisure.TipoValMisuraColumn])); + } + set { + this[this.tableMisure.TipoValMisuraColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string NomePar { + get { + return ((string)(this[this.tableMisure.NomeParColumn])); + } + set { + this[this.tableMisure.NomeParColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public double MinPar { + get { + return ((double)(this[this.tableMisure.MinParColumn])); + } + set { + this[this.tableMisure.MinParColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public double MaxPar { + get { + return ((double)(this[this.tableMisure.MaxParColumn])); + } + set { + this[this.tableMisure.MaxParColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public double LIVal { + get { + return ((double)(this[this.tableMisure.LIValColumn])); + } + set { + this[this.tableMisure.LIValColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public double LSVal { + get { + return ((double)(this[this.tableMisure.LSValColumn])); + } + set { + this[this.tableMisure.LSValColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public AnagFasiRow AnagFasiRow { @@ -5255,18 +5455,6 @@ namespace CMS_SC_Data { this.SetParentRow(value, this.Table.ParentRelations["FK_Misure_SchemaCollMacc"]); } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCodDerogaNull() { - return this.IsNull(this.tableMisure.CodDerogaColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCodDerogaNull() { - this[this.tableMisure.CodDerogaColumn] = global::System.Convert.DBNull; - } } /// @@ -10230,71 +10418,14 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione FROM SchemaCollMacc W tableMapping.ColumnMappings.Add("ValoreMis", "ValoreMis"); tableMapping.ColumnMappings.Add("OkValMis", "OkValMis"); tableMapping.ColumnMappings.Add("CodDeroga", "CodDeroga"); + tableMapping.ColumnMappings.Add("NomeMisura", "NomeMisura"); + tableMapping.ColumnMappings.Add("TipoValMisura", "TipoValMisura"); + tableMapping.ColumnMappings.Add("NomePar", "NomePar"); + tableMapping.ColumnMappings.Add("MinPar", "MinPar"); + tableMapping.ColumnMappings.Add("MaxPar", "MaxPar"); + tableMapping.ColumnMappings.Add("LIVal", "LIVal"); + tableMapping.ColumnMappings.Add("LSVal", "LSVal"); 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].[Misure] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ([CodMisura] = @Original_CodMisura) AND ([Fase] = @Original_Fase) AND ([Operatore] = @Original_Operatore) AND ([DataOra] = @Original_DataOra) AND ([ValorePar] = @Original_ValorePar) AND ([ValoreMis] = @Original_ValoreMis) AND ([OkValMis] = @Original_OkValMis) AND ((@IsNull_CodDeroga = 1 AND [CodDeroga] IS NULL) OR ([CodDeroga] = @Original_CodDeroga)))"; - 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, "", "", "")); - 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_NumScheda", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumScheda", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodMisura", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodMisura", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Fase", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Fase", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Operatore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Operatore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ValorePar", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValorePar", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ValoreMis", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValoreMis", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OkValMis", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OkValMis", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CodDeroga", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodDeroga", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodDeroga", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodDeroga", 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].[Misure] ([IdxDossier], [CodScheda], [Vers], [NumScheda], [CodMisura], [Fase], [Operatore], [DataOra], [ValorePar], [ValoreMis], [OkValMis], [CodDeroga]) VALUES (@IdxDossier, @CodScheda, @Vers, @NumScheda, @CodMisura, @Fase, @Operatore, @DataOra, @ValorePar, @ValoreMis, @OkValMis, @CodDeroga); -SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga FROM Misure WHERE (CodMisura = @CodMisura) AND (CodScheda = @CodScheda) AND (Fase = @Fase) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers)"; - 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, "", "", "")); - 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("@NumScheda", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumScheda", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMisura", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodMisura", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Fase", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Operatore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Operatore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValorePar", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValorePar", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValoreMis", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValoreMis", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OkValMis", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OkValMis", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodDeroga", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodDeroga", 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].[Misure] SET [IdxDossier] = @IdxDossier, [CodScheda] = @CodScheda, [Vers] = @Vers, [NumScheda] = @NumScheda, [CodMisura] = @CodMisura, [Fase] = @Fase, [Operatore] = @Operatore, [DataOra] = @DataOra, [ValorePar] = @ValorePar, [ValoreMis] = @ValoreMis, [OkValMis] = @OkValMis, [CodDeroga] = @CodDeroga WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ([CodMisura] = @Original_CodMisura) AND ([Fase] = @Original_Fase) AND ([Operatore] = @Original_Operatore) AND ([DataOra] = @Original_DataOra) AND ([ValorePar] = @Original_ValorePar) AND ([ValoreMis] = @Original_ValoreMis) AND ([OkValMis] = @Original_OkValMis) AND ((@IsNull_CodDeroga = 1 AND [CodDeroga] IS NULL) OR ([CodDeroga] = @Original_CodDeroga))); -SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga FROM Misure WHERE (CodMisura = @CodMisura) AND (CodScheda = @CodScheda) AND (Fase = @Fase) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers)"; - 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, "", "", "")); - 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("@NumScheda", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumScheda", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMisura", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodMisura", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Fase", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Operatore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Operatore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValorePar", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValorePar", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValoreMis", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValoreMis", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OkValMis", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OkValMis", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodDeroga", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodDeroga", 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, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumScheda", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumScheda", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodMisura", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodMisura", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Fase", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Fase", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Operatore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Operatore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataOra", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataOra", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ValorePar", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValorePar", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ValoreMis", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValoreMis", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OkValMis", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OkValMis", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_CodDeroga", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodDeroga", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodDeroga", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodDeroga", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10307,12 +10438,35 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOr" + - "a, ValorePar, ValoreMis, OkValMis, CodDeroga FROM dbo.Misure"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_Misure"; 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_Mis_getDataFilt"; + 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("@IdxDossier", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_Mis_getNum2Ins"; + 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("@IdxDossier", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_Mis_insMissing"; + 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("@IdxDossier", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSchedaVers", global::System.Data.SqlDbType.NVarChar, 100, 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("@Fase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10342,315 +10496,99 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO [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_Applicazione.MisureDataTable 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_Applicazione dataSet) { - return this.Adapter.Update(dataSet, "Misure"); - } - - [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_IdxDossier, string Original_CodScheda, int Original_Vers, int Original_NumScheda, string Original_CodMisura, string Original_Fase, string Original_Operatore, System.DateTime Original_DataOra, double Original_ValorePar, string Original_ValoreMis, bool Original_OkValMis, string Original_CodDeroga) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_IdxDossier)); - if ((Original_CodScheda == null)) { - throw new global::System.ArgumentNullException("Original_CodScheda"); + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Applicazione.MisureDataTable getDataFilt(global::System.Nullable IdxDossier, string CodSchedaVers, string Fase) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((IdxDossier.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxDossier.Value)); } else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CodScheda)); + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Vers)); - this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_NumScheda)); - if ((Original_CodMisura == null)) { - throw new global::System.ArgumentNullException("Original_CodMisura"); + if ((CodSchedaVers == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_CodMisura)); - } - if ((Original_Fase == null)) { - throw new global::System.ArgumentNullException("Original_Fase"); - } - else { - this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Fase)); - } - if ((Original_Operatore == null)) { - throw new global::System.ArgumentNullException("Original_Operatore"); - } - else { - this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Operatore)); - } - this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_DataOra)); - this.Adapter.DeleteCommand.Parameters[8].Value = ((double)(Original_ValorePar)); - if ((Original_ValoreMis == null)) { - throw new global::System.ArgumentNullException("Original_ValoreMis"); - } - else { - this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_ValoreMis)); - } - this.Adapter.DeleteCommand.Parameters[10].Value = ((bool)(Original_OkValMis)); - if ((Original_CodDeroga == null)) { - this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_CodDeroga)); - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int IdxDossier, string CodScheda, int Vers, int NumScheda, string CodMisura, string Fase, string Operatore, System.DateTime DataOra, double ValorePar, string ValoreMis, bool OkValMis, string CodDeroga) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(IdxDossier)); - if ((CodScheda == null)) { - throw new global::System.ArgumentNullException("CodScheda"); - } - else { - this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CodScheda)); - } - this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Vers)); - this.Adapter.InsertCommand.Parameters[3].Value = ((int)(NumScheda)); - if ((CodMisura == null)) { - throw new global::System.ArgumentNullException("CodMisura"); - } - else { - this.Adapter.InsertCommand.Parameters[4].Value = ((string)(CodMisura)); + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodSchedaVers)); } if ((Fase == null)) { - throw new global::System.ArgumentNullException("Fase"); + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Fase)); - } - if ((Operatore == null)) { - throw new global::System.ArgumentNullException("Operatore"); - } - else { - this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Operatore)); - } - this.Adapter.InsertCommand.Parameters[7].Value = ((System.DateTime)(DataOra)); - this.Adapter.InsertCommand.Parameters[8].Value = ((double)(ValorePar)); - if ((ValoreMis == null)) { - throw new global::System.ArgumentNullException("ValoreMis"); - } - else { - this.Adapter.InsertCommand.Parameters[9].Value = ((string)(ValoreMis)); - } - this.Adapter.InsertCommand.Parameters[10].Value = ((bool)(OkValMis)); - if ((CodDeroga == null)) { - this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[11].Value = ((string)(CodDeroga)); - } - 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(); - } + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(Fase)); } + DS_Applicazione.MisureDataTable dataTable = new DS_Applicazione.MisureDataTable(); + 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.Update, true)] - public virtual int Update( - int IdxDossier, - string CodScheda, - int Vers, - int NumScheda, - string CodMisura, - string Fase, - string Operatore, - System.DateTime DataOra, - double ValorePar, - string ValoreMis, - bool OkValMis, - string CodDeroga, - int Original_IdxDossier, - string Original_CodScheda, - int Original_Vers, - int Original_NumScheda, - string Original_CodMisura, - string Original_Fase, - string Original_Operatore, - System.DateTime Original_DataOra, - double Original_ValorePar, - string Original_ValoreMis, - bool Original_OkValMis, - string Original_CodDeroga) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(IdxDossier)); - if ((CodScheda == null)) { - throw new global::System.ArgumentNullException("CodScheda"); + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Applicazione.MisureDataTable getNum2Ins(global::System.Nullable IdxDossier, string CodSchedaVers, string Fase) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((IdxDossier.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxDossier.Value)); } else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CodScheda)); + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Vers)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(NumScheda)); - if ((CodMisura == null)) { - throw new global::System.ArgumentNullException("CodMisura"); + if ((CodSchedaVers == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(CodMisura)); + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodSchedaVers)); } if ((Fase == null)) { - throw new global::System.ArgumentNullException("Fase"); + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Fase)); - } - if ((Operatore == null)) { - throw new global::System.ArgumentNullException("Operatore"); - } - else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Operatore)); - } - this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(DataOra)); - this.Adapter.UpdateCommand.Parameters[8].Value = ((double)(ValorePar)); - if ((ValoreMis == null)) { - throw new global::System.ArgumentNullException("ValoreMis"); - } - else { - this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(ValoreMis)); - } - this.Adapter.UpdateCommand.Parameters[10].Value = ((bool)(OkValMis)); - if ((CodDeroga == null)) { - this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(CodDeroga)); - } - this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_IdxDossier)); - if ((Original_CodScheda == null)) { - throw new global::System.ArgumentNullException("Original_CodScheda"); - } - else { - this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_CodScheda)); - } - this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_Vers)); - this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_NumScheda)); - if ((Original_CodMisura == null)) { - throw new global::System.ArgumentNullException("Original_CodMisura"); - } - else { - this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_CodMisura)); - } - if ((Original_Fase == null)) { - throw new global::System.ArgumentNullException("Original_Fase"); - } - else { - this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_Fase)); - } - if ((Original_Operatore == null)) { - throw new global::System.ArgumentNullException("Original_Operatore"); - } - else { - this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Operatore)); - } - this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(Original_DataOra)); - this.Adapter.UpdateCommand.Parameters[20].Value = ((double)(Original_ValorePar)); - if ((Original_ValoreMis == null)) { - throw new global::System.ArgumentNullException("Original_ValoreMis"); - } - else { - this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_ValoreMis)); - } - this.Adapter.UpdateCommand.Parameters[22].Value = ((bool)(Original_OkValMis)); - if ((Original_CodDeroga == null)) { - this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_CodDeroga)); - } - 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(); - } + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(Fase)); } + DS_Applicazione.MisureDataTable dataTable = new DS_Applicazione.MisureDataTable(); + 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.Update, true)] - public virtual int Update( - string Operatore, - System.DateTime DataOra, - double ValorePar, - string ValoreMis, - bool OkValMis, - string CodDeroga, - int Original_IdxDossier, - string Original_CodScheda, - int Original_Vers, - int Original_NumScheda, - string Original_CodMisura, - string Original_Fase, - string Original_Operatore, - System.DateTime Original_DataOra, - double Original_ValorePar, - string Original_ValoreMis, - bool Original_OkValMis, - string Original_CodDeroga) { - return this.Update(Original_IdxDossier, Original_CodScheda, Original_Vers, Original_NumScheda, Original_CodMisura, Original_Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga, Original_IdxDossier, Original_CodScheda, Original_Vers, Original_NumScheda, Original_CodMisura, Original_Fase, Original_Operatore, Original_DataOra, Original_ValorePar, Original_ValoreMis, Original_OkValMis, Original_CodDeroga); + public virtual int insMissing(global::System.Nullable IdxDossier, string CodSchedaVers, string Fase) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((IdxDossier.HasValue == true)) { + command.Parameters[1].Value = ((int)(IdxDossier.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((CodSchedaVers == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodSchedaVers)); + } + if ((Fase == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(Fase)); + } + 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; } } @@ -10680,8 +10618,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO private SchemaCollMaccTableAdapter _schemaCollMaccTableAdapter; - private MisureTableAdapter _misureTableAdapter; - private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -10795,20 +10731,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO } } - [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 MisureTableAdapter MisureTableAdapter { - get { - return this._misureTableAdapter; - } - set { - this._misureTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -10856,10 +10778,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO && (this._schemaCollMaccTableAdapter.Connection != null))) { return this._schemaCollMaccTableAdapter.Connection; } - if (((this._misureTableAdapter != null) - && (this._misureTableAdapter.Connection != null))) { - return this._misureTableAdapter.Connection; - } return null; } set { @@ -10894,9 +10812,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO if ((this._schemaCollMaccTableAdapter != null)) { count = (count + 1); } - if ((this._misureTableAdapter != null)) { - count = (count + 1); - } return count; } } @@ -10971,15 +10886,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO allChangedRows.AddRange(updatedRows); } } - if ((this._misureTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.Misure.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._misureTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } return result; } @@ -11046,14 +10952,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO allAddedRows.AddRange(addedRows); } } - if ((this._misureTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.Misure.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._misureTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } return result; } @@ -11064,14 +10962,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(DS_Applicazione dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._misureTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Misure.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._misureTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._validValTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ValidVal.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -11202,11 +11092,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } - if (((this._misureTableAdapter != null) - && (this.MatchTableAdapterConnection(this._misureTableAdapter.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" + @@ -11302,15 +11187,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO adaptersWithAcceptChangesDuringUpdate.Add(this._schemaCollMaccTableAdapter.Adapter); } } - if ((this._misureTableAdapter != null)) { - revertConnections.Add(this._misureTableAdapter, this._misureTableAdapter.Connection); - this._misureTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._misureTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._misureTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._misureTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._misureTableAdapter.Adapter); - } - } // //---- Perform updates ----------- // @@ -11397,10 +11273,6 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO this._schemaCollMaccTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._schemaCollMaccTableAdapter])); this._schemaCollMaccTableAdapter.Transaction = null; } - if ((this._misureTableAdapter != null)) { - this._misureTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._misureTableAdapter])); - this._misureTableAdapter.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_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index 3d66ad5..c6d01e4 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -909,86 +909,14 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, Descrizione FROM SchemaCollMacc W - - - - DELETE FROM [dbo].[Misure] WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ([CodMisura] = @Original_CodMisura) AND ([Fase] = @Original_Fase) AND ([Operatore] = @Original_Operatore) AND ([DataOra] = @Original_DataOra) AND ([ValorePar] = @Original_ValorePar) AND ([ValoreMis] = @Original_ValoreMis) AND ([OkValMis] = @Original_OkValMis) AND ((@IsNull_CodDeroga = 1 AND [CodDeroga] IS NULL) OR ([CodDeroga] = @Original_CodDeroga))) - - - - - - - - - - - - - - - - - - - - INSERT INTO [dbo].[Misure] ([IdxDossier], [CodScheda], [Vers], [NumScheda], [CodMisura], [Fase], [Operatore], [DataOra], [ValorePar], [ValoreMis], [OkValMis], [CodDeroga]) VALUES (@IdxDossier, @CodScheda, @Vers, @NumScheda, @CodMisura, @Fase, @Operatore, @DataOra, @ValorePar, @ValoreMis, @OkValMis, @CodDeroga); -SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga FROM Misure WHERE (CodMisura = @CodMisura) AND (CodScheda = @CodScheda) AND (Fase = @Fase) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) - - - - - - - - - - - - - - - - + - - SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga FROM dbo.Misure + + SELECT * +FROM v_Misure - - - UPDATE [dbo].[Misure] SET [IdxDossier] = @IdxDossier, [CodScheda] = @CodScheda, [Vers] = @Vers, [NumScheda] = @NumScheda, [CodMisura] = @CodMisura, [Fase] = @Fase, [Operatore] = @Operatore, [DataOra] = @DataOra, [ValorePar] = @ValorePar, [ValoreMis] = @ValoreMis, [OkValMis] = @OkValMis, [CodDeroga] = @CodDeroga WHERE (([IdxDossier] = @Original_IdxDossier) AND ([CodScheda] = @Original_CodScheda) AND ([Vers] = @Original_Vers) AND ([NumScheda] = @Original_NumScheda) AND ([CodMisura] = @Original_CodMisura) AND ([Fase] = @Original_Fase) AND ([Operatore] = @Original_Operatore) AND ([DataOra] = @Original_DataOra) AND ([ValorePar] = @Original_ValorePar) AND ([ValoreMis] = @Original_ValoreMis) AND ([OkValMis] = @Original_OkValMis) AND ((@IsNull_CodDeroga = 1 AND [CodDeroga] IS NULL) OR ([CodDeroga] = @Original_CodDeroga))); -SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataOra, ValorePar, ValoreMis, OkValMis, CodDeroga FROM Misure WHERE (CodMisura = @CodMisura) AND (CodScheda = @CodScheda) AND (Fase = @Fase) AND (IdxDossier = @IdxDossier) AND (NumScheda = @NumScheda) AND (Vers = @Vers) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1004,8 +932,55 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO + + + + + + + - + + + + + dbo.stp_Mis_getDataFilt + + + + + + + + + + + + + dbo.stp_Mis_getNum2Ins + + + + + + + + + + + + + dbo.stp_Mis_insMissing + + + + + + + + + + @@ -1340,13 +1315,38 @@ SELECT IdxDossier, CodScheda, Vers, NumScheda, CodMisura, Fase, Operatore, DataO - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CMS-SC-Data/DS_Applicazione.xss b/CMS-SC-Data/DS_Applicazione.xss index ce61ac4..598bbc3 100644 --- a/CMS-SC-Data/DS_Applicazione.xss +++ b/CMS-SC-Data/DS_Applicazione.xss @@ -15,7 +15,7 @@ - + @@ -114,27 +114,27 @@ - + 1100 - 595 + 592 - 955 - 595 + 1048 + 592 - + - 802 + 779 497 - 802 - 568 + 779 + 565 diff --git a/CMS-SC-Data/DtProxy.cs b/CMS-SC-Data/DtProxy.cs index c4dcbb0..e0eff49 100644 --- a/CMS-SC-Data/DtProxy.cs +++ b/CMS-SC-Data/DtProxy.cs @@ -29,6 +29,7 @@ namespace CMS_SC_Data taED = new DS_ApplicazioneTableAdapters.ElencoDossierTableAdapter(); taEFM = new DS_ApplicazioneTableAdapters.ElencoFamMaccTableAdapter(); taEM = new DS_ApplicazioneTableAdapters.ElencoMacchineCNTableAdapter(); + taMis = new DS_ApplicazioneTableAdapters.MisureTableAdapter(); taSCFM = new DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter(); taSCM = new DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter(); taVV = new DS_ApplicazioneTableAdapters.ValidValTableAdapter(); @@ -48,6 +49,7 @@ namespace CMS_SC_Data taED.Connection.ConnectionString = connStr; taEFM.Connection.ConnectionString = connStr; taEM.Connection.ConnectionString = connStr; + taMis.Connection.ConnectionString = connStr; taSCFM.Connection.ConnectionString = connStr; taSCM.Connection.ConnectionString = connStr; taVV.Connection.ConnectionString = connStr; @@ -64,6 +66,7 @@ namespace CMS_SC_Data public DS_ApplicazioneTableAdapters.ElencoDossierTableAdapter taED; public DS_ApplicazioneTableAdapters.ElencoFamMaccTableAdapter taEFM; public DS_ApplicazioneTableAdapters.ElencoMacchineCNTableAdapter taEM; + public DS_ApplicazioneTableAdapters.MisureTableAdapter taMis; public DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter taSCFM; public DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter taSCM; public DS_ApplicazioneTableAdapters.ValidValTableAdapter taVV; diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll index b5d485f..9acd4b6 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 9ac4c5c..0da3199 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 b5d485f..9acd4b6 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 ff63222..dc7ba4f 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/CMS_SC.csproj b/CMS_SC/CMS_SC.csproj index 2cb1a21..32349d9 100644 --- a/CMS_SC/CMS_SC.csproj +++ b/CMS_SC/CMS_SC.csproj @@ -343,6 +343,7 @@ + @@ -633,6 +634,13 @@ mod_autocompleteShort.ascx + + mod_collaudi.ascx + ASPXCodeBehind + + + mod_collaudi.ascx + mod_DettScheda.ascx ASPXCodeBehind diff --git a/CMS_SC/Collaudi.aspx b/CMS_SC/Collaudi.aspx index c078e76..f94d5f5 100644 --- a/CMS_SC/Collaudi.aspx +++ b/CMS_SC/Collaudi.aspx @@ -1,40 +1,63 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Collaudi.aspx.cs" Inherits="CMS_SC.Collaudi" %> + +<%@ Register Src="~/WebUserControls/mod_collaudi.ascx" TagPrefix="uc1" TagName="mod_collaudi" %> +<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagPrefix="uc1" TagName="mod_righePag" %> + + + -
-
-
- - - - - - - +
+
+
+
+
+

<%: traduci("Collaudi") %>

+
+
+ +
+
+
+
+ + + + + + + +
+
+ + + + + + +
+
+ + + + + + +
+
+ + +
+
-
- - - - - - +
+
-
- - - - - - -
-
- - - +
diff --git a/CMS_SC/Collaudi.aspx.cs b/CMS_SC/Collaudi.aspx.cs index 5e121e7..5f68bf6 100644 --- a/CMS_SC/Collaudi.aspx.cs +++ b/CMS_SC/Collaudi.aspx.cs @@ -12,6 +12,22 @@ namespace CMS_SC public partial class Collaudi : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + ((Bootstrap)this.Master).showSearch = true; + mod_righePag.numRowPag = 20; + mod_collaudi.pageSize = mod_righePag.numRowPag; + fixControls(); + } + mod_righePag.eh_newNum += mod_righePag_eh_newNum; + //mod_collaudi.eh_selezioneValore += mod_collaudi_eh_selezioneValore; + } + void mod_righePag_eh_newNum(object sender, EventArgs e) + { + mod_collaudi.pageSize = mod_righePag.numRowPag; + } + void mod_collaudi_eh_selezioneValore(object sender, EventArgs e) { fixControls(); } @@ -21,22 +37,70 @@ namespace CMS_SC private void fixControls() { btnAddNewSetMis.DataBind(); + btnAddNewSetMis.Visible = addNewVisible; + mod_collaudi.IdxDossier = IdxDossier; + mod_collaudi.CodSchedaVers = CodSchedaVers; + mod_collaudi.Fase = Fase; + mod_collaudi.doUpdate(); + } + protected int IdxDossier + { + get + { + int answ = -1; + try + { + answ = Convert.ToInt32(ddlDossier.SelectedValue); + } + catch + { } + return answ; + } + } + protected string CodSchedaVers + { + get + { + string answ = ""; + try + { + answ = ddlSelScheda.SelectedValue; + } + catch + { } + return answ; + } + } + protected string Fase + { + get + { + string answ = ""; + try + { + answ = ddlFase.SelectedValue; + } + catch + { } + return answ; + } } - protected void ddlStato_SelectedIndexChanged(object sender, EventArgs e) { ddlDossier.DataBind(); ddlSelScheda.DataBind(); + fixControls(); } protected void ddlDossier_SelectedIndexChanged(object sender, EventArgs e) { ddlSelScheda.DataBind(); + fixControls(); } protected void ddlSelScheda_SelectedIndexChanged(object sender, EventArgs e) { - + fixControls(); } /// /// wrapper traduzione @@ -54,8 +118,9 @@ namespace CMS_SC /// protected void btnAddNewSetMis_click(object sender, EventArgs e) { - //DtProxy.man.taSCM.insByFamMac(mod_elencoDossiers.idxDossier, ddlSelFamMacc.SelectedValue); - //mod_elencoSchedeDossier.doUpdate(); + int idxDossier = Convert.ToInt32(ddlDossier.SelectedValue); + DtProxy.man.taMis.insMissing(idxDossier, ddlSelScheda.SelectedValue, ddlFase.SelectedValue); + mod_collaudi.doUpdate(); } /// /// verifico se sia possibile aggiungere records (= mancano misure x lo stato indicato...) @@ -64,10 +129,28 @@ namespace CMS_SC { get { - bool answ = true; - + bool answ = false; + try + { + int idxDossier = Convert.ToInt32(ddlDossier.SelectedValue); + answ = DtProxy.man.taMis.getNum2Ins(idxDossier, ddlSelScheda.SelectedValue, ddlFase.SelectedValue).Rows.Count > 0; + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("{0}", exc)); + } return answ; } } + + protected void ddlFase_SelectedIndexChanged(object sender, EventArgs e) + { + fixControls(); + } + + protected void ddlSelScheda_DataBound(object sender, EventArgs e) + { + fixControls(); + } } } \ No newline at end of file diff --git a/CMS_SC/Collaudi.aspx.designer.cs b/CMS_SC/Collaudi.aspx.designer.cs index 729d710..796e2a5 100644 --- a/CMS_SC/Collaudi.aspx.designer.cs +++ b/CMS_SC/Collaudi.aspx.designer.cs @@ -12,6 +12,15 @@ namespace CMS_SC { public partial class Collaudi { + /// + /// btnAddNewSetMis control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAddNewSetMis; + /// /// ddlStato control. /// @@ -85,12 +94,21 @@ namespace CMS_SC { protected global::System.Web.UI.WebControls.ObjectDataSource odsFase; /// - /// btnAddNewSetMis control. + /// mod_collaudi control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnAddNewSetMis; + protected global::CMS_SC.WebUserControls.mod_collaudi mod_collaudi; + + /// + /// mod_righePag control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::mod_righePag mod_righePag; } } diff --git a/CMS_SC/WebUserControls/mod_collaudi.ascx b/CMS_SC/WebUserControls/mod_collaudi.ascx new file mode 100644 index 0000000..404676a --- /dev/null +++ b/CMS_SC/WebUserControls/mod_collaudi.ascx @@ -0,0 +1,59 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_collaudi.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_collaudi" %> + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + +<%-- + + +   + + + + + + + + +   + + + + + --%> + + + + + + + + + + + + + \ No newline at end of file diff --git a/CMS_SC/WebUserControls/mod_collaudi.ascx.cs b/CMS_SC/WebUserControls/mod_collaudi.ascx.cs new file mode 100644 index 0000000..40aa3cd --- /dev/null +++ b/CMS_SC/WebUserControls/mod_collaudi.ascx.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace CMS_SC.WebUserControls +{ + public partial class mod_collaudi : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// dimensione pagina grid view + /// + public int pageSize + { + get + { + return grView.PageSize; + } + set + { + grView.PageSize = value; + } + } + public int IdxDossier + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(hfIdxDossier.Value); + } + catch + { } + return answ; + } + set + { + hfIdxDossier.Value = value.ToString(); + } + } + public string CodSchedaVers + { + get + { + string answ = ""; + try + { + answ = hfCodSchedaVers.Value; + } + catch + { } + return answ; + } + set + { + hfCodSchedaVers.Value = value; + } + } + public string Fase + { + get + { + string answ = ""; + try + { + answ = hfFase.Value; + } + catch + { } + return answ; + } + set + { + hfFase.Value = value; + } + } + public void doUpdate() + { + grView.DataBind(); + } + } +} \ No newline at end of file diff --git a/CMS_SC/WebUserControls/mod_collaudi.ascx.designer.cs b/CMS_SC/WebUserControls/mod_collaudi.ascx.designer.cs new file mode 100644 index 0000000..e4d78dc --- /dev/null +++ b/CMS_SC/WebUserControls/mod_collaudi.ascx.designer.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CMS_SC.WebUserControls { + + + public partial class mod_collaudi { + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// hfIdxDossier control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfIdxDossier; + + /// + /// hfCodSchedaVers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCodSchedaVers; + + /// + /// hfFase control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfFase; + } +} diff --git a/CMS_SC/WebUserControls/mod_testata.ascx b/CMS_SC/WebUserControls/mod_testata.ascx index 3390f12..2ce86b9 100644 --- a/CMS_SC/WebUserControls/mod_testata.ascx +++ b/CMS_SC/WebUserControls/mod_testata.ascx @@ -31,7 +31,7 @@ Home -
  • +
  • Anagrafiche diff --git a/CMS_SC/bin/CMS-SC-Data.dll b/CMS_SC/bin/CMS-SC-Data.dll index b5d485f..9acd4b6 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 f7b0d7f..3e61226 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 9ac4c5c..0da3199 100644 Binary files a/CMS_SC/bin/SteamWare.dll and b/CMS_SC/bin/SteamWare.dll differ