diff --git a/CMS-SC-Data/DS_Applicazione.xsd b/CMS-SC-Data/DS_Applicazione.xsd index c536abe..228c00b 100644 --- a/CMS-SC-Data/DS_Applicazione.xsd +++ b/CMS-SC-Data/DS_Applicazione.xsd @@ -1317,6 +1317,83 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) + + + + + + DELETE FROM [dbo].[UserParam] WHERE (([Email] = @Original_Email) AND ([ParName] = @Original_ParName)) + + + + + + + + + INSERT INTO [dbo].[UserParam] ([Email], [ParName], [ParValue]) VALUES (@Email, @ParName, @ParValue); +SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParName = @ParName) + + + + + + + + + + SELECT Email, ParName, ParValue FROM dbo.UserParam + + + + + + UPDATE [dbo].[UserParam] SET [Email] = @Email, [ParName] = @ParName, [ParValue] = @ParValue WHERE (([Email] = @Original_Email) AND ([ParName] = @Original_ParName)); +SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParName = @ParName) + + + + + + + + + + + + + + + + + + + + + dbo.stp_UsrPar_getByKey + + + + + + + + + + + + dbo.stp_UsrPar_upsert + + + + + + + + + + + @@ -1325,7 +1402,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1346,7 +1423,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1384,7 +1461,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1404,7 +1481,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1446,7 +1523,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1495,7 +1572,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1520,7 +1597,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1577,7 +1654,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1623,7 +1700,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1660,7 +1737,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1753,7 +1830,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1867,7 +1944,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1887,7 +1964,7 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) - + @@ -1907,6 +1984,33 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1974,21 +2078,26 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode) + + + + + - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/CMS-SC-Data/DS_Applicazione1.Designer.cs b/CMS-SC-Data/DS_Applicazione1.Designer.cs index 3ba1980..797bf57 100644 --- a/CMS-SC-Data/DS_Applicazione1.Designer.cs +++ b/CMS-SC-Data/DS_Applicazione1.Designer.cs @@ -50,6 +50,8 @@ namespace CMS_SC_Data { private AnagTagsDataTable tableAnagTags; + private UserParamDataTable tableUserParam; + private global::System.Data.DataRelation relationFK_DettScheda_AnagSchede1; private global::System.Data.DataRelation relationFK_ElencoMacchineCN_ElencoFamMacc; @@ -141,6 +143,9 @@ namespace CMS_SC_Data { if ((ds.Tables["AnagTags"] != null)) { base.Tables.Add(new AnagTagsDataTable(ds.Tables["AnagTags"])); } + if ((ds.Tables["UserParam"] != null)) { + base.Tables.Add(new UserParamDataTable(ds.Tables["UserParam"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -289,6 +294,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 UserParamDataTable UserParam { + get { + return this.tableUserParam; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -395,6 +410,9 @@ namespace CMS_SC_Data { if ((ds.Tables["AnagTags"] != null)) { base.Tables.Add(new AnagTagsDataTable(ds.Tables["AnagTags"])); } + if ((ds.Tables["UserParam"] != null)) { + base.Tables.Add(new UserParamDataTable(ds.Tables["UserParam"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -506,6 +524,12 @@ namespace CMS_SC_Data { this.tableAnagTags.InitVars(); } } + this.tableUserParam = ((UserParamDataTable)(base.Tables["UserParam"])); + if ((initTable == true)) { + if ((this.tableUserParam != null)) { + this.tableUserParam.InitVars(); + } + } this.relationFK_DettScheda_AnagSchede1 = this.Relations["FK_DettScheda_AnagSchede1"]; this.relationFK_ElencoMacchineCN_ElencoFamMacc = this.Relations["FK_ElencoMacchineCN_ElencoFamMacc"]; this.relationFK_ValidVal_DettScheda = this.Relations["FK_ValidVal_DettScheda"]; @@ -554,6 +578,8 @@ namespace CMS_SC_Data { base.Tables.Add(this.tableTags2Macchine); this.tableAnagTags = new AnagTagsDataTable(); base.Tables.Add(this.tableAnagTags); + this.tableUserParam = new UserParamDataTable(); + base.Tables.Add(this.tableUserParam); this.relationFK_DettScheda_AnagSchede1 = new global::System.Data.DataRelation("FK_DettScheda_AnagSchede1", new global::System.Data.DataColumn[] { this.tableAnagSchede.CodSchedaColumn, this.tableAnagSchede.VersColumn}, new global::System.Data.DataColumn[] { @@ -698,6 +724,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 ShouldSerializeUserParam() { + 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) { @@ -792,6 +824,9 @@ namespace CMS_SC_Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void AnagTagsRowChangeEventHandler(object sender, AnagTagsRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void UserParamRowChangeEventHandler(object sender, UserParamRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -5708,6 +5743,298 @@ namespace CMS_SC_Data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class UserParamDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnEmail; + + private global::System.Data.DataColumn columnParName; + + private global::System.Data.DataColumn columnParValue; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public UserParamDataTable() { + this.TableName = "UserParam"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal UserParamDataTable(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 UserParamDataTable(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 EmailColumn { + get { + return this.columnEmail; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn ParNameColumn { + get { + return this.columnParName; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn ParValueColumn { + get { + return this.columnParValue; + } + } + + [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 UserParamRow this[int index] { + get { + return ((UserParamRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event UserParamRowChangeEventHandler UserParamRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event UserParamRowChangeEventHandler UserParamRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event UserParamRowChangeEventHandler UserParamRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event UserParamRowChangeEventHandler UserParamRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddUserParamRow(UserParamRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public UserParamRow AddUserParamRow(string Email, string ParName, string ParValue) { + UserParamRow rowUserParamRow = ((UserParamRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Email, + ParName, + ParValue}; + rowUserParamRow.ItemArray = columnValuesArray; + this.Rows.Add(rowUserParamRow); + return rowUserParamRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public UserParamRow FindByEmailParName(string Email, string ParName) { + return ((UserParamRow)(this.Rows.Find(new object[] { + Email, + ParName}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + UserParamDataTable cln = ((UserParamDataTable)(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 UserParamDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnEmail = base.Columns["Email"]; + this.columnParName = base.Columns["ParName"]; + this.columnParValue = base.Columns["ParValue"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnEmail = new global::System.Data.DataColumn("Email", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEmail); + this.columnParName = new global::System.Data.DataColumn("ParName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnParName); + this.columnParValue = new global::System.Data.DataColumn("ParValue", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnParValue); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnEmail, + this.columnParName}, true)); + this.columnEmail.AllowDBNull = false; + this.columnEmail.MaxLength = 250; + this.columnParName.AllowDBNull = false; + this.columnParName.MaxLength = 50; + this.columnParValue.AllowDBNull = false; + this.columnParValue.MaxLength = 2147483647; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public UserParamRow NewUserParamRow() { + return ((UserParamRow)(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 UserParamRow(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(UserParamRow); + } + + [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.UserParamRowChanged != null)) { + this.UserParamRowChanged(this, new UserParamRowChangeEvent(((UserParamRow)(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.UserParamRowChanging != null)) { + this.UserParamRowChanging(this, new UserParamRowChangeEvent(((UserParamRow)(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.UserParamRowDeleted != null)) { + this.UserParamRowDeleted(this, new UserParamRowChangeEvent(((UserParamRow)(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.UserParamRowDeleting != null)) { + this.UserParamRowDeleting(this, new UserParamRowChangeEvent(((UserParamRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveUserParamRow(UserParamRow 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_Applicazione ds = new DS_Applicazione(); + 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 = "UserParamDataTable"; + 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. /// @@ -7780,6 +8107,54 @@ namespace CMS_SC_Data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class UserParamRow : global::System.Data.DataRow { + + private UserParamDataTable tableUserParam; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal UserParamRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableUserParam = ((UserParamDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string Email { + get { + return ((string)(this[this.tableUserParam.EmailColumn])); + } + set { + this[this.tableUserParam.EmailColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string ParName { + get { + return ((string)(this[this.tableUserParam.ParNameColumn])); + } + set { + this[this.tableUserParam.ParNameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string ParValue { + get { + return ((string)(this[this.tableUserParam.ParValueColumn])); + } + set { + this[this.tableUserParam.ParValueColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -8221,6 +8596,40 @@ namespace CMS_SC_Data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class UserParamRowChangeEvent : global::System.EventArgs { + + private UserParamRow 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 UserParamRowChangeEvent(UserParamRow 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 UserParamRow 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_ApplicazioneTableAdapters { @@ -14462,6 +14871,440 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; } } + /// + ///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 UserParamTableAdapter : 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 UserParamTableAdapter() { + 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 = "UserParam"; + tableMapping.ColumnMappings.Add("Email", "Email"); + tableMapping.ColumnMappings.Add("ParName", "ParName"); + tableMapping.ColumnMappings.Add("ParValue", "ParValue"); + 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].[UserParam] WHERE (([Email] = @Original_Email) AND ([ParName] =" + + " @Original_ParName))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ParName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParName", 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].[UserParam] ([Email], [ParName], [ParValue]) VALUES (@Email, @P" + + "arName, @ParValue);\r\nSELECT Email, ParName, ParValue FROM UserParam WHERE (Email" + + " = @Email) AND (ParName = @ParName)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParValue", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParValue", 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].[UserParam] SET [Email] = @Email, [ParName] = @ParName, [ParValue] = @ParValue WHERE (([Email] = @Original_Email) AND ([ParName] = @Original_ParName)); +SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParName = @ParName)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ParValue", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParValue", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ParName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ParName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::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[3]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT Email, ParName, ParValue FROM dbo.UserParam"; + 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_UsrPar_getByKey"; + 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("@email", global::System.Data.SqlDbType.NVarChar, 250, 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("@ParName", 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_UsrPar_upsert"; + 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("@Email", global::System.Data.SqlDbType.NVarChar, 250, 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("@ParName", global::System.Data.SqlDbType.NVarChar, 50, 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("@ParValue", global::System.Data.SqlDbType.NVarChar, 2147483647, 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_Applicazione.UserParamDataTable 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_Applicazione.UserParamDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Applicazione.UserParamDataTable dataTable = new DS_Applicazione.UserParamDataTable(); + 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_Applicazione.UserParamDataTable getByKey(string email, string ParName) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((email == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(email)); + } + if ((ParName == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(ParName)); + } + DS_Applicazione.UserParamDataTable dataTable = new DS_Applicazione.UserParamDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_Applicazione.UserParamDataTable 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, "UserParam"); + } + + [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(string Original_Email, string Original_ParName) { + if ((Original_Email == null)) { + throw new global::System.ArgumentNullException("Original_Email"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Email)); + } + if ((Original_ParName == null)) { + throw new global::System.ArgumentNullException("Original_ParName"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_ParName)); + } + 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(string Email, string ParName, string ParValue) { + if ((Email == null)) { + throw new global::System.ArgumentNullException("Email"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Email)); + } + if ((ParName == null)) { + throw new global::System.ArgumentNullException("ParName"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ParName)); + } + if ((ParValue == null)) { + throw new global::System.ArgumentNullException("ParValue"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ParValue)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string Email, string ParName, string ParValue, string Original_Email, string Original_ParName) { + if ((Email == null)) { + throw new global::System.ArgumentNullException("Email"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Email)); + } + if ((ParName == null)) { + throw new global::System.ArgumentNullException("ParName"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ParName)); + } + if ((ParValue == null)) { + throw new global::System.ArgumentNullException("ParValue"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ParValue)); + } + if ((Original_Email == null)) { + throw new global::System.ArgumentNullException("Original_Email"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Email)); + } + if ((Original_ParName == null)) { + throw new global::System.ArgumentNullException("Original_ParName"); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_ParName)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string ParValue, string Original_Email, string Original_ParName) { + return this.Update(Original_Email, Original_ParName, ParValue, Original_Email, Original_ParName); + } + + [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, false)] + public virtual int upsert(string Email, string ParName, string ParValue) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((Email == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Email)); + } + if ((ParName == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(ParName)); + } + if ((ParValue == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(ParValue)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -14488,6 +15331,8 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; private AnagTagsTableAdapter _anagTagsTableAdapter; + private UserParamTableAdapter _userParamTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -14601,6 +15446,20 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; } } + [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 UserParamTableAdapter UserParamTableAdapter { + get { + return this._userParamTableAdapter; + } + set { + this._userParamTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -14648,6 +15507,10 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; && (this._anagTagsTableAdapter.Connection != null))) { return this._anagTagsTableAdapter.Connection; } + if (((this._userParamTableAdapter != null) + && (this._userParamTableAdapter.Connection != null))) { + return this._userParamTableAdapter.Connection; + } return null; } set { @@ -14682,6 +15545,9 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; if ((this._anagTagsTableAdapter != null)) { count = (count + 1); } + if ((this._userParamTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -14756,6 +15622,15 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; allChangedRows.AddRange(updatedRows); } } + if ((this._userParamTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.UserParam.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._userParamTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -14822,6 +15697,14 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; allAddedRows.AddRange(addedRows); } } + if ((this._userParamTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.UserParam.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._userParamTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -14832,6 +15715,14 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; [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._userParamTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.UserParam.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._userParamTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._tags2MacchineTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Tags2Macchine.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -14962,6 +15853,11 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._userParamTableAdapter != null) + && (this.MatchTableAdapterConnection(this._userParamTableAdapter.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" + @@ -15057,6 +15953,15 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; adaptersWithAcceptChangesDuringUpdate.Add(this._anagTagsTableAdapter.Adapter); } } + if ((this._userParamTableAdapter != null)) { + revertConnections.Add(this._userParamTableAdapter, this._userParamTableAdapter.Connection); + this._userParamTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._userParamTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._userParamTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._userParamTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._userParamTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -15143,6 +16048,10 @@ SELECT TagCode, DescrTag FROM AnagTags WHERE (TagCode = @TagCode)"; this._anagTagsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagTagsTableAdapter])); this._anagTagsTableAdapter.Transaction = null; } + if ((this._userParamTableAdapter != null)) { + this._userParamTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._userParamTableAdapter])); + this._userParamTableAdapter.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/DtProxy.cs b/CMS-SC-Data/DtProxy.cs index de8c8b0..3b50739 100644 --- a/CMS-SC-Data/DtProxy.cs +++ b/CMS-SC-Data/DtProxy.cs @@ -35,6 +35,7 @@ namespace CMS_SC_Data taSCFM = new DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter(); taSCM = new DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter(); taT2M = new DS_ApplicazioneTableAdapters.Tags2MacchineTableAdapter(); + taUsrPar = new DS_ApplicazioneTableAdapters.UserParamTableAdapter(); taVV = new DS_ApplicazioneTableAdapters.ValidValTableAdapter(); taFiles = new DS_UtilityTableAdapters.tblFilesTableAdapter(); taListVal = new DS_UtilityTableAdapters.ListValuesTableAdapter(); @@ -61,6 +62,7 @@ namespace CMS_SC_Data taSCFM.Connection.ConnectionString = connStr; taSCM.Connection.ConnectionString = connStr; taT2M.Connection.ConnectionString = connStr; + taUsrPar.Connection.ConnectionString = connStr; taVV.Connection.ConnectionString = connStr; taFiles.Connection.ConnectionString = connStr; taListVal.Connection.ConnectionString = connStr; @@ -84,6 +86,7 @@ namespace CMS_SC_Data public DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter taSCFM; public DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter taSCM; public DS_ApplicazioneTableAdapters.Tags2MacchineTableAdapter taT2M; + public DS_ApplicazioneTableAdapters.UserParamTableAdapter taUsrPar; public DS_ApplicazioneTableAdapters.ValidValTableAdapter taVV; public DS_UtilityTableAdapters.tblFilesTableAdapter taFiles; public DS_UtilityTableAdapters.ListValuesTableAdapter taListVal; diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll index 1b2058f..bf56cea 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 20b9af1..2a856d8 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 1b2058f..bf56cea 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/App_Readme/UpdateSql_v_2.0.sql b/CMS_SC/App_Readme/UpdateSql_v_2.0.sql new file mode 100644 index 0000000..d54d97a --- /dev/null +++ b/CMS_SC/App_Readme/UpdateSql_v_2.0.sql @@ -0,0 +1,148 @@ +------------------------------------------------------------------------------------------------------ +-- Utenti +------------------------------------------------------------------------------------------------------ +carlo.viviani@gmail.com Viviani Carlo carlo.viviani@gmail.com BM5U64BBGG4ULA08NL6X 1001 True IT False +ceo@steamware.net CEO USER ceo@steamware.net BM5U64BBGG4ULA08NL6X 1001 True IT False +giancarlo@steamware.net Rottoli Giancarlo giancarlo@steamware.net BM5U64BBGG4ULA08NL6X 1001 True IT False +johnny.colleoni@cms.it Colleoni Johnny johnny.colleoni@cms.it 3QZA06RKIH5A0WT7SPYD 1001 True IT False +marco.labaria@cms.it Labaria Marco marco.labaria@cms.it B2A3IZXOES1S503C4H7L 1001 True IT False +mario.volpi@cms.it Volpi Mario mario.volpi@cms.it 1RZGII6IW2NJJF95KGN7 1001 True IT False +michele.zanchi@cms.it Zanchi Michele michele.zanchi@cms.it ES34RWTC5NZ0LYUVRKUL 1001 True IT False +piercarlo.moreschi@cms.it Moreschi Piercarlo piercarlo.moreschi@cms.it 9M7A7RRUC85EUFXYAJVP 1001 True IT False +samuele@steamware.net Locatelli Samuele samuele@steamware.net BM5U64BBGG4ULA08NL6X 1001 True IT False +santo.benintendi@cms.it Benintendi Santo santo.benintendi@cms.it 91OLLIZGKBUUPZL16ZRQ 1001 True IT False +simone.baroni@cms.it Baroni Simone simone.baroni@cms.it HLNOX02RAELTZKIGEZQE 1001 True IT False +valerio.benintendi@cms.it Benintendi Valerio valerio.benintendi@cms.it M0DIMN8SLHQ5AP3X48BT 1001 True IT False +vittorio.paninforni@cms.it Paninforni Vittorio vittorio.paninforni@cms.it 57SF2P1GF7O2E7SQW0C7 1001 True IT False + + +------------------------------------------------------------------------------------------------------ +-- Diritti +------------------------------------------------------------------------------------------------------ +carlo.viviani@gmail.com X999 CMS_SC CapoGruppo +carlo.viviani@gmail.com X999 CMS_SC CapoOfficina +carlo.viviani@gmail.com X999 CMS_SC SuperAdmin +carlo.viviani@gmail.com X999 CMS_SC User +ceo@steamware.net X999 CMS_SC User +giancarlo@steamware.net X999 CMS_SC CapoGruppo +giancarlo@steamware.net X999 CMS_SC CapoOfficina +giancarlo@steamware.net X999 CMS_SC SuperAdmin +giancarlo@steamware.net X999 CMS_SC User +johnny.colleoni@cms.it X999 CMS_SC User +marco.labaria@cms.it X999 CMS_SC User +mario.volpi@cms.it X999 CMS_SC CapoGruppo +mario.volpi@cms.it X999 CMS_SC CapoOfficina +mario.volpi@cms.it X999 CMS_SC CqSetSC +mario.volpi@cms.it X999 CMS_SC User +michele.zanchi@cms.it X999 CMS_SC User +piercarlo.moreschi@cms.it X999 CMS_SC User +samuele@steamware.net X999 CMS_SC CapoGruppo +samuele@steamware.net X999 CMS_SC CapoOfficina +samuele@steamware.net X999 CMS_SC CqSetSC +samuele@steamware.net X999 CMS_SC SuperAdmin +samuele@steamware.net X999 CMS_SC User +santo.benintendi@cms.it X999 CMS_SC User +simone.baroni@cms.it X999 CMS_SC User +valerio.benintendi@cms.it X999 CMS_SC CapoGruppo +valerio.benintendi@cms.it X999 CMS_SC CqSetSC +valerio.benintendi@cms.it X999 CMS_SC User +vittorio.paninforni@cms.it X999 CMS_SC User + +------------------------------------------------------------------------------------------------------ +-- Vocabolario +------------------------------------------------------------------------------------------------------ +exec voc.stp_insNewLemma 'AuthUserBaseCollaudi','Accesso Utenti Collaudo' +exec voc.stp_insNewLemma 'AuthUserBaseTitle','Istruzioni' +exec voc.stp_insNewLemma 'AuthUserBaseInstr01','Inserendo Cognome e Nome gli utenti collaudatori registrati possono accedere alla funzionalità di inserimento dati di Collaudo' +exec voc.stp_insNewLemma 'btnAuthUserBase','Effettua Login' +exec voc.stp_insNewLemma 'ErrorEAK04','[ErrorEAK04] Attenzione: profilo utente non corretto per accesso Collaudatore' +exec voc.stp_insNewLemma 'ErrorEAK05','[ErrorEAK05] Attenzione: email non trovata, prego contattare amministratore!' +exec voc.stp_insNewLemma 'UserData','Dati Utente' +exec voc.stp_insNewLemma 'UserRights','Permessi Utente' +exec voc.stp_insNewLemma 'DevicesList','Elenco Devices Autorizzati' +exec voc.stp_insNewLemma 'UserAuthOk','User' +exec voc.stp_insNewLemma 'Logout','Logout' + + + + +------------------------------------------------------------------------------------------------------ +-- UserParam +------------------------------------------------------------------------------------------------------ +/****** Object: Table [dbo].[UserParam] Script Date: 29/10/2015 17:24:29 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +CREATE TABLE [dbo].[UserParam]( + [Email] [nvarchar](250) NOT NULL, + [ParName] [nvarchar](50) NOT NULL, + [ParValue] [nvarchar](max) NOT NULL, + CONSTRAINT [PK_UserParam] PRIMARY KEY CLUSTERED +( + [Email] ASC, + [ParName] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[UserParam] ADD CONSTRAINT [DF_Table_1_email] DEFAULT ('@') FOR [Email] +GO + +ALTER TABLE [dbo].[UserParam] ADD CONSTRAINT [DF_UserParam_ParValue] DEFAULT ('') FOR [ParValue] +GO + + +------------------------------------------------------------------------------------------------------ +-- stored! +------------------------------------------------------------------------------------------------------ +-- ============================================= +-- Author: S.E. Locatelli +-- Create date: 2015.10.29 +-- Description: recupera parametro utente da key +-- ============================================= +CREATE PROCEDURE [dbo].stp_UsrPar_getByKey +( + @email nvarchar(250), + @ParName nvarchar(50) +) +AS + SET NOCOUNT ON; +SELECT Email, ParName, ParValue +FROM dbo.UserParam +WHERE Email = @email + AND ParName = @ParName + +-- ============================================= +-- Author: S.E. Locatelli +-- Create date: 2015.10.29 +-- Description: upsert record parametro x utente +-- ============================================= +CREATE PROCEDURE [dbo].[stp_UsrPar_upsert] +( + @Email NVARCHAR(250), + @ParName NVARCHAR(50), + @ParValue NVARCHAR(MAX) +) +AS + +BEGIN tran + SET NOCOUNT OFF; + + -- SE NON HO un record lo inserisco altrimenti update... + MERGE UserParam AS target + USING (SELECT @Email, @ParName, @ParValue) AS source (Email, ParName, ParValue) + ON (target.Email = source.Email AND target.ParName = source.ParName) + WHEN MATCHED THEN + UPDATE SET ParValue = source.ParValue + WHEN NOT MATCHED THEN + INSERT (Email, ParName, ParValue) + VALUES (source.Email, source.ParName, source.ParValue); + + -- Rileggo.. + SELECT Email, ParName, ParValue FROM UserParam WHERE (Email = @Email) AND (ParName = @ParName) + +COMMIT tran \ No newline at end of file diff --git a/CMS_SC/CMS_SC.csproj b/CMS_SC/CMS_SC.csproj index 24b81b0..e431baf 100644 --- a/CMS_SC/CMS_SC.csproj +++ b/CMS_SC/CMS_SC.csproj @@ -163,6 +163,7 @@ + @@ -283,6 +284,7 @@ + @@ -561,6 +563,13 @@ ListValues.aspx + + Logout.aspx + ASPXCodeBehind + + + Logout.aspx + ReportCliente.aspx diff --git a/CMS_SC/Collaudi.aspx.cs b/CMS_SC/Collaudi.aspx.cs index dd50f6b..10c5853 100644 --- a/CMS_SC/Collaudi.aspx.cs +++ b/CMS_SC/Collaudi.aspx.cs @@ -19,10 +19,31 @@ namespace CMS_SC memLayer.ML.setSessionVal("showHist", false); // pannello principale mod_righePag.numRowPag = 10; + if (getPar("numRowPagColl_Main") != "") + { + try + { + + mod_righePag.numRowPag = Convert.ToInt32(getPar("numRowPagColl_Main")); + } + catch + { } + } mod_collaudi.pageSize = mod_righePag.numRowPag; // pannello secondario mod_righePagPrev.numRowPag = 20; + if (getPar("numRowPagColl_Sec") != "") + { + try + { + + mod_righePagPrev.numRowPag = Convert.ToInt32(getPar("numRowPagColl_Sec")); + } + catch + { } + } mod_collaudiPrev.pageSize = mod_righePagPrev.numRowPag; + tryGetParam(); // collego ed aggiorno resto... ddlFase.DataBind(); ddlDossier.DataBind(); @@ -33,12 +54,76 @@ namespace CMS_SC mod_righePag.eh_newNum += mod_righePag_eh_newNum; mod_righePagPrev.eh_newNum += mod_righePagPrev_eh_newNum; } + /// + /// cerca di recuperare i 3 parametri selezionati dall'utente (SE ci sono su DB) + /// + private void tryGetParam() + { + // rileggo SE CI SONO i parametri filtrati... + if (getPar("ddlFase") != "") + { + try + { + ddlFase.SelectedValue = getPar("ddlFase"); + } + catch + { } + } + // rileggo SE CI SONO i parametri filtrati... + if (getPar("ddlDossier") != "") + { + try + { + ddlDossier.SelectedValue = getPar("ddlDossier"); + } + catch + { } + } + // rileggo SE CI SONO i parametri filtrati... + if (getPar("ddlSelScheda") != "") + { + try + { + ddlSelScheda.SelectedValue = getPar("ddlSelScheda"); + } + catch + { } + } + } + + /// + /// recupera (se c'è) da db il parametro selezionato dall'utente + /// + /// + /// + protected string getPar(string paramName) + { + string answ = ""; + try + { + answ = DtProxy.man.taUsrPar.getByKey(OpAuth.currAuth.email, paramName)[0].ParValue; + } + catch + { } + return answ; + } + /// + /// salva su DB il parametro scelto dall'utente + /// + /// + /// + protected void savePar(string paramName, string paramValue) + { + DtProxy.man.taUsrPar.upsert(OpAuth.currAuth.email, paramName, paramValue); + } void mod_righePag_eh_newNum(object sender, EventArgs e) { + savePar("numRowPagColl_Main", mod_righePag.numRowPag.ToString()); mod_collaudi.pageSize = mod_righePag.numRowPag; } void mod_righePagPrev_eh_newNum(object sender, EventArgs e) { + savePar("numRowPagColl_Sec", mod_righePagPrev.numRowPag.ToString()); mod_collaudiPrev.pageSize = mod_righePagPrev.numRowPag; } void mod_collaudi_eh_selezioneValore(object sender, EventArgs e) @@ -190,6 +275,9 @@ namespace CMS_SC protected void ddlDossier_SelectedIndexChanged(object sender, EventArgs e) { + // salvo! + savePar("ddlDossier", ddlDossier.SelectedValue); + // fix visualizzazione ddlSelScheda.DataBind(); fixControls(); ddlSelSchedaPrev.DataBind(); @@ -197,10 +285,16 @@ namespace CMS_SC } protected void ddlSelScheda_SelectedIndexChanged(object sender, EventArgs e) { + // salvo! + savePar("ddlSelScheda", ddlSelScheda.SelectedValue); + // fix visualizzazione fixControls(); } protected void ddlFase_SelectedIndexChanged(object sender, EventArgs e) { + // salvo! + savePar("ddlFase", ddlFase.SelectedValue); + // fix visualizzazione ddlDossier.DataBind(); ddlSelScheda.DataBind(); fixControls(); diff --git a/CMS_SC/Default.aspx.cs b/CMS_SC/Default.aspx.cs index 023c861..0f77ccb 100644 --- a/CMS_SC/Default.aspx.cs +++ b/CMS_SC/Default.aspx.cs @@ -1,4 +1,5 @@ using SteamWare; +using CMS_SC_Data; using System; using System.Collections.Generic; using System.Linq; @@ -14,6 +15,7 @@ namespace CMS_SC { // resetto i dati utente all'accesso alla pagina default... devicesAuthProxy.stObj.clearAllUserData(); + OpAuth.stopAuth(); Response.Redirect("Home"); } } diff --git a/CMS_SC/Home.aspx b/CMS_SC/Home.aspx index 96ad001..6ccee9b 100644 --- a/CMS_SC/Home.aspx +++ b/CMS_SC/Home.aspx @@ -23,19 +23,19 @@
- + <%: traduci("AnagSchedeColl") %> - + <%: traduci("ElencoSchede") %> <%: traduci("Collaudi") %> - <%-- - <%: traduci("Report") %> + + <%: traduci("Logout") %> - + <%-- <%: traduci("StdCostList") %> --%>
diff --git a/CMS_SC/Home.aspx.cs b/CMS_SC/Home.aspx.cs index fd4f48e..fa3ac2b 100644 --- a/CMS_SC/Home.aspx.cs +++ b/CMS_SC/Home.aspx.cs @@ -16,6 +16,7 @@ namespace CMS_SC { hlAnagSchedeColl.DataBind(); hlElencoSchede.DataBind(); + hlLogout.DataBind(); } } /// @@ -60,15 +61,24 @@ namespace CMS_SC /// /// verifica visibilità in base al menù... /// + /// /// - public string checkShow() + public string checkShow(object _doShow) { - string answ = "hidden "; + bool doShow = false; + try + { + doShow = Convert.ToBoolean(_doShow); + } + catch + { } // verifico: se è userIsSuperAdmin vede tutto if (userIsSuperAdmin || userIsCapoOfficina || userIsCapoGruppo || userIsAnagAdmin) { - answ = ""; + doShow = !doShow; } + string answ = ""; + if (doShow) answ = "hidden "; return answ; } } diff --git a/CMS_SC/Home.aspx.designer.cs b/CMS_SC/Home.aspx.designer.cs index 3a7d568..fcc2274 100644 --- a/CMS_SC/Home.aspx.designer.cs +++ b/CMS_SC/Home.aspx.designer.cs @@ -38,5 +38,14 @@ namespace CMS_SC { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HyperLink hlCollaudi; + + /// + /// hlLogout control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink hlLogout; } } diff --git a/CMS_SC/Logout.aspx b/CMS_SC/Logout.aspx new file mode 100644 index 0000000..78f3862 --- /dev/null +++ b/CMS_SC/Logout.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Logout.aspx.cs" Inherits="CMS_SC.Logout" %> + + + + + + + + +
+
+ +
+
+ + diff --git a/CMS_SC/Logout.aspx.cs b/CMS_SC/Logout.aspx.cs new file mode 100644 index 0000000..7bb7f80 --- /dev/null +++ b/CMS_SC/Logout.aspx.cs @@ -0,0 +1,25 @@ +using CMS_SC_Data; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace CMS_SC +{ + public partial class Logout : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + // cancello cookie! + memLayer.ML.emptyCookieVal(devicesAuthProxy.AuthCookieName); + // resetto sessione + devicesAuthProxy.stObj.clearAllUserData(); + OpAuth.stopAuth(); + // reload default! + Response.Redirect("Default"); + } + } +} \ No newline at end of file diff --git a/CMS_SC/Logout.aspx.designer.cs b/CMS_SC/Logout.aspx.designer.cs new file mode 100644 index 0000000..16a30a6 --- /dev/null +++ b/CMS_SC/Logout.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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 +{ + + + public partial class Logout + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs b/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs index 85e3bbd..9b34747 100644 --- a/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs +++ b/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs @@ -27,7 +27,7 @@ namespace CMS_SC.WebUserControls { // salvo i dati MINIMI per auth utente (in sessione) SENZA cookie... setupUserBase(); - Response.Redirect("Collaudi"); + Response.Redirect("Default"); } else { diff --git a/CMS_SC/WebUserControls/mod_testata.ascx b/CMS_SC/WebUserControls/mod_testata.ascx index b7698c3..f3fb0ef 100644 --- a/CMS_SC/WebUserControls/mod_testata.ascx +++ b/CMS_SC/WebUserControls/mod_testata.ascx @@ -26,7 +26,7 @@