diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx b/MP-Tablet/WebUserControls/mod_confProd.ascx index 4e86036c..bf5745eb 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx @@ -21,16 +21,18 @@
-
- Dati dall'avvio produzione/ODL +
+
+ Dati Globali ODL
+
(Inizio ODL --> <%: dtReqUpdate.ToString() %>)
Pz Prodotti TOT [A+B+C]
- 1707 + <%: datiProdAct.PzTotODL %>
@@ -40,7 +42,7 @@ [B] Scarti GIA' scaricati
- 15 + <%: datiProdAct.PzConfScarto %>
@@ -50,15 +52,17 @@ [C] Pz Buoni VERSATI
- 1510 + <%: datiProdAct.PzConfBuoni %>
-
- Incrementali (da ultima conferma) +
+
+ Dati Incrementali
+
(ultima conferma --> <%: dtReqUpdate.ToString() %>)
diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx.cs b/MP-Tablet/WebUserControls/mod_confProd.ascx.cs index f91ff566..550281c1 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx.cs +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx.cs @@ -20,6 +20,26 @@ namespace MoonProTablet.WebUserControls /// public event EventHandler eh_reset; /// + /// Data-Ora ultimo update valori produzione + /// + public DateTime dtReqUpdate + { + get + { + DateTime answ = DateTime.Now; + DateTime.TryParse(memLayer.ML.StringSessionObj("dtReqUpdate"), out answ); + return answ; + } + set + { + memLayer.ML.setSessionVal("dtReqUpdate", value); + } + } + /// + /// Dati produzioen rilevati + /// + public DS_ProdTempi.StatoProdRow datiProdAct; + /// /// caricamento pagina /// /// @@ -29,8 +49,20 @@ namespace MoonProTablet.WebUserControls if (!Page.IsPostBack) { checkAll(); + updateProdData(); } } + /// + /// Aggiorno valori produzione... + /// + private void updateProdData() + { + dtReqUpdate = DateTime.Now; + datiProdAct = DataLayer.obj.taStatoProd.GetData(idxMacchina, dtReqUpdate)[0]; + // aggiorno visualizzazione... + numPzProdotti = datiProdAct.Pz2RecTot; + numPzScarto = datiProdAct.Pz2RecScarto; + } private void checkAll() { @@ -152,11 +184,15 @@ namespace MoonProTablet.WebUserControls { switchBtnConferma(!txtNumPezzi.Enabled); } + /// /// determina comportamento btn conferma /// private void switchBtnConferma(bool showConf) { + // aggiorno valori rilevati + updateProdData(); + // continuo update txtNumPezzi.Enabled = showConf; txtNumScarti.Enabled = showConf; lbtSalva.Visible = showConf; @@ -164,8 +200,8 @@ namespace MoonProTablet.WebUserControls rigaProd = DataLayer.obj.taPzProd2conf.GetData(idxMacchina)[0]; try { - txtNumPezzi.Text = rigaProd.pezziNonConfermati.ToString(); - txtNumScarti.Text = "0"; + //numPzProdotti = rigaProd.pezziNonConfermati; + //numPzScarto = 0; txtPzBuoni.Text = numPzConfermati.ToString(); // sollevo evento! if (eh_inserting != null) @@ -197,6 +233,10 @@ namespace MoonProTablet.WebUserControls /// protected int numPzProdotti { + set + { + txtNumPezzi.Text = value.ToString(); + } get { int answ = 0; @@ -214,6 +254,10 @@ namespace MoonProTablet.WebUserControls /// protected int numPzScarto { + set + { + txtNumScarti.Text = value.ToString(); + } get { int answ = 0; diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index a21688e2..4b6e7978 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -1940,6 +1940,32 @@ FROM v_RegistroControlli + + + + + + dbo.stp_StatoProd_getByMacchina + + + + + + + + + + + + + + + + + + + + @@ -2609,6 +2635,25 @@ FROM v_RegistroControlli + + + + + + + + + + + + + + + + + + + @@ -2681,5 +2726,9 @@ FROM v_RegistroControlli + + + + \ No newline at end of file diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index 2b370fa4..ab9e6e6d 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -4,29 +4,30 @@ 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/MapoDb/DS_ProdTempi1.Designer.cs b/MapoDb/DS_ProdTempi1.Designer.cs index 9bc4428b..3f31757b 100644 --- a/MapoDb/DS_ProdTempi1.Designer.cs +++ b/MapoDb/DS_ProdTempi1.Designer.cs @@ -66,6 +66,8 @@ namespace MapoDb { private RegistroScartiDataTable tableRegistroScarti; + private StatoProdDataTable tableStatoProd; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -157,6 +159,9 @@ namespace MapoDb { if ((ds.Tables["RegistroScarti"] != null)) { base.Tables.Add(new RegistroScartiDataTable(ds.Tables["RegistroScarti"])); } + if ((ds.Tables["StatoProd"] != null)) { + base.Tables.Add(new StatoProdDataTable(ds.Tables["StatoProd"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -385,6 +390,16 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public StatoProdDataTable StatoProd { + get { + return this.tableStatoProd; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -515,6 +530,9 @@ namespace MapoDb { if ((ds.Tables["RegistroScarti"] != null)) { base.Tables.Add(new RegistroScartiDataTable(ds.Tables["RegistroScarti"])); } + if ((ds.Tables["StatoProd"] != null)) { + base.Tables.Add(new StatoProdDataTable(ds.Tables["StatoProd"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -674,6 +692,12 @@ namespace MapoDb { this.tableRegistroScarti.InitVars(); } } + this.tableStatoProd = ((StatoProdDataTable)(base.Tables["StatoProd"])); + if ((initTable == true)) { + if ((this.tableStatoProd != null)) { + this.tableStatoProd.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -726,6 +750,8 @@ namespace MapoDb { base.Tables.Add(this.tableRegistroControlli); this.tableRegistroScarti = new RegistroScartiDataTable(); base.Tables.Add(this.tableRegistroScarti); + this.tableStatoProd = new StatoProdDataTable(); + base.Tables.Add(this.tableStatoProd); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -854,6 +880,12 @@ namespace MapoDb { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private bool ShouldSerializeStatoProd() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -972,6 +1004,9 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public delegate void RegistroScartiRowChangeEventHandler(object sender, RegistroScartiRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public delegate void StatoProdRowChangeEventHandler(object sender, StatoProdRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -8892,6 +8927,348 @@ namespace MapoDb { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class StatoProdDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidxMacchina; + + private global::System.Data.DataColumn columnPzTotODL; + + private global::System.Data.DataColumn columnPzConfScarto; + + private global::System.Data.DataColumn columnPzConfBuoni; + + private global::System.Data.DataColumn columnPzRichODL; + + private global::System.Data.DataColumn columnPz2RecTot; + + private global::System.Data.DataColumn columnPz2RecScarto; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public StatoProdDataTable() { + this.TableName = "StatoProd"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal StatoProdDataTable(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", "15.0.0.0")] + protected StatoProdDataTable(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", "15.0.0.0")] + public global::System.Data.DataColumn idxMacchinaColumn { + get { + return this.columnidxMacchina; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn PzTotODLColumn { + get { + return this.columnPzTotODL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn PzConfScartoColumn { + get { + return this.columnPzConfScarto; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn PzConfBuoniColumn { + get { + return this.columnPzConfBuoni; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn PzRichODLColumn { + get { + return this.columnPzRichODL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn Pz2RecTotColumn { + get { + return this.columnPz2RecTot; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn Pz2RecScartoColumn { + get { + return this.columnPz2RecScarto; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.0.0.0")] + public StatoProdRow this[int index] { + get { + return ((StatoProdRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event StatoProdRowChangeEventHandler StatoProdRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event StatoProdRowChangeEventHandler StatoProdRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event StatoProdRowChangeEventHandler StatoProdRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event StatoProdRowChangeEventHandler StatoProdRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void AddStatoProdRow(StatoProdRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public StatoProdRow AddStatoProdRow(string idxMacchina, int PzTotODL, int PzConfScarto, int PzConfBuoni, int PzRichODL, int Pz2RecTot, int Pz2RecScarto) { + StatoProdRow rowStatoProdRow = ((StatoProdRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + idxMacchina, + PzTotODL, + PzConfScarto, + PzConfBuoni, + PzRichODL, + Pz2RecTot, + Pz2RecScarto}; + rowStatoProdRow.ItemArray = columnValuesArray; + this.Rows.Add(rowStatoProdRow); + return rowStatoProdRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public override global::System.Data.DataTable Clone() { + StatoProdDataTable cln = ((StatoProdDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new StatoProdDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal void InitVars() { + this.columnidxMacchina = base.Columns["idxMacchina"]; + this.columnPzTotODL = base.Columns["PzTotODL"]; + this.columnPzConfScarto = base.Columns["PzConfScarto"]; + this.columnPzConfBuoni = base.Columns["PzConfBuoni"]; + this.columnPzRichODL = base.Columns["PzRichODL"]; + this.columnPz2RecTot = base.Columns["Pz2RecTot"]; + this.columnPz2RecScarto = base.Columns["Pz2RecScarto"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitClass() { + this.columnidxMacchina = new global::System.Data.DataColumn("idxMacchina", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxMacchina); + this.columnPzTotODL = new global::System.Data.DataColumn("PzTotODL", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPzTotODL); + this.columnPzConfScarto = new global::System.Data.DataColumn("PzConfScarto", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPzConfScarto); + this.columnPzConfBuoni = new global::System.Data.DataColumn("PzConfBuoni", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPzConfBuoni); + this.columnPzRichODL = new global::System.Data.DataColumn("PzRichODL", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPzRichODL); + this.columnPz2RecTot = new global::System.Data.DataColumn("Pz2RecTot", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPz2RecTot); + this.columnPz2RecScarto = new global::System.Data.DataColumn("Pz2RecScarto", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPz2RecScarto); + this.Constraints.Add(new global::System.Data.UniqueConstraint("PK", new global::System.Data.DataColumn[] { + this.columnidxMacchina}, false)); + this.columnidxMacchina.ReadOnly = true; + this.columnidxMacchina.Unique = true; + this.columnidxMacchina.MaxLength = 50; + this.columnPzTotODL.ReadOnly = true; + this.columnPzConfScarto.ReadOnly = true; + this.columnPzConfBuoni.ReadOnly = true; + this.columnPzRichODL.ReadOnly = true; + this.columnPz2RecTot.ReadOnly = true; + this.columnPz2RecScarto.ReadOnly = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public StatoProdRow NewStatoProdRow() { + return ((StatoProdRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new StatoProdRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(StatoProdRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.StatoProdRowChanged != null)) { + this.StatoProdRowChanged(this, new StatoProdRowChangeEvent(((StatoProdRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.StatoProdRowChanging != null)) { + this.StatoProdRowChanging(this, new StatoProdRowChangeEvent(((StatoProdRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.StatoProdRowDeleted != null)) { + this.StatoProdRowDeleted(this, new StatoProdRowChangeEvent(((StatoProdRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.StatoProdRowDeleting != null)) { + this.StatoProdRowDeleting(this, new StatoProdRowChangeEvent(((StatoProdRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void RemoveStatoProdRow(StatoProdRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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_ProdTempi ds = new DS_ProdTempi(); + 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 = "StatoProdDataTable"; + 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. /// @@ -13421,6 +13798,217 @@ namespace MapoDb { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class StatoProdRow : global::System.Data.DataRow { + + private StatoProdDataTable tableStatoProd; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal StatoProdRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableStatoProd = ((StatoProdDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string idxMacchina { + get { + try { + return ((string)(this[this.tableStatoProd.idxMacchinaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'idxMacchina\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.idxMacchinaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int PzTotODL { + get { + try { + return ((int)(this[this.tableStatoProd.PzTotODLColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'PzTotODL\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.PzTotODLColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int PzConfScarto { + get { + try { + return ((int)(this[this.tableStatoProd.PzConfScartoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'PzConfScarto\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.PzConfScartoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int PzConfBuoni { + get { + try { + return ((int)(this[this.tableStatoProd.PzConfBuoniColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'PzConfBuoni\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.PzConfBuoniColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int PzRichODL { + get { + try { + return ((int)(this[this.tableStatoProd.PzRichODLColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'PzRichODL\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.PzRichODLColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int Pz2RecTot { + get { + try { + return ((int)(this[this.tableStatoProd.Pz2RecTotColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Pz2RecTot\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.Pz2RecTotColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int Pz2RecScarto { + get { + try { + return ((int)(this[this.tableStatoProd.Pz2RecScartoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Pz2RecScarto\' nella tabella \'StatoProd\' è DBNull.", e); + } + } + set { + this[this.tableStatoProd.Pz2RecScartoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsidxMacchinaNull() { + return this.IsNull(this.tableStatoProd.idxMacchinaColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetidxMacchinaNull() { + this[this.tableStatoProd.idxMacchinaColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPzTotODLNull() { + return this.IsNull(this.tableStatoProd.PzTotODLColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPzTotODLNull() { + this[this.tableStatoProd.PzTotODLColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPzConfScartoNull() { + return this.IsNull(this.tableStatoProd.PzConfScartoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPzConfScartoNull() { + this[this.tableStatoProd.PzConfScartoColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPzConfBuoniNull() { + return this.IsNull(this.tableStatoProd.PzConfBuoniColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPzConfBuoniNull() { + this[this.tableStatoProd.PzConfBuoniColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPzRichODLNull() { + return this.IsNull(this.tableStatoProd.PzRichODLColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPzRichODLNull() { + this[this.tableStatoProd.PzRichODLColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPz2RecTotNull() { + return this.IsNull(this.tableStatoProd.Pz2RecTotColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPz2RecTotNull() { + this[this.tableStatoProd.Pz2RecTotColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsPz2RecScartoNull() { + return this.IsNull(this.tableStatoProd.Pz2RecScartoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetPz2RecScartoNull() { + this[this.tableStatoProd.Pz2RecScartoColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -14134,6 +14722,40 @@ namespace MapoDb { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public class StatoProdRowChangeEvent : global::System.EventArgs { + + private StatoProdRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public StatoProdRowChangeEvent(StatoProdRow 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", "15.0.0.0")] + public StatoProdRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace MapoDb.DS_ProdTempiTableAdapters { @@ -24532,6 +25154,206 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic } } + /// + ///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 StatoProdTableAdapter : 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", "15.0.0.0")] + public StatoProdTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.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", "15.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", "15.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", "15.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", "15.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 = "StatoProd"; + tableMapping.ColumnMappings.Add("idxMacchina", "idxMacchina"); + tableMapping.ColumnMappings.Add("PzTotODL", "PzTotODL"); + tableMapping.ColumnMappings.Add("PzConfScarto", "PzConfScarto"); + tableMapping.ColumnMappings.Add("PzConfBuoni", "PzConfBuoni"); + tableMapping.ColumnMappings.Add("PzRichODL", "PzRichODL"); + tableMapping.ColumnMappings.Add("Pz2RecTot", "Pz2RecTot"); + tableMapping.ColumnMappings.Add("Pz2RecScarto", "Pz2RecScarto"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonProConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "dbo.stp_StatoProd_getByMacchina"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[0].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[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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_ProdTempi.StatoProdDataTable dataTable, string idxMacchina, global::System.Nullable DataOra) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((idxMacchina == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(idxMacchina)); + } + if ((DataOra.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(DataOra.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_ProdTempi.StatoProdDataTable GetData(string idxMacchina, global::System.Nullable DataOra) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((idxMacchina == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(idxMacchina)); + } + if ((DataOra.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(DataOra.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + DS_ProdTempi.StatoProdDataTable dataTable = new DS_ProdTempi.StatoProdDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -24813,6 +25635,15 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic allChangedRows.AddRange(updatedRows); } } + if ((this._datiProduzioneTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.DatiProduzione.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._datiProduzioneTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._calendFesteFerieTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.CalendFesteFerie.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -24849,15 +25680,6 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic allChangedRows.AddRange(updatedRows); } } - if ((this._datiProduzioneTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.DatiProduzione.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._datiProduzioneTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } return result; } @@ -24892,6 +25714,14 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic allAddedRows.AddRange(addedRows); } } + if ((this._datiProduzioneTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.DatiProduzione.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._datiProduzioneTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._calendFesteFerieTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.CalendFesteFerie.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -24924,14 +25754,6 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic allAddedRows.AddRange(addedRows); } } - if ((this._datiProduzioneTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.DatiProduzione.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._datiProduzioneTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } return result; } @@ -24942,14 +25764,6 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateDeletedRows(DS_ProdTempi dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._datiProduzioneTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.DatiProduzione.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._datiProduzioneTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._anagArticoliTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AnagArticoli.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -24982,6 +25796,14 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic allChangedRows.AddRange(deletedRows); } } + if ((this._datiProduzioneTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.DatiProduzione.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._datiProduzioneTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._turniMacchinaTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.TurniMacchina.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index eed60ba0..870e67bf 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -47,6 +47,7 @@ namespace MapoDb public DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter taMSE; public DS_ProdTempiTableAdapters.ProduzioneAs400TableAdapter taAs400; public DS_ProdTempiTableAdapters.RegistroControlliTableAdapter taRC; + public DS_ProdTempiTableAdapters.StatoProdTableAdapter taStatoProd; // table adapter x utility public DS_UtilityTableAdapters.v_selArticoliTableAdapter taSelArt; public DS_UtilityTableAdapters.v_selODLTableAdapter taSelOdlFree; @@ -89,6 +90,7 @@ namespace MapoDb taMSE = new DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter(); taAs400 = new DS_ProdTempiTableAdapters.ProduzioneAs400TableAdapter(); taRC = new DS_ProdTempiTableAdapters.RegistroControlliTableAdapter(); + taStatoProd = new DS_ProdTempiTableAdapters.StatoProdTableAdapter(); taSelArt = new DS_UtilityTableAdapters.v_selArticoliTableAdapter(); taSelOdlFree = new DS_UtilityTableAdapters.v_selODLTableAdapter(); taComm = new DS_UtilityTableAdapters.CommentiTableAdapter(); @@ -130,6 +132,7 @@ namespace MapoDb taMSE.Connection.ConnectionString = connectionString; taAs400.Connection.ConnectionString = connectionString; taRC.Connection.ConnectionString = connectionString; + taStatoProd.Connection.ConnectionString = connectionString; taSelArt.Connection.ConnectionString = connectionString; taSelOdlFree.Connection.ConnectionString = connectionString; taComm.Connection.ConnectionString = connectionString;