diff --git a/CMS-SC-Data/DS_Applicazione.Designer.cs b/CMS-SC-Data/DS_Applicazione.Designer.cs index f96ae56..b728b8b 100644 --- a/CMS-SC-Data/DS_Applicazione.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione.Designer.cs @@ -9067,7 +9067,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH [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[4]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM dbo.ValidVal" + @@ -9081,6 +9081,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodScheda", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vers", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodMisura", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinPar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 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_VV_getByScheda"; @@ -9090,16 +9091,23 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodMisura", 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_VV_updateQuery"; + this._commandCollection[3].CommandText = "dbo.stp_VV_insertNew"; 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("@MinPar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxPar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LIVal", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LSVal", global::System.Data.SqlDbType.NChar, 10, 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("@Original_CodScheda", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vers", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodMisura", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@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("@CodMisura", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_VV_updateQuery"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinPar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxPar", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LIVal", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LSVal", global::System.Data.SqlDbType.NChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodScheda", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vers", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodMisura", 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()] @@ -9341,7 +9349,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH [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, false)] - public virtual int deleteQuery(string Original_CodScheda, global::System.Nullable Original_Vers, string Original_CodMisura) { + public virtual int deleteQuery(string Original_CodScheda, global::System.Nullable Original_Vers, string Original_CodMisura, global::System.Nullable Original_MinPar) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; if ((Original_CodScheda == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -9361,6 +9369,46 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH else { command.Parameters[3].Value = ((string)(Original_CodMisura)); } + if ((Original_MinPar.HasValue == true)) { + command.Parameters[4].Value = ((double)(Original_MinPar.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [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 insertNew(string CodSchedaVers, string CodMisura) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((CodSchedaVers == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodSchedaVers)); + } + if ((CodMisura == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodMisura)); + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -9383,7 +9431,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] public virtual int updateQuery(global::System.Nullable MinPar, global::System.Nullable MaxPar, global::System.Nullable LIVal, string LSVal, string Original_CodScheda, global::System.Nullable Original_Vers, string Original_CodMisura) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((MinPar.HasValue == true)) { command.Parameters[1].Value = ((double)(MinPar.Value)); } diff --git a/CMS-SC-Data/DS_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index 9892805..a7b49e1 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -824,6 +824,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH + @@ -840,6 +841,18 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH + + + + dbo.stp_VV_insertNew + + + + + + + + diff --git a/CMS-SC-Data/DS_Applicazione.xss b/CMS-SC-Data/DS_Applicazione.xss index 7612bb8..1c4ab33 100644 --- a/CMS-SC-Data/DS_Applicazione.xss +++ b/CMS-SC-Data/DS_Applicazione.xss @@ -6,18 +6,18 @@ --> - - - + + + - + - - - + + + - + 398 @@ -29,7 +29,7 @@ - + 436 @@ -41,7 +41,7 @@ - + 602 @@ -53,7 +53,7 @@ - + 902 @@ -65,7 +65,7 @@ - + 1247 @@ -81,7 +81,7 @@ - + 561 @@ -93,7 +93,7 @@ - + 1050 @@ -105,7 +105,7 @@ - + 1139 @@ -117,15 +117,15 @@ - + 319 - 697 + 613 - 190 - 697 + 245 + 613 diff --git a/CMS-SC-Data/DS_Utility.Designer.cs b/CMS-SC-Data/DS_Utility.Designer.cs index f0407d6..5a29c2c 100644 --- a/CMS-SC-Data/DS_Utility.Designer.cs +++ b/CMS-SC-Data/DS_Utility.Designer.cs @@ -26,6 +26,8 @@ namespace CMS_SC_Data { private v_selSchedaDataTable tablev_selScheda; + private v_selListValDataTable tablev_selListVal; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -57,6 +59,9 @@ namespace CMS_SC_Data { if ((ds.Tables["v_selScheda"] != null)) { base.Tables.Add(new v_selSchedaDataTable(ds.Tables["v_selScheda"])); } + if ((ds.Tables["v_selListVal"] != null)) { + base.Tables.Add(new v_selListValDataTable(ds.Tables["v_selListVal"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -85,6 +90,16 @@ namespace CMS_SC_Data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public v_selListValDataTable v_selListVal { + get { + return this.tablev_selListVal; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -155,6 +170,9 @@ namespace CMS_SC_Data { if ((ds.Tables["v_selScheda"] != null)) { base.Tables.Add(new v_selSchedaDataTable(ds.Tables["v_selScheda"])); } + if ((ds.Tables["v_selListVal"] != null)) { + base.Tables.Add(new v_selListValDataTable(ds.Tables["v_selListVal"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -194,6 +212,12 @@ namespace CMS_SC_Data { this.tablev_selScheda.InitVars(); } } + this.tablev_selListVal = ((v_selListValDataTable)(base.Tables["v_selListVal"])); + if ((initTable == true)) { + if ((this.tablev_selListVal != null)) { + this.tablev_selListVal.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -206,6 +230,8 @@ namespace CMS_SC_Data { this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; this.tablev_selScheda = new v_selSchedaDataTable(); base.Tables.Add(this.tablev_selScheda); + this.tablev_selListVal = new v_selListValDataTable(); + base.Tables.Add(this.tablev_selListVal); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -214,6 +240,12 @@ namespace CMS_SC_Data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializev_selListVal() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -272,6 +304,9 @@ namespace CMS_SC_Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void v_selSchedaRowChangeEventHandler(object sender, v_selSchedaRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void v_selListValRowChangeEventHandler(object sender, v_selListValRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -537,6 +572,270 @@ namespace CMS_SC_Data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class v_selListValDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnvalue; + + private global::System.Data.DataColumn columnlabel; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValDataTable() { + this.TableName = "v_selListVal"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal v_selListValDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected v_selListValDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn valueColumn { + get { + return this.columnvalue; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn labelColumn { + get { + return this.columnlabel; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValRow this[int index] { + get { + return ((v_selListValRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event v_selListValRowChangeEventHandler v_selListValRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event v_selListValRowChangeEventHandler v_selListValRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event v_selListValRowChangeEventHandler v_selListValRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event v_selListValRowChangeEventHandler v_selListValRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void Addv_selListValRow(v_selListValRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValRow Addv_selListValRow(string value, string label) { + v_selListValRow rowv_selListValRow = ((v_selListValRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + value, + label}; + rowv_selListValRow.ItemArray = columnValuesArray; + this.Rows.Add(rowv_selListValRow); + return rowv_selListValRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + v_selListValDataTable cln = ((v_selListValDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new v_selListValDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnvalue = base.Columns["value"]; + this.columnlabel = base.Columns["label"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnvalue = new global::System.Data.DataColumn("value", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnvalue); + this.columnlabel = new global::System.Data.DataColumn("label", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnlabel); + this.columnvalue.ReadOnly = true; + this.columnvalue.MaxLength = 112; + this.columnlabel.MaxLength = 50; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValRow Newv_selListValRow() { + return ((v_selListValRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new v_selListValRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(v_selListValRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.v_selListValRowChanged != null)) { + this.v_selListValRowChanged(this, new v_selListValRowChangeEvent(((v_selListValRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.v_selListValRowChanging != null)) { + this.v_selListValRowChanging(this, new v_selListValRowChangeEvent(((v_selListValRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.v_selListValRowDeleted != null)) { + this.v_selListValRowDeleted(this, new v_selListValRowChangeEvent(((v_selListValRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.v_selListValRowDeleting != null)) { + this.v_selListValRowDeleting(this, new v_selListValRowChangeEvent(((v_selListValRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void Removev_selListValRow(v_selListValRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_Utility ds = new DS_Utility(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "v_selListValDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -608,6 +907,77 @@ namespace CMS_SC_Data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class v_selListValRow : global::System.Data.DataRow { + + private v_selListValDataTable tablev_selListVal; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal v_selListValRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablev_selListVal = ((v_selListValDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string value { + get { + try { + return ((string)(this[this.tablev_selListVal.valueColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'value\' in table \'v_selListVal\' is DBNull.", e); + } + } + set { + this[this.tablev_selListVal.valueColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string label { + get { + try { + return ((string)(this[this.tablev_selListVal.labelColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'label\' in table \'v_selListVal\' is DBNull.", e); + } + } + set { + this[this.tablev_selListVal.labelColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsvalueNull() { + return this.IsNull(this.tablev_selListVal.valueColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetvalueNull() { + this[this.tablev_selListVal.valueColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IslabelNull() { + return this.IsNull(this.tablev_selListVal.labelColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetlabelNull() { + this[this.tablev_selListVal.labelColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -641,6 +1011,40 @@ namespace CMS_SC_Data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class v_selListValRowChangeEvent : global::System.EventArgs { + + private v_selListValRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValRowChangeEvent(v_selListValRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace CMS_SC_Data.DS_UtilityTableAdapters { @@ -814,6 +1218,204 @@ namespace CMS_SC_Data.DS_UtilityTableAdapters { } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class v_selListValTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public v_selListValTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "v_selListVal"; + tableMapping.ColumnMappings.Add("value", "value"); + tableMapping.ColumnMappings.Add("label", "label"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::CMS_SC_Data.Properties.Settings.Default.CMS_SCConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT value, label FROM dbo.v_selListVal"; + 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_listValues_getValidValues"; + 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("@TableName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FieldName", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_Utility.v_selListValDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_Utility.v_selListValDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Utility.v_selListValDataTable dataTable = new DS_Utility.v_selListValDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Utility.v_selListValDataTable getByTableField(string TableName, string FieldName) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((TableName == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(TableName)); + } + if ((FieldName == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(FieldName)); + } + DS_Utility.v_selListValDataTable dataTable = new DS_Utility.v_selListValDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// diff --git a/CMS-SC-Data/DS_Utility.xsd b/CMS-SC-Data/DS_Utility.xsd index 590f81f..3c88878 100644 --- a/CMS-SC-Data/DS_Utility.xsd +++ b/CMS-SC-Data/DS_Utility.xsd @@ -24,6 +24,36 @@ + + + + + + SELECT value, label FROM dbo.v_selListVal + + + + + + + + + + + + + + dbo.stp_listValues_getValidValues + + + + + + + + + + @@ -32,7 +62,7 @@ - + @@ -52,6 +82,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/CMS-SC-Data/DS_Utility.xss b/CMS-SC-Data/DS_Utility.xss index fed2524..a52228b 100644 --- a/CMS-SC-Data/DS_Utility.xss +++ b/CMS-SC-Data/DS_Utility.xss @@ -6,7 +6,8 @@ --> - + + \ No newline at end of file diff --git a/CMS-SC-Data/DtProxy.cs b/CMS-SC-Data/DtProxy.cs index 39e9802..9d9c155 100644 --- a/CMS-SC-Data/DtProxy.cs +++ b/CMS-SC-Data/DtProxy.cs @@ -28,6 +28,7 @@ namespace CMS_SC_Data taDS = new DS_ApplicazioneTableAdapters.DettSchedaTableAdapter(); taEFM = new DS_ApplicazioneTableAdapters.ElencoFamMaccTableAdapter(); taEM = new DS_ApplicazioneTableAdapters.ElencoMacchineCNTableAdapter(); + taVV = new DS_ApplicazioneTableAdapters.ValidValTableAdapter(); //taFile = new DS_UtilityTableAdapters.tblFilesTableAdapter(); } /// @@ -43,6 +44,7 @@ namespace CMS_SC_Data taDS.Connection.ConnectionString = connStr; taEFM.Connection.ConnectionString = connStr; taEM.Connection.ConnectionString = connStr; + taVV.Connection.ConnectionString = connStr; //taFile.Connection.ConnectionString = connStrFiles; } @@ -55,6 +57,7 @@ namespace CMS_SC_Data public DS_ApplicazioneTableAdapters.DettSchedaTableAdapter taDS; public DS_ApplicazioneTableAdapters.ElencoFamMaccTableAdapter taEFM; public DS_ApplicazioneTableAdapters.ElencoMacchineCNTableAdapter taEM; + public DS_ApplicazioneTableAdapters.ValidValTableAdapter taVV; //public DS_UtilityTableAdapters.tblFilesTableAdapter taFile; public static DtProxy man = new DtProxy(); diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll index 5504090..a365135 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 a64fc54..852902f 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 5504090..a365135 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 bd5f98c..eb84b29 100644 Binary files a/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/CMS-SC-Data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll b/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll index 7533c3a..bbae3d6 100644 Binary files a/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll and b/CMS-SC-Data/obj/Debug/TempPE/DS_Utility.Designer.cs.dll differ diff --git a/CMS_SC/DettScheda.aspx b/CMS_SC/DettScheda.aspx index 07a1c0a..ad6bf3f 100644 --- a/CMS_SC/DettScheda.aspx +++ b/CMS_SC/DettScheda.aspx @@ -14,13 +14,19 @@
-
- - +
+ +
+
-
- +
+
+
+ +
+
+
diff --git a/CMS_SC/DettScheda.aspx.cs b/CMS_SC/DettScheda.aspx.cs index b2f289d..4157376 100644 --- a/CMS_SC/DettScheda.aspx.cs +++ b/CMS_SC/DettScheda.aspx.cs @@ -16,6 +16,7 @@ namespace CMS_SC ((Bootstrap)this.Master).showSearch = true; mod_righePag.numRowPag = 20; mod_DettScheda.pageSize = mod_righePag.numRowPag; + mod_validVal.pageSize = mod_righePag.numRowPag; } mod_righePag.eh_newNum += mod_righePag_eh_newNum; mod_DettScheda.eh_selezioneValore += mod_DettScheda_eh_selezioneValore; @@ -36,6 +37,7 @@ namespace CMS_SC if (mod_DettScheda.CodMisuraSel != "") { mod_validVal.Visible = true; + mod_validVal.CodMisuraSel = mod_DettScheda.CodMisuraSel; } else { @@ -46,6 +48,7 @@ namespace CMS_SC void mod_righePag_eh_newNum(object sender, EventArgs e) { mod_DettScheda.pageSize = mod_righePag.numRowPag; + mod_validVal.pageSize = mod_righePag.numRowPag; } } } \ No newline at end of file diff --git a/CMS_SC/DettScheda.aspx.designer.cs b/CMS_SC/DettScheda.aspx.designer.cs index d254f28..5488941 100644 --- a/CMS_SC/DettScheda.aspx.designer.cs +++ b/CMS_SC/DettScheda.aspx.designer.cs @@ -21,15 +21,6 @@ namespace CMS_SC { /// protected global::CMS_SC.WebUserControls.mod_selSchedaUrl mod_selSchedaUrl; - /// - /// mod_DettScheda control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::CMS_SC.WebUserControls.mod_DettScheda mod_DettScheda; - /// /// mod_righePag control. /// @@ -39,6 +30,15 @@ namespace CMS_SC { /// protected global::mod_righePag mod_righePag; + /// + /// mod_DettScheda control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::CMS_SC.WebUserControls.mod_DettScheda mod_DettScheda; + /// /// mod_validVal control. /// diff --git a/CMS_SC/WebUserControls/mod_DettScheda.ascx b/CMS_SC/WebUserControls/mod_DettScheda.ascx index 91cde42..9a7251f 100644 --- a/CMS_SC/WebUserControls/mod_DettScheda.ascx +++ b/CMS_SC/WebUserControls/mod_DettScheda.ascx @@ -40,7 +40,8 @@ - + + @@ -61,7 +62,7 @@ - + @@ -87,3 +88,9 @@ + + + + + + diff --git a/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs b/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs index 982ee61..6beb422 100644 --- a/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs +++ b/CMS_SC/WebUserControls/mod_DettScheda.ascx.cs @@ -166,11 +166,21 @@ namespace CMS_SC.WebUserControls if (_comando != "") { DtProxy.man.taDS.moveUpDown(_comando, CodSchedaSel, VersSel, CodMisuraSel); - grView.DataBind(); + resetSelezione(); + } + else + { + raiseEvent(); } - raiseEvent(); } protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// resetto selezione + /// + private void resetSelezione() { grView.SelectedIndex = -1; grView.DataBind(); @@ -229,5 +239,16 @@ namespace CMS_SC.WebUserControls } return answ; } + + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + resetSelezione(); + } + + protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e) + { + resetSelezione(); + } + } } \ No newline at end of file diff --git a/CMS_SC/WebUserControls/mod_DettScheda.ascx.designer.cs b/CMS_SC/WebUserControls/mod_DettScheda.ascx.designer.cs index 987e57d..f79b793 100644 --- a/CMS_SC/WebUserControls/mod_DettScheda.ascx.designer.cs +++ b/CMS_SC/WebUserControls/mod_DettScheda.ascx.designer.cs @@ -29,5 +29,14 @@ namespace CMS_SC.WebUserControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// odsTipoVal control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsTipoVal; } } diff --git a/CMS_SC/WebUserControls/mod_validVal.ascx b/CMS_SC/WebUserControls/mod_validVal.ascx index 4faf869..0224574 100644 --- a/CMS_SC/WebUserControls/mod_validVal.ascx +++ b/CMS_SC/WebUserControls/mod_validVal.ascx @@ -1,2 +1,65 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_validVal.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_validVal" %> -elenco parametri validazione.. \ No newline at end of file + + + + + <%# traduci("NoRecords") %> + + + + + + + +   + + + + + + <%-- + --%> + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CMS_SC/WebUserControls/mod_validVal.ascx.cs b/CMS_SC/WebUserControls/mod_validVal.ascx.cs index 30cbe04..c8eaa9d 100644 --- a/CMS_SC/WebUserControls/mod_validVal.ascx.cs +++ b/CMS_SC/WebUserControls/mod_validVal.ascx.cs @@ -4,14 +4,166 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using CMS_SC_Data; +using SteamWare; namespace CMS_SC.WebUserControls { public partial class mod_validVal : System.Web.UI.UserControl { + /// + /// selezione valore in DettScheda + /// + public event EventHandler eh_selezioneValore; + /// + /// sollevo evento selezione + /// + protected void raiseEvent() + { + // sollevo evento nuovo valore... + if (eh_selezioneValore != null) + { + eh_selezioneValore(this, new EventArgs()); + } + } + /// + /// caricamento macchina + /// + /// + /// protected void Page_Load(object sender, EventArgs e) { - + if (!Page.IsPostBack) + { + btnNewFromEmpty.DataBind(); + } + } + /// + /// dimensione pagina grid view + /// + public int pageSize + { + get + { + return grView.PageSize; + } + set + { + grView.PageSize = value; + } + } + /// + /// richiesta di aggiunta record, tutto a zero! + /// + /// + /// + protected void lbAddNew_Click(object sender, EventArgs e) + { + insertNewRec(); + } + /// + /// inserisco un nuovo record da completare... + /// + private void insertNewRec() + { + // inserisco nuovo record SE HO una selezione da URL + if (memLayer.ML.QSS("CodSchedaVers") != "") + { + DtProxy.man.taVV.insertNew(memLayer.ML.QSS("CodSchedaVers"), CodMisuraSel); + // update! + grView.DataBind(); + } + } + /// + /// crea un nuovo record ... + /// + /// + /// + protected void btnNewFromEmpty_Click(object sender, EventArgs e) + { + insertNewRec(); + } + /// + /// wrapper traduzione + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + /// + /// Scheda selezionata + /// + public string CodSchedaSel + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["CodScheda"].ToString(); + } + catch + { } + return answ; + } + } + /// + /// Versione selezionata + /// + public int VersSel + { + get + { + int answ = -1; + try + { + answ = Convert.ToInt32(grView.SelectedDataKey["Vers"].ToString()); + } + catch + { } + return answ; + } + } + /// + /// Misura selezionata + /// + public string CodMisuraSel + { + get + { + string answ = ""; + try + { + answ = hfCodMisura.Value; + } + catch + { } + return answ; + } + set + { + hfCodMisura.Value = value; + grView.DataBind(); + } + } + /// + /// Misura selezionata + /// + public string MinParSel + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["MinPar"].ToString(); + } + catch + { } + return answ; + } } } } \ No newline at end of file diff --git a/CMS_SC/WebUserControls/mod_validVal.ascx.designer.cs b/CMS_SC/WebUserControls/mod_validVal.ascx.designer.cs index 045d50d..2687389 100644 --- a/CMS_SC/WebUserControls/mod_validVal.ascx.designer.cs +++ b/CMS_SC/WebUserControls/mod_validVal.ascx.designer.cs @@ -3,15 +3,49 @@ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ -namespace CMS_SC.WebUserControls -{ - - - public partial class mod_validVal - { +namespace CMS_SC.WebUserControls { + + + public partial class mod_validVal { + + /// + /// btnNewFromEmpty control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnNewFromEmpty; + + /// + /// 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; + + /// + /// hfCodMisura control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCodMisura; } } diff --git a/CMS_SC/bin/CMS-SC-Data.dll b/CMS_SC/bin/CMS-SC-Data.dll index 5504090..a365135 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 5f4f252..0ba692e 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 a64fc54..852902f 100644 Binary files a/CMS_SC/bin/SteamWare.dll and b/CMS_SC/bin/SteamWare.dll differ diff --git a/VersGen/CMS_SC.cs b/VersGen/CMS_SC.cs index c2d92a3..dd6ec06 100644 --- a/VersGen/CMS_SC.cs +++ b/VersGen/CMS_SC.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.2.023.335")] -[assembly: AssemblyFileVersion("1.2.023.335")] +[assembly: AssemblyVersion("1.2.025.335")] +[assembly: AssemblyFileVersion("1.2.025.335")] [assembly: AssemblyCopyright("Steamware © 2009-2015")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/CMS_SC.tt b/VersGen/CMS_SC.tt index 0737387..1de7fe4 100644 --- a/VersGen/CMS_SC.tt +++ b/VersGen/CMS_SC.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("1.2.023.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("1.2.023.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("1.2.025.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("1.2.025.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Steamware © 2009-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+ diff --git a/VersGen/bin/Debug/VersGen.dll b/VersGen/bin/Debug/VersGen.dll index 9e3b437..0eea4e3 100644 Binary files a/VersGen/bin/Debug/VersGen.dll and b/VersGen/bin/Debug/VersGen.dll differ