diff --git a/GMW/WebUserControls/mod_PostRX_DT.ascx.cs b/GMW/WebUserControls/mod_PostRX_DT.ascx.cs index a106959b..cd2bedab 100644 --- a/GMW/WebUserControls/mod_PostRX_DT.ascx.cs +++ b/GMW/WebUserControls/mod_PostRX_DT.ascx.cs @@ -253,14 +253,18 @@ namespace GMW.WebUserControls // genera eventuale UDC del particolare su cella/posizione corrente qta = 1; // tanto poi si ricalcola... checkCreaUDC(); - // ora chiamo la stored che fa il check x tutti i particolari nell'intervallo dei Dtx associati alla cella e (se almeno 2) nel caso crea UDC - checkIntervalloDtx(); + // verifico se devo fare gestione con intervallo dtx... da tab config DB) + if (utils.obj.configDbVal("CreaDtxByInt") == "1") + { + // ora chiamo la stored che fa il check x tutti i particolari nell'intervallo dei Dtx associati alla cella e (se almeno 2) nel caso crea UDC + checkIntervalloDtx(); + } /*----------------------------------------------- - * chiamo la stored che in blocco - * - associa Dtx a UDC - * - fa controllo, se ho almeno 2 Dtx ok associo tutti i Dtx compresi nell'intervallo min-MAX - *----------------------------------------------- - */ + * chiamo la stored che in blocco + * - associa Dtx a UDC + * - fa controllo, se ho almeno 2 Dtx ok associo tutti i Dtx compresi nell'intervallo min-MAX + *----------------------------------------------- + */ DataMatrix.mgr.taDtx2UDC.RxSetDtx2Udc(barcodeIn, MagClass.magazzino.CodSoggCurrUser, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), Postazione.currIdxCella); } } @@ -290,7 +294,7 @@ namespace GMW.WebUserControls { Postazione.messaggiText = traduci("AttesaBCode"); Postazione.CssClass = "stileAttesa"; - } + } doUpdate(); } /// @@ -344,9 +348,9 @@ namespace GMW.WebUserControls int answ = 0; try { - answ = Convert.ToInt32(float.Parse(MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(Convert.ToInt32(lblIdxCella.Text)).Compute("Sum(Qta)","").ToString())); + answ = Convert.ToInt32(float.Parse(MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(Convert.ToInt32(lblIdxCella.Text)).Compute("Sum(Qta)", "").ToString())); } - catch(Exception exc) + catch (Exception exc) { if (memLayer.ML.confReadInt("_logLevel") > 5) logger.lg.scriviLog(exc.ToString(), tipoLog.EXCEPTION); answ = 0; diff --git a/GMW/WebUserControls/mod_anagMagazzini.ascx b/GMW/WebUserControls/mod_anagMagazzini.ascx index d3553e2f..27db4c26 100644 --- a/GMW/WebUserControls/mod_anagMagazzini.ascx +++ b/GMW/WebUserControls/mod_anagMagazzini.ascx @@ -19,8 +19,6 @@ <%: traduci("Reset") %> - <%----%> - <%-- - --%> - + @@ -683,7 +683,7 @@ SELECT DataMatrix, CodStato, UDC, DataOra, CodSoggetto, Particolare FROM Dtx2UDC - + @@ -697,7 +697,7 @@ SELECT DataMatrix, CodStato, UDC, DataOra, CodSoggetto, Particolare FROM Dtx2UDC - + @@ -732,7 +732,7 @@ SELECT DataMatrix, CodStato, UDC, DataOra, CodSoggetto, Particolare FROM Dtx2UDC - + @@ -752,7 +752,7 @@ SELECT DataMatrix, CodStato, UDC, DataOra, CodSoggetto, Particolare FROM Dtx2UDC - + @@ -772,7 +772,7 @@ SELECT DataMatrix, CodStato, UDC, DataOra, CodSoggetto, Particolare FROM Dtx2UDC - + @@ -814,7 +814,7 @@ SELECT DataMatrix, CodStato, UDC, DataOra, CodSoggetto, Particolare FROM Dtx2UDC - + diff --git a/GMW_data/DS_DataMatrix.xss b/GMW_data/DS_DataMatrix.xss index e6119636..3fb69e6b 100644 --- a/GMW_data/DS_DataMatrix.xss +++ b/GMW_data/DS_DataMatrix.xss @@ -14,8 +14,8 @@ - - + + \ No newline at end of file diff --git a/GMW_data/DS_Utility.Designer.cs b/GMW_data/DS_Utility.Designer.cs index 66cf7564..5b08a898 100644 --- a/GMW_data/DS_Utility.Designer.cs +++ b/GMW_data/DS_Utility.Designer.cs @@ -70,6 +70,8 @@ namespace GMW_data { private v_selLineeDataTable tablev_selLinee; + private ConfigDataTable tableConfig; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -167,6 +169,9 @@ namespace GMW_data { if ((ds.Tables["v_selLinee"] != null)) { base.Tables.Add(new v_selLineeDataTable(ds.Tables["v_selLinee"])); } + if ((ds.Tables["Config"] != null)) { + base.Tables.Add(new ConfigDataTable(ds.Tables["Config"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -415,6 +420,16 @@ namespace GMW_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 ConfigDataTable Config { + get { + return this.tableConfig; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -551,6 +566,9 @@ namespace GMW_data { if ((ds.Tables["v_selLinee"] != null)) { base.Tables.Add(new v_selLineeDataTable(ds.Tables["v_selLinee"])); } + if ((ds.Tables["Config"] != null)) { + base.Tables.Add(new ConfigDataTable(ds.Tables["Config"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -722,6 +740,12 @@ namespace GMW_data { this.tablev_selLinee.InitVars(); } } + this.tableConfig = ((ConfigDataTable)(base.Tables["Config"])); + if ((initTable == true)) { + if ((this.tableConfig != null)) { + this.tableConfig.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -778,6 +802,8 @@ namespace GMW_data { base.Tables.Add(this.tablev_selTipoPart); this.tablev_selLinee = new v_selLineeDataTable(); base.Tables.Add(this.tablev_selLinee); + this.tableConfig = new ConfigDataTable(); + base.Tables.Add(this.tableConfig); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -918,6 +944,12 @@ namespace GMW_data { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeConfig() { + 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) { @@ -1042,6 +1074,9 @@ namespace GMW_data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void v_selLineeRowChangeEventHandler(object sender, v_selLineeRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void ConfigRowChangeEventHandler(object sender, ConfigRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -7663,6 +7698,295 @@ namespace GMW_data { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ConfigDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnchiave; + + private global::System.Data.DataColumn columnvalore; + + private global::System.Data.DataColumn columnnote; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ConfigDataTable() { + this.TableName = "Config"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ConfigDataTable(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 ConfigDataTable(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 chiaveColumn { + get { + return this.columnchiave; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn valoreColumn { + get { + return this.columnvalore; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn noteColumn { + get { + return this.columnnote; + } + } + + [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 ConfigRow this[int index] { + get { + return ((ConfigRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ConfigRowChangeEventHandler ConfigRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ConfigRowChangeEventHandler ConfigRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ConfigRowChangeEventHandler ConfigRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ConfigRowChangeEventHandler ConfigRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddConfigRow(ConfigRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ConfigRow AddConfigRow(string chiave, string valore, string note) { + ConfigRow rowConfigRow = ((ConfigRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + chiave, + valore, + note}; + rowConfigRow.ItemArray = columnValuesArray; + this.Rows.Add(rowConfigRow); + return rowConfigRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ConfigRow FindBychiave(string chiave) { + return ((ConfigRow)(this.Rows.Find(new object[] { + chiave}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + ConfigDataTable cln = ((ConfigDataTable)(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 ConfigDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnchiave = base.Columns["chiave"]; + this.columnvalore = base.Columns["valore"]; + this.columnnote = base.Columns["note"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnchiave = new global::System.Data.DataColumn("chiave", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnchiave); + this.columnvalore = new global::System.Data.DataColumn("valore", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnvalore); + this.columnnote = new global::System.Data.DataColumn("note", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnnote); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnchiave}, true)); + this.columnchiave.AllowDBNull = false; + this.columnchiave.Unique = true; + this.columnchiave.MaxLength = 50; + this.columnvalore.MaxLength = 250; + this.columnnote.MaxLength = 250; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ConfigRow NewConfigRow() { + return ((ConfigRow)(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 ConfigRow(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(ConfigRow); + } + + [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.ConfigRowChanged != null)) { + this.ConfigRowChanged(this, new ConfigRowChangeEvent(((ConfigRow)(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.ConfigRowChanging != null)) { + this.ConfigRowChanging(this, new ConfigRowChangeEvent(((ConfigRow)(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.ConfigRowDeleted != null)) { + this.ConfigRowDeleted(this, new ConfigRowChangeEvent(((ConfigRow)(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.ConfigRowDeleting != null)) { + this.ConfigRowDeleting(this, new ConfigRowChangeEvent(((ConfigRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveConfigRow(ConfigRow 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 = "ConfigDataTable"; + 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. /// @@ -9452,6 +9776,88 @@ namespace GMW_data { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class ConfigRow : global::System.Data.DataRow { + + private ConfigDataTable tableConfig; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ConfigRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableConfig = ((ConfigDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string chiave { + get { + return ((string)(this[this.tableConfig.chiaveColumn])); + } + set { + this[this.tableConfig.chiaveColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string valore { + get { + try { + return ((string)(this[this.tableConfig.valoreColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'valore\' in table \'Config\' is DBNull.", e); + } + } + set { + this[this.tableConfig.valoreColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string note { + get { + try { + return ((string)(this[this.tableConfig.noteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'note\' in table \'Config\' is DBNull.", e); + } + } + set { + this[this.tableConfig.noteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsvaloreNull() { + return this.IsNull(this.tableConfig.valoreColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetvaloreNull() { + this[this.tableConfig.valoreColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsnoteNull() { + return this.IsNull(this.tableConfig.noteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetnoteNull() { + this[this.tableConfig.noteColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -10233,6 +10639,40 @@ namespace GMW_data { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class ConfigRowChangeEvent : global::System.EventArgs { + + private ConfigRow 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 ConfigRowChangeEvent(ConfigRow 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 ConfigRow 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 GMW_data.DS_UtilityTableAdapters { @@ -15416,6 +15856,410 @@ namespace GMW_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 ConfigTableAdapter : 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 ConfigTableAdapter() { + 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")] + public 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 = "Config"; + tableMapping.ColumnMappings.Add("chiave", "chiave"); + tableMapping.ColumnMappings.Add("valore", "valore"); + tableMapping.ColumnMappings.Add("note", "note"); + 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 [Config] WHERE (([chiave] = @Original_chiave) AND ((@IsNull_valore = " + + "1 AND [valore] IS NULL) OR ([valore] = @Original_valore)) AND ((@IsNull_note = 1" + + " AND [note] IS NULL) OR ([note] = @Original_note)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_chiave", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "chiave", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_valore", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_note", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "note", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "note", 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 [Config] ([chiave], [valore], [note]) VALUES (@chiave, @valore, @note" + + ");\r\nSELECT chiave, valore, note FROM Config WHERE (chiave = @chiave)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@chiave", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "chiave", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "note", 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 [Config] SET [chiave] = @chiave, [valore] = @valore, [note] = @note WHERE (([chiave] = @Original_chiave) AND ((@IsNull_valore = 1 AND [valore] IS NULL) OR ([valore] = @Original_valore)) AND ((@IsNull_note = 1 AND [note] IS NULL) OR ([note] = @Original_note))); +SELECT chiave, valore, note FROM Config WHERE (chiave = @chiave)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@chiave", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "chiave", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "note", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_chiave", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "chiave", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_valore", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_note", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "note", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "note", 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::GMW_data.Properties.Settings.Default.GMWConnectionString; + } + + [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 chiave, valore, note\r\nFROM Config"; + 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_confByKey"; + 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("@chiave", 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.ConfigDataTable 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.ConfigDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Utility.ConfigDataTable dataTable = new DS_Utility.ConfigDataTable(); + 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.ConfigDataTable getByKey(string chiave) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((chiave == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(chiave)); + } + DS_Utility.ConfigDataTable dataTable = new DS_Utility.ConfigDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_Utility.ConfigDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_Utility dataSet) { + return this.Adapter.Update(dataSet, "Config"); + } + + [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_chiave, string Original_valore, string Original_note) { + if ((Original_chiave == null)) { + throw new global::System.ArgumentNullException("Original_chiave"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_chiave)); + } + if ((Original_valore == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_valore)); + } + if ((Original_note == null)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_note)); + } + 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 chiave, string valore, string note) { + if ((chiave == null)) { + throw new global::System.ArgumentNullException("chiave"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(chiave)); + } + if ((valore == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(valore)); + } + if ((note == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(note)); + } + 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 chiave, string valore, string note, string Original_chiave, string Original_valore, string Original_note) { + if ((chiave == null)) { + throw new global::System.ArgumentNullException("chiave"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(chiave)); + } + if ((valore == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(valore)); + } + if ((note == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(note)); + } + if ((Original_chiave == null)) { + throw new global::System.ArgumentNullException("Original_chiave"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_chiave)); + } + if ((Original_valore == null)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_valore)); + } + if ((Original_note == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_note)); + } + 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 valore, string note, string Original_chiave, string Original_valore, string Original_note) { + return this.Update(Original_chiave, valore, note, Original_chiave, Original_valore, Original_note); + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -15430,6 +16274,8 @@ namespace GMW_data.DS_UtilityTableAdapters { private AS400_ComandiTableAdapter _aS400_ComandiTableAdapter; + private ConfigTableAdapter _configTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -15459,6 +16305,20 @@ namespace GMW_data.DS_UtilityTableAdapters { } } + [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 ConfigTableAdapter ConfigTableAdapter { + get { + return this._configTableAdapter; + } + set { + this._configTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -15482,6 +16342,10 @@ namespace GMW_data.DS_UtilityTableAdapters { && (this._aS400_ComandiTableAdapter.Connection != null))) { return this._aS400_ComandiTableAdapter.Connection; } + if (((this._configTableAdapter != null) + && (this._configTableAdapter.Connection != null))) { + return this._configTableAdapter.Connection; + } return null; } set { @@ -15498,6 +16362,9 @@ namespace GMW_data.DS_UtilityTableAdapters { if ((this._aS400_ComandiTableAdapter != null)) { count = (count + 1); } + if ((this._configTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -15518,6 +16385,15 @@ namespace GMW_data.DS_UtilityTableAdapters { allChangedRows.AddRange(updatedRows); } } + if ((this._configTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Config.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._configTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -15536,6 +16412,14 @@ namespace GMW_data.DS_UtilityTableAdapters { allAddedRows.AddRange(addedRows); } } + if ((this._configTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Config.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._configTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -15546,6 +16430,14 @@ namespace GMW_data.DS_UtilityTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private int UpdateDeletedRows(DS_Utility dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._configTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Config.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._configTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._aS400_ComandiTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AS400_Comandi.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -15598,6 +16490,11 @@ namespace GMW_data.DS_UtilityTableAdapters { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._configTableAdapter != null) + && (this.MatchTableAdapterConnection(this._configTableAdapter.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" + @@ -15639,6 +16536,15 @@ namespace GMW_data.DS_UtilityTableAdapters { adaptersWithAcceptChangesDuringUpdate.Add(this._aS400_ComandiTableAdapter.Adapter); } } + if ((this._configTableAdapter != null)) { + revertConnections.Add(this._configTableAdapter, this._configTableAdapter.Connection); + this._configTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._configTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._configTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._configTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._configTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -15701,6 +16607,10 @@ namespace GMW_data.DS_UtilityTableAdapters { this._aS400_ComandiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._aS400_ComandiTableAdapter])); this._aS400_ComandiTableAdapter.Transaction = null; } + if ((this._configTableAdapter != null)) { + this._configTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._configTableAdapter])); + this._configTableAdapter.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/GMW_data/DS_Utility.xsd b/GMW_data/DS_Utility.xsd index 01de4bb1..ea80be22 100644 --- a/GMW_data/DS_Utility.xsd +++ b/GMW_data/DS_Utility.xsd @@ -852,6 +852,76 @@ FROM dbo.v_selTipoPart + + + + + + DELETE FROM [Config] WHERE (([chiave] = @Original_chiave) AND ((@IsNull_valore = 1 AND [valore] IS NULL) OR ([valore] = @Original_valore)) AND ((@IsNull_note = 1 AND [note] IS NULL) OR ([note] = @Original_note))) + + + + + + + + + + + + INSERT INTO [Config] ([chiave], [valore], [note]) VALUES (@chiave, @valore, @note); +SELECT chiave, valore, note FROM Config WHERE (chiave = @chiave) + + + + + + + + + + SELECT chiave, valore, note +FROM Config + + + + + + UPDATE [Config] SET [chiave] = @chiave, [valore] = @valore, [note] = @note WHERE (([chiave] = @Original_chiave) AND ((@IsNull_valore = 1 AND [valore] IS NULL) OR ([valore] = @Original_valore)) AND ((@IsNull_note = 1 AND [note] IS NULL) OR ([note] = @Original_note))); +SELECT chiave, valore, note FROM Config WHERE (chiave = @chiave) + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_confByKey + + + + + + + + + @@ -1423,6 +1493,33 @@ FROM dbo.v_selTipoPart + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1496,5 +1593,9 @@ FROM dbo.v_selTipoPart + + + + \ No newline at end of file diff --git a/GMW_data/DS_Utility.xss b/GMW_data/DS_Utility.xss index 5f0b2cc0..aaf87aee 100644 --- a/GMW_data/DS_Utility.xss +++ b/GMW_data/DS_Utility.xss @@ -4,31 +4,32 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GMW_data/utils.cs b/GMW_data/utils.cs index e1334833..8d040162 100644 --- a/GMW_data/utils.cs +++ b/GMW_data/utils.cs @@ -7,6 +7,9 @@ using SteamWare; namespace GMW_data { + /// + /// classe gestione utility + /// public class utils { #region area table adapters @@ -20,6 +23,7 @@ namespace GMW_data public DS_UtilityTableAdapters.v_selTipoListaTableAdapter taSelTipoLista; public DS_UtilityTableAdapters.v_selOperatoriTableAdapter taSelOperatori; public DS_UtilityTableAdapters.v_selParticolariTableAdapter taSelParticolari; + public DS_UtilityTableAdapters.ConfigTableAdapter taConfig; /// /// init dei table adapters @@ -35,6 +39,7 @@ namespace GMW_data taSelTipoLista = new GMW_data.DS_UtilityTableAdapters.v_selTipoListaTableAdapter(); taSelOperatori = new DS_UtilityTableAdapters.v_selOperatoriTableAdapter(); taSelParticolari = new DS_UtilityTableAdapters.v_selParticolariTableAdapter(); + taConfig = new DS_UtilityTableAdapters.ConfigTableAdapter(); } /// /// effettua setup dei connection strings da web.config delal singola applicazione @@ -52,6 +57,7 @@ namespace GMW_data taSelTipoLista.Connection.ConnectionString = connString; taSelOperatori.Connection.ConnectionString = connString; taSelParticolari.Connection.ConnectionString = connString; + taConfig.Connection.ConnectionString = connString; } #endregion @@ -72,6 +78,30 @@ namespace GMW_data #endregion + #region area gestione config su DB + + + /// + /// Configurations da tabella DB COnfig + /// + /// Valore chiave + /// + public string configDbVal(string chiave) + { + string answ = ""; + try + { + answ = taConfig.getByKey(chiave)[0].valore; + } + catch + { + answ = ""; + } + return answ; + } + + #endregion + #region area operatori /// diff --git a/VersGen/GMW.cs b/VersGen/GMW.cs index 56809706..d45c156c 100644 --- a/VersGen/GMW.cs +++ b/VersGen/GMW.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("2.5.634.1541")] -[assembly: AssemblyFileVersion("2.5.634.1541")] +[assembly: AssemblyVersion("2.5.635.1544")] +[assembly: AssemblyFileVersion("2.5.635.1544")] //[assembly: AssemblyCopyright("© Steamware 2007-2014")] //[assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/GMW.tt b/VersGen/GMW.tt index 898322a7..41906030 100644 --- a/VersGen/GMW.tt +++ b/VersGen/GMW.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("2.5.634.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("2.5.634.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("2.5.635.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("2.5.635.<#= this.RevisionNumber #>")] //[assembly: AssemblyCopyright("© Steamware 2007-<#= DateTime.Now.Year #>")] //[assembly: AssemblyCompany("Steamware")] <#+