diff --git a/MP-IO/Controllers/BENCH.cs b/MP-IO/Controllers/BENCH.cs index 76bee853..731c2cb6 100644 --- a/MP-IO/Controllers/BENCH.cs +++ b/MP-IO/Controllers/BENCH.cs @@ -249,11 +249,11 @@ namespace MP_IO.Controllers } else { - int idxFamMacch = Convert.ToInt32(id); + int idxFamIn = Convert.ToInt32(id); answ = ""; try { - KeyValuePair[] valori = DataLayer.mTabSMI(idxFamMacch); + KeyValuePair[] valori = DataLayer.mTabSMI(idxFamIn); splitTime = stopWatch.ElapsedMilliseconds; foreach (var item in valori) { @@ -271,5 +271,85 @@ namespace MP_IO.Controllers // ritorno return answ; } + // GET BENCH/fSMI/18?idxMS=1&valore=1 + public string fSMI(int? id, int? idxMS, int? valore) + { + string answ = "ND"; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + // se id nullo --> KO! + if (id == null) + { + answ = "KO"; + } + else + { + // recupero dati x sapere quale famiglia SMI è necessaria e quale stato / segnale si sia ricevuto + int idxFamIn = Convert.ToInt32(id); + int idxMicroStato = Convert.ToInt32(idxMS); + int valIOB = Convert.ToInt32(valore); + // recupero microstato macchina da chiave relativa + answ = ""; + try + { + // verifico se ci sia in memoria tab della fam macchina relativa (sennò carico) + string fiHASH = DataLayer.hSMI(idxFamIn); + string outVal = ""; + bool trovato = memLayer.ML.redHashPresentSz(fiHASH); + if (!trovato) + { + // ricarico tabella! + KeyValuePair[] valori = DataLayer.mTabSMI(idxFamIn); + answ = string.Format("Ricaricata SMI per famiglia {0}
", fiHASH); + } + answ += string.Format("Trovata {0} Hash per {1}
", memLayer.ML.redCountKey(fiHASH), fiHASH); + // recupero singolo valore (stringa) x chiave + outVal = DataLayer.valoreSMI(idxFamIn, idxMicroStato, valIOB); + // mostro output + answ += string.Format("idxFamIN: {0} | idxMS: {1} | valIOB: {2} | out: {3}
", idxFamIn, idxMicroStato, valIOB, outVal); + } + catch + { } + } + stopWatch.Stop(); + // Get the elapsed time as a TimeSpan value. + TimeSpan ts = stopWatch.Elapsed; + // accodo tempo! + answ += string.Format("
Total Time Elapsed: {0}ms", ts.TotalMilliseconds); + // ritorno + return answ; + } + // GET BENCH/INSEN/2004 + public string INSEN(string id) + { + string answ = "ND"; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + // se id nullo --> KO! + if (id == null) + { + answ = "KO"; + } + else + { + // recupero dati x sapere quale famiglia SMI è necessaria e quale stato / segnale si sia ricevuto + int idxMacchina = Convert.ToInt32(id); + // recupero microstato macchina da chiave relativa + answ = ""; + try + { + answ += string.Format("Macchina {0}, insEnabled {1}
", idxMacchina, DataLayer.insEnab(idxMacchina)); + } + catch + { } + } + stopWatch.Stop(); + // Get the elapsed time as a TimeSpan value. + TimeSpan ts = stopWatch.Elapsed; + // accodo tempo! + answ += string.Format("
Total Time Elapsed: {0}ms", ts.TotalMilliseconds); + // ritorno + return answ; + } } } \ No newline at end of file diff --git a/MP-IO/Web.Donati.config b/MP-IO/Web.Donati.config index bc9e585d..242fa07b 100644 --- a/MP-IO/Web.Donati.config +++ b/MP-IO/Web.Donati.config @@ -3,7 +3,7 @@ - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/MP-IO/Web.OVH-demo.config b/MP-IO/Web.OVH-demo.config index 72c26bb5..ff5d6d47 100644 --- a/MP-IO/Web.OVH-demo.config +++ b/MP-IO/Web.OVH-demo.config @@ -4,6 +4,7 @@ + diff --git a/MP-IO/Web.Steamware.config b/MP-IO/Web.Steamware.config index 38172868..1e353362 100644 --- a/MP-IO/Web.Steamware.config +++ b/MP-IO/Web.Steamware.config @@ -15,27 +15,14 @@ --> - - - - - - - + + + + + + + + - - + + @@ -26,6 +26,7 @@ + diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs index 1f1ee306..7fed5d99 100644 --- a/MapoDb/DS_applicazione.Designer.cs +++ b/MapoDb/DS_applicazione.Designer.cs @@ -70,7 +70,7 @@ namespace MapoDb { private AnagArticoliDataTable tableAnagArticoli; - private MS_FullDataDataTable tableMS_FullData; + private MSFDDataTable tableMSFD; private global::System.Data.DataRelation relationFK_Macchine2FamiglieMacchine_FamiglieMacchine; @@ -209,8 +209,8 @@ namespace MapoDb { if ((ds.Tables["AnagArticoli"] != null)) { base.Tables.Add(new AnagArticoliDataTable(ds.Tables["AnagArticoli"])); } - if ((ds.Tables["MS_FullData"] != null)) { - base.Tables.Add(new MS_FullDataDataTable(ds.Tables["MS_FullData"])); + if ((ds.Tables["MSFD"] != null)) { + base.Tables.Add(new MSFDDataTable(ds.Tables["MSFD"])); } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; @@ -464,9 +464,9 @@ namespace MapoDb { [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 MS_FullDataDataTable MS_FullData { + public MSFDDataTable MSFD { get { - return this.tableMS_FullData; + return this.tableMSFD; } } @@ -606,8 +606,8 @@ namespace MapoDb { if ((ds.Tables["AnagArticoli"] != null)) { base.Tables.Add(new AnagArticoliDataTable(ds.Tables["AnagArticoli"])); } - if ((ds.Tables["MS_FullData"] != null)) { - base.Tables.Add(new MS_FullDataDataTable(ds.Tables["MS_FullData"])); + if ((ds.Tables["MSFD"] != null)) { + base.Tables.Add(new MSFDDataTable(ds.Tables["MSFD"])); } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; @@ -780,10 +780,10 @@ namespace MapoDb { this.tableAnagArticoli.InitVars(); } } - this.tableMS_FullData = ((MS_FullDataDataTable)(base.Tables["MS_FullData"])); + this.tableMSFD = ((MSFDDataTable)(base.Tables["MSFD"])); if ((initTable == true)) { - if ((this.tableMS_FullData != null)) { - this.tableMS_FullData.InitVars(); + if ((this.tableMSFD != null)) { + this.tableMSFD.InitVars(); } } this.relationFK_Macchine2FamiglieMacchine_FamiglieMacchine = this.Relations["FK_Macchine2FamiglieMacchine_FamiglieMacchine"]; @@ -862,8 +862,8 @@ namespace MapoDb { base.Tables.Add(this.tableSignalLog); this.tableAnagArticoli = new AnagArticoliDataTable(); base.Tables.Add(this.tableAnagArticoli); - this.tableMS_FullData = new MS_FullDataDataTable(); - base.Tables.Add(this.tableMS_FullData); + this.tableMSFD = new MSFDDataTable(); + base.Tables.Add(this.tableMSFD); this.relationFK_Macchine2FamiglieMacchine_FamiglieMacchine = new global::System.Data.DataRelation("FK_Macchine2FamiglieMacchine_FamiglieMacchine", new global::System.Data.DataColumn[] { this.tableFamiglieMacchine.IdxFamigliaColumn}, new global::System.Data.DataColumn[] { this.tableMacchine2FamiglieMacchine.IdxFamigliaColumn}, false); @@ -1086,7 +1086,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - private bool ShouldSerializeMS_FullData() { + private bool ShouldSerializeMSFD() { return false; } @@ -1215,7 +1215,7 @@ namespace MapoDb { public delegate void AnagArticoliRowChangeEventHandler(object sender, AnagArticoliRowChangeEvent e); [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public delegate void MS_FullDataRowChangeEventHandler(object sender, MS_FullDataRowChangeEvent e); + public delegate void MSFDRowChangeEventHandler(object sender, MSFDRowChangeEvent e); /// ///Represents the strongly named DataTable class. @@ -8613,7 +8613,7 @@ namespace MapoDb { /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class MS_FullDataDataTable : global::System.Data.TypedTableBase { + public partial class MSFDDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnidxmacchina; @@ -8649,10 +8649,12 @@ namespace MapoDb { private global::System.Data.DataColumn columnMatrOpr; + private global::System.Data.DataColumn columnpallet; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MS_FullDataDataTable() { - this.TableName = "MS_FullData"; + public MSFDDataTable() { + this.TableName = "MSFD"; this.BeginInit(); this.InitClass(); this.EndInit(); @@ -8660,7 +8662,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal MS_FullDataDataTable(global::System.Data.DataTable table) { + internal MSFDDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; @@ -8677,7 +8679,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - protected MS_FullDataDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + protected MSFDDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } @@ -8818,6 +8820,14 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn palletColumn { + get { + return this.columnpallet; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -8829,33 +8839,33 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MS_FullDataRow this[int index] { + public MSFDRow this[int index] { get { - return ((MS_FullDataRow)(this.Rows[index])); + return ((MSFDRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event MS_FullDataRowChangeEventHandler MS_FullDataRowChanging; + public event MSFDRowChangeEventHandler MSFDRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event MS_FullDataRowChangeEventHandler MS_FullDataRowChanged; + public event MSFDRowChangeEventHandler MSFDRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event MS_FullDataRowChangeEventHandler MS_FullDataRowDeleting; + public event MSFDRowChangeEventHandler MSFDRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public event MS_FullDataRowChangeEventHandler MS_FullDataRowDeleted; + public event MSFDRowChangeEventHandler MSFDRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void AddMS_FullDataRow(MS_FullDataRow row) { + public void AddMSFDRow(MSFDRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MS_FullDataRow AddMS_FullDataRow( + public MSFDRow AddMSFDRow( string idxmacchina, string codmacchina, bool palletChange, @@ -8872,8 +8882,9 @@ namespace MapoDb { string CodArticolo, double TempoCicloBase, int PzPalletProd, - int MatrOpr) { - MS_FullDataRow rowMS_FullDataRow = ((MS_FullDataRow)(this.NewRow())); + int MatrOpr, + string pallet) { + MSFDRow rowMSFDRow = ((MSFDRow)(this.NewRow())); object[] columnValuesArray = new object[] { idxmacchina, codmacchina, @@ -8891,23 +8902,24 @@ namespace MapoDb { CodArticolo, TempoCicloBase, PzPalletProd, - MatrOpr}; - rowMS_FullDataRow.ItemArray = columnValuesArray; - this.Rows.Add(rowMS_FullDataRow); - return rowMS_FullDataRow; + MatrOpr, + pallet}; + rowMSFDRow.ItemArray = columnValuesArray; + this.Rows.Add(rowMSFDRow); + return rowMSFDRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MS_FullDataRow FindByidxmacchina(string idxmacchina) { - return ((MS_FullDataRow)(this.Rows.Find(new object[] { + public MSFDRow FindByidxmacchina(string idxmacchina) { + return ((MSFDRow)(this.Rows.Find(new object[] { idxmacchina}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public override global::System.Data.DataTable Clone() { - MS_FullDataDataTable cln = ((MS_FullDataDataTable)(base.Clone())); + MSFDDataTable cln = ((MSFDDataTable)(base.Clone())); cln.InitVars(); return cln; } @@ -8915,7 +8927,7 @@ namespace MapoDb { [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 MS_FullDataDataTable(); + return new MSFDDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8938,6 +8950,7 @@ namespace MapoDb { this.columnTempoCicloBase = base.Columns["TempoCicloBase"]; this.columnPzPalletProd = base.Columns["PzPalletProd"]; this.columnMatrOpr = base.Columns["MatrOpr"]; + this.columnpallet = base.Columns["pallet"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8977,6 +8990,8 @@ namespace MapoDb { base.Columns.Add(this.columnPzPalletProd); this.columnMatrOpr = new global::System.Data.DataColumn("MatrOpr", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnMatrOpr); + this.columnpallet = new global::System.Data.DataColumn("pallet", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnpallet); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidxmacchina}, true)); this.columnidxmacchina.AllowDBNull = false; @@ -8992,32 +9007,33 @@ namespace MapoDb { this.columnIdxStato.AllowDBNull = false; this.columnlastVal.MaxLength = 50; this.columnCodArticolo.MaxLength = 50; + this.columnpallet.MaxLength = 20; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MS_FullDataRow NewMS_FullDataRow() { - return ((MS_FullDataRow)(this.NewRow())); + public MSFDRow NewMSFDRow() { + return ((MSFDRow)(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 MS_FullDataRow(builder); + return new MSFDRow(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(MS_FullDataRow); + return typeof(MSFDRow); } [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.MS_FullDataRowChanged != null)) { - this.MS_FullDataRowChanged(this, new MS_FullDataRowChangeEvent(((MS_FullDataRow)(e.Row)), e.Action)); + if ((this.MSFDRowChanged != null)) { + this.MSFDRowChanged(this, new MSFDRowChangeEvent(((MSFDRow)(e.Row)), e.Action)); } } @@ -9025,8 +9041,8 @@ namespace MapoDb { [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.MS_FullDataRowChanging != null)) { - this.MS_FullDataRowChanging(this, new MS_FullDataRowChangeEvent(((MS_FullDataRow)(e.Row)), e.Action)); + if ((this.MSFDRowChanging != null)) { + this.MSFDRowChanging(this, new MSFDRowChangeEvent(((MSFDRow)(e.Row)), e.Action)); } } @@ -9034,8 +9050,8 @@ namespace MapoDb { [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.MS_FullDataRowDeleted != null)) { - this.MS_FullDataRowDeleted(this, new MS_FullDataRowChangeEvent(((MS_FullDataRow)(e.Row)), e.Action)); + if ((this.MSFDRowDeleted != null)) { + this.MSFDRowDeleted(this, new MSFDRowChangeEvent(((MSFDRow)(e.Row)), e.Action)); } } @@ -9043,14 +9059,14 @@ namespace MapoDb { [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.MS_FullDataRowDeleting != null)) { - this.MS_FullDataRowDeleting(this, new MS_FullDataRowChangeEvent(((MS_FullDataRow)(e.Row)), e.Action)); + if ((this.MSFDRowDeleting != null)) { + this.MSFDRowDeleting(this, new MSFDRowChangeEvent(((MSFDRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public void RemoveMS_FullDataRow(MS_FullDataRow row) { + public void RemoveMSFDRow(MSFDRow row) { this.Rows.Remove(row); } @@ -9077,7 +9093,7 @@ namespace MapoDb { type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "MS_FullDataDataTable"; + attribute2.FixedValue = "MSFDDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); @@ -12299,25 +12315,25 @@ namespace MapoDb { /// ///Represents strongly named DataRow class. /// - public partial class MS_FullDataRow : global::System.Data.DataRow { + public partial class MSFDRow : global::System.Data.DataRow { - private MS_FullDataDataTable tableMS_FullData; + private MSFDDataTable tableMSFD; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - internal MS_FullDataRow(global::System.Data.DataRowBuilder rb) : + internal MSFDRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tableMS_FullData = ((MS_FullDataDataTable)(this.Table)); + this.tableMSFD = ((MSFDDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public string idxmacchina { get { - return ((string)(this[this.tableMS_FullData.idxmacchinaColumn])); + return ((string)(this[this.tableMSFD.idxmacchinaColumn])); } set { - this[this.tableMS_FullData.idxmacchinaColumn] = value; + this[this.tableMSFD.idxmacchinaColumn] = value; } } @@ -12326,14 +12342,14 @@ namespace MapoDb { public string codmacchina { get { try { - return ((string)(this[this.tableMS_FullData.codmacchinaColumn])); + return ((string)(this[this.tableMSFD.codmacchinaColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'codmacchina\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'codmacchina\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.codmacchinaColumn] = value; + this[this.tableMSFD.codmacchinaColumn] = value; } } @@ -12342,14 +12358,14 @@ namespace MapoDb { public bool palletChange { get { try { - return ((bool)(this[this.tableMS_FullData.palletChangeColumn])); + return ((bool)(this[this.tableMSFD.palletChangeColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'palletChange\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'palletChange\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.palletChangeColumn] = value; + this[this.tableMSFD.palletChangeColumn] = value; } } @@ -12358,14 +12374,14 @@ namespace MapoDb { public string CodArticolo_A { get { try { - return ((string)(this[this.tableMS_FullData.CodArticolo_AColumn])); + return ((string)(this[this.tableMSFD.CodArticolo_AColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodArticolo_A\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodArticolo_A\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.CodArticolo_AColumn] = value; + this[this.tableMSFD.CodArticolo_AColumn] = value; } } @@ -12374,14 +12390,14 @@ namespace MapoDb { public string CodArticolo_B { get { try { - return ((string)(this[this.tableMS_FullData.CodArticolo_BColumn])); + return ((string)(this[this.tableMSFD.CodArticolo_BColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodArticolo_B\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodArticolo_B\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.CodArticolo_BColumn] = value; + this[this.tableMSFD.CodArticolo_BColumn] = value; } } @@ -12390,14 +12406,14 @@ namespace MapoDb { public bool simplePallet { get { try { - return ((bool)(this[this.tableMS_FullData.simplePalletColumn])); + return ((bool)(this[this.tableMSFD.simplePalletColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'simplePallet\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'simplePallet\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.simplePalletColumn] = value; + this[this.tableMSFD.simplePalletColumn] = value; } } @@ -12406,14 +12422,14 @@ namespace MapoDb { public bool insEnabled { get { try { - return ((bool)(this[this.tableMS_FullData.insEnabledColumn])); + return ((bool)(this[this.tableMSFD.insEnabledColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'insEnabled\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'insEnabled\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.insEnabledColumn] = value; + this[this.tableMSFD.insEnabledColumn] = value; } } @@ -12421,10 +12437,10 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool sLogEnabled { get { - return ((bool)(this[this.tableMS_FullData.sLogEnabledColumn])); + return ((bool)(this[this.tableMSFD.sLogEnabledColumn])); } set { - this[this.tableMS_FullData.sLogEnabledColumn] = value; + this[this.tableMSFD.sLogEnabledColumn] = value; } } @@ -12432,10 +12448,10 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxFamigliaIngresso { get { - return ((int)(this[this.tableMS_FullData.IdxFamigliaIngressoColumn])); + return ((int)(this[this.tableMSFD.IdxFamigliaIngressoColumn])); } set { - this[this.tableMS_FullData.IdxFamigliaIngressoColumn] = value; + this[this.tableMSFD.IdxFamigliaIngressoColumn] = value; } } @@ -12443,10 +12459,10 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxMicroStato { get { - return ((int)(this[this.tableMS_FullData.IdxMicroStatoColumn])); + return ((int)(this[this.tableMSFD.IdxMicroStatoColumn])); } set { - this[this.tableMS_FullData.IdxMicroStatoColumn] = value; + this[this.tableMSFD.IdxMicroStatoColumn] = value; } } @@ -12454,10 +12470,10 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxFamiglia { get { - return ((int)(this[this.tableMS_FullData.IdxFamigliaColumn])); + return ((int)(this[this.tableMSFD.IdxFamigliaColumn])); } set { - this[this.tableMS_FullData.IdxFamigliaColumn] = value; + this[this.tableMSFD.IdxFamigliaColumn] = value; } } @@ -12465,10 +12481,10 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int IdxStato { get { - return ((int)(this[this.tableMS_FullData.IdxStatoColumn])); + return ((int)(this[this.tableMSFD.IdxStatoColumn])); } set { - this[this.tableMS_FullData.IdxStatoColumn] = value; + this[this.tableMSFD.IdxStatoColumn] = value; } } @@ -12477,14 +12493,14 @@ namespace MapoDb { public string lastVal { get { try { - return ((string)(this[this.tableMS_FullData.lastValColumn])); + return ((string)(this[this.tableMSFD.lastValColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'lastVal\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'lastVal\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.lastValColumn] = value; + this[this.tableMSFD.lastValColumn] = value; } } @@ -12493,14 +12509,14 @@ namespace MapoDb { public string CodArticolo { get { try { - return ((string)(this[this.tableMS_FullData.CodArticoloColumn])); + return ((string)(this[this.tableMSFD.CodArticoloColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodArticolo\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodArticolo\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.CodArticoloColumn] = value; + this[this.tableMSFD.CodArticoloColumn] = value; } } @@ -12509,14 +12525,14 @@ namespace MapoDb { public double TempoCicloBase { get { try { - return ((double)(this[this.tableMS_FullData.TempoCicloBaseColumn])); + return ((double)(this[this.tableMSFD.TempoCicloBaseColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'TempoCicloBase\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'TempoCicloBase\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.TempoCicloBaseColumn] = value; + this[this.tableMSFD.TempoCicloBaseColumn] = value; } } @@ -12525,14 +12541,14 @@ namespace MapoDb { public int PzPalletProd { get { try { - return ((int)(this[this.tableMS_FullData.PzPalletProdColumn])); + return ((int)(this[this.tableMSFD.PzPalletProdColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'PzPalletProd\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'PzPalletProd\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.PzPalletProdColumn] = value; + this[this.tableMSFD.PzPalletProdColumn] = value; } } @@ -12541,147 +12557,175 @@ namespace MapoDb { public int MatrOpr { get { try { - return ((int)(this[this.tableMS_FullData.MatrOprColumn])); + return ((int)(this[this.tableMSFD.MatrOprColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("Il valore della colonna \'MatrOpr\' nella tabella \'MS_FullData\' è DBNull.", e); + throw new global::System.Data.StrongTypingException("Il valore della colonna \'MatrOpr\' nella tabella \'MSFD\' è DBNull.", e); } } set { - this[this.tableMS_FullData.MatrOprColumn] = value; + this[this.tableMSFD.MatrOprColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string pallet { + get { + try { + return ((string)(this[this.tableMSFD.palletColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'pallet\' nella tabella \'MSFD\' è DBNull.", e); + } + } + set { + this[this.tableMSFD.palletColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IscodmacchinaNull() { - return this.IsNull(this.tableMS_FullData.codmacchinaColumn); + return this.IsNull(this.tableMSFD.codmacchinaColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetcodmacchinaNull() { - this[this.tableMS_FullData.codmacchinaColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.codmacchinaColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IspalletChangeNull() { - return this.IsNull(this.tableMS_FullData.palletChangeColumn); + return this.IsNull(this.tableMSFD.palletChangeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetpalletChangeNull() { - this[this.tableMS_FullData.palletChangeColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.palletChangeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsCodArticolo_ANull() { - return this.IsNull(this.tableMS_FullData.CodArticolo_AColumn); + return this.IsNull(this.tableMSFD.CodArticolo_AColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetCodArticolo_ANull() { - this[this.tableMS_FullData.CodArticolo_AColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.CodArticolo_AColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsCodArticolo_BNull() { - return this.IsNull(this.tableMS_FullData.CodArticolo_BColumn); + return this.IsNull(this.tableMSFD.CodArticolo_BColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetCodArticolo_BNull() { - this[this.tableMS_FullData.CodArticolo_BColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.CodArticolo_BColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IssimplePalletNull() { - return this.IsNull(this.tableMS_FullData.simplePalletColumn); + return this.IsNull(this.tableMSFD.simplePalletColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetsimplePalletNull() { - this[this.tableMS_FullData.simplePalletColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.simplePalletColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsinsEnabledNull() { - return this.IsNull(this.tableMS_FullData.insEnabledColumn); + return this.IsNull(this.tableMSFD.insEnabledColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetinsEnabledNull() { - this[this.tableMS_FullData.insEnabledColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.insEnabledColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IslastValNull() { - return this.IsNull(this.tableMS_FullData.lastValColumn); + return this.IsNull(this.tableMSFD.lastValColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetlastValNull() { - this[this.tableMS_FullData.lastValColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.lastValColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsCodArticoloNull() { - return this.IsNull(this.tableMS_FullData.CodArticoloColumn); + return this.IsNull(this.tableMSFD.CodArticoloColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetCodArticoloNull() { - this[this.tableMS_FullData.CodArticoloColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.CodArticoloColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsTempoCicloBaseNull() { - return this.IsNull(this.tableMS_FullData.TempoCicloBaseColumn); + return this.IsNull(this.tableMSFD.TempoCicloBaseColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetTempoCicloBaseNull() { - this[this.tableMS_FullData.TempoCicloBaseColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.TempoCicloBaseColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsPzPalletProdNull() { - return this.IsNull(this.tableMS_FullData.PzPalletProdColumn); + return this.IsNull(this.tableMSFD.PzPalletProdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetPzPalletProdNull() { - this[this.tableMS_FullData.PzPalletProdColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.PzPalletProdColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsMatrOprNull() { - return this.IsNull(this.tableMS_FullData.MatrOprColumn); + return this.IsNull(this.tableMSFD.MatrOprColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public void SetMatrOprNull() { - this[this.tableMS_FullData.MatrOprColumn] = global::System.Convert.DBNull; + this[this.tableMSFD.MatrOprColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IspalletNull() { + return this.IsNull(this.tableMSFD.palletColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetpalletNull() { + this[this.tableMSFD.palletColumn] = global::System.Convert.DBNull; } } @@ -13471,22 +13515,22 @@ namespace MapoDb { ///Row event argument class /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public class MS_FullDataRowChangeEvent : global::System.EventArgs { + public class MSFDRowChangeEvent : global::System.EventArgs { - private MS_FullDataRow eventRow; + private MSFDRow 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 MS_FullDataRowChangeEvent(MS_FullDataRow row, global::System.Data.DataRowAction action) { + public MSFDRowChangeEvent(MSFDRow 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 MS_FullDataRow Row { + public MSFDRow Row { get { return this.eventRow; } @@ -24390,7 +24434,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli [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 MS_FullDataTableAdapter : global::System.ComponentModel.Component { + public partial class MSFDTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -24402,7 +24446,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public MS_FullDataTableAdapter() { + public MSFDTableAdapter() { this.ClearBeforeFill = true; } @@ -24473,7 +24517,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli 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 = "MS_FullData"; + tableMapping.DataSetTable = "MSFD"; tableMapping.ColumnMappings.Add("idxmacchina", "idxmacchina"); tableMapping.ColumnMappings.Add("codmacchina", "codmacchina"); tableMapping.ColumnMappings.Add("palletChange", "palletChange"); @@ -24491,6 +24535,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli tableMapping.ColumnMappings.Add("TempoCicloBase", "TempoCicloBase"); tableMapping.ColumnMappings.Add("PzPalletProd", "PzPalletProd"); tableMapping.ColumnMappings.Add("MatrOpr", "MatrOpr"); + tableMapping.ColumnMappings.Add("pallet", "pallet"); this._adapter.TableMappings.Add(tableMapping); } @@ -24504,27 +24549,26 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli [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 = 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 = "dbo.stp_MS_FullData"; + this._commandCollection[0].CommandText = "dbo.stp_MSFD_getAll"; 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[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_MSFD_getMacc"; + 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("@IdxMacchina", 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", "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_applicazione.MS_FullDataDataTable dataTable, string IdxMacchina) { + public virtual int Fill(DS_applicazione.MSFDDataTable dataTable) { 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 ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -24536,15 +24580,26 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli [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_applicazione.MS_FullDataDataTable GetData(string IdxMacchina) { + public virtual DS_applicazione.MSFDDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_applicazione.MSFDDataTable dataTable = new DS_applicazione.MSFDDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [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, false)] + public virtual DS_applicazione.MSFDDataTable getByIdxMacc(string IdxMacchina) { + this.Adapter.SelectCommand = this.CommandCollection[1]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina)); } - DS_applicazione.MS_FullDataDataTable dataTable = new DS_applicazione.MS_FullDataDataTable(); + DS_applicazione.MSFDDataTable dataTable = new DS_applicazione.MSFDDataTable(); this.Adapter.Fill(dataTable); return dataTable; } diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd index cdfedc48..97950d2f 100644 --- a/MapoDb/DS_applicazione.xsd +++ b/MapoDb/DS_applicazione.xsd @@ -2333,15 +2333,14 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + - + - dbo.stp_MS_FullData + dbo.stp_MSFD_getAll - @@ -2365,8 +2364,21 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli + - + + + + + dbo.stp_MSFD_getMacc + + + + + + + + @@ -2965,7 +2977,7 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - + @@ -3021,6 +3033,13 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli + + + + + + + @@ -3131,8 +3150,8 @@ SELECT CodArticolo, DescArticolo, CurrRev, ProdRev, FlagIsNew FROM AnagArticoli - - + + diff --git a/MapoDb/DS_applicazione.xss b/MapoDb/DS_applicazione.xss index 490773e1..8f19f397 100644 --- a/MapoDb/DS_applicazione.xss +++ b/MapoDb/DS_applicazione.xss @@ -6,30 +6,30 @@ --> - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + @@ -40,7 +40,7 @@ 667 - 830 + 850 @@ -48,7 +48,7 @@ 699 - 558 + 597 699 @@ -59,7 +59,7 @@ - 754 + 815 1061 @@ -72,14 +72,14 @@ 636 - 558 + 597 636 684 - 500 + 537 684 @@ -88,7 +88,7 @@ 386 - 619 + 636 386 @@ -104,7 +104,7 @@ 336 - 619 + 636 336 @@ -115,7 +115,7 @@ - 814 + 853 359 @@ -168,7 +168,7 @@ 298 - 401 + 416 @@ -188,7 +188,7 @@ 1444 - 362 + 386 1444 @@ -200,7 +200,7 @@ 716 - 558 + 597 716 @@ -215,7 +215,7 @@ 1231 - 832 + 896 1231 @@ -264,7 +264,7 @@ 513 - 401 + 416 @@ -276,7 +276,7 @@ 1108 - 431 + 487 @@ -284,15 +284,15 @@ 982 - 851 + 891 982 - 892 + 899 - 500 - 892 + 537 + 899 diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index cba228c4..480a9fda 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -521,7 +521,7 @@ namespace MapoDb } /// - /// Hash Redis contenente i dati MP di una specifico TYPE (es status, enabled...) + /// Hash Redis contenente i dati MP di una specifico TYPE (es StsatusMacchina, StateMachineIngressi, ...) /// /// /// @@ -588,11 +588,9 @@ namespace MapoDb string currHash = dtMaccHash(idxMacchina); // inizio con un bel reset... memLayer.ML.redFlushKey(currHash); - KeyValuePair[] answ = new KeyValuePair[14]; - DS_applicazione.DatiMacchineDataTable tabDt = MapoDb.obj.taDatiMacch.GetByIdx(idxMacchina); - DS_applicazione.StatoMacchineDataTable tabSt = MapoDb.obj.taStatoMacchine.GetDataByIdxMacchina(idxMacchina.ToString()); - // salvo tutti i valori Dt... - foreach (var item in tabDt) + KeyValuePair[] answ = new KeyValuePair[18]; + DS_applicazione.MSFDDataTable tabMSFD = MapoDb.obj.taMSFD.getByIdxMacc(idxMacchina.ToString()); + foreach (var item in tabMSFD) { // salvo 1:1 i valori... answ[0] = new KeyValuePair("palletChange", item.palletChange.ToString()); @@ -601,22 +599,25 @@ namespace MapoDb answ[3] = new KeyValuePair("simplePallet", item.simplePallet.ToString()); answ[4] = new KeyValuePair("insEnabled", item.insEnabled.ToString()); answ[5] = new KeyValuePair("sLogEnabled", item.sLogEnabled.ToString()); - } - // salvo tutti i valori St... - foreach (var item in tabSt) - { - // salvo 1:1 i valori... answ[6] = new KeyValuePair("IdxStato", item.IdxStato.ToString()); - answ[7] = new KeyValuePair("InizioStato", item.InizioStato.ToString()); - answ[8] = new KeyValuePair("Value", item.Value); + answ[7] = new KeyValuePair("IdxFamIn", item.IdxFamigliaIngresso.ToString()); + answ[8] = new KeyValuePair("IdxFamMacc", item.IdxFamiglia.ToString()); answ[9] = new KeyValuePair("CodArticolo", item.CodArticolo); answ[10] = new KeyValuePair("TempoCicloBase", item.TempoCicloBase.ToString()); answ[11] = new KeyValuePair("PzPalletProd", item.PzPalletProd.ToString()); answ[12] = new KeyValuePair("MatrOpr", item.MatrOpr.ToString()); - answ[13] = new KeyValuePair("pallet", item.pallet); + answ[13] = new KeyValuePair("IdxMicroStato", item.IdxMicroStato.ToString()); + answ[14] = new KeyValuePair("pallet", item.pallet); + answ[15] = new KeyValuePair("lastVal", item.lastVal); + answ[16] = new KeyValuePair("TCBase", item.TempoCicloBase.ToString()); + answ[17] = new KeyValuePair("CodMacc", item.codmacchina); } - // verifico il timeout (default 60 sec... - int redDtMacTOut = (memLayer.ML.CRI("redDtMacTOut") <= 0) ? 60 : memLayer.ML.CRI("redDtMacTOut"); + // verifico il timeout che cambia a seconda che sia vero o falso insEnabled... + int tOutShort = memLayer.ML.cdvi("TmOut.MS.S"); + int tOutLong = memLayer.ML.cdvi("TmOut.MS.L"); + int redDtMacTOut = (answ[4].Value=="true") ? tOutShort: tOutLong; + + //int redDtMacTOut = (memLayer.ML.CRI("redDtMacTOut") <= 0) ? 60 : memLayer.ML.CRI("redDtMacTOut"); // salvo in redis! memLayer.ML.redSaveHash(currHash, answ, redDtMacTOut); return answ; @@ -660,7 +661,7 @@ namespace MapoDb /// /// Resetta (rileggendo) i dati della State Machine ingressi nel formato /// key: cState_nVal (current MICRO-STATE + "_" + new Value) - /// value: iTipoEv_nState (IdxTipoEv da trasmettere + New MICRO-STATE + /// value: iTipoEv_nState (IdxTipoEv da trasmettere + New MICRO-STATE) /// /// /// @@ -682,9 +683,48 @@ namespace MapoDb i++; } // verifico il timeout (default 60 sec... - int redSMITOut = (memLayer.ML.CRI("redSMITOut") <= 0) ? 60 : memLayer.ML.CRI("redSMITOut"); + int tOut = (memLayer.ML.cdvi("TmOut.SMI") <= 0) ? 60 : memLayer.ML.cdvi("TmOut.SMI"); // salvo in redis! - memLayer.ML.redSaveHash(currHash, answ, redSMITOut); + memLayer.ML.redSaveHash(currHash, answ, tOut); + return answ; + } + /// + /// Restituisce il valore SPECIFICATO per la state machine ingressi + /// value: iTipoEv_nState (IdxTipoEv da trasmettere + New MICRO-STATE) + /// + /// + /// + /// + /// + public static string valoreSMI(int idxFamIn, int idxMicroStato, int valoreIn) + { + string currHash = hSMI(idxFamIn); + string field = string.Format("{0}_{1}", idxMicroStato, valoreIn); + return memLayer.ML.redGetHashField(currHash, field); + } + /// + /// Restituisce il valore booleano se la macchina sia abilitata all'input + /// + /// + /// + public static bool insEnab(int idxMacchina) + { + bool answ = false; + string currHash = dtMaccHash(idxMacchina); + string field = "insEnabled"; + try + { + // verifico se ne ho altrimenti ricarico... + bool trovato = memLayer.ML.redHashPresentSz(currHash); + if (!trovato) + { + // ricarico tabella! + KeyValuePair[] valori = DataLayer.mDatiMacchine(idxMacchina); + } + answ = Convert.ToBoolean(memLayer.ML.redGetHashField(currHash, field)); + } + catch + { } return answ; } diff --git a/MapoDb/MapoDb.cs b/MapoDb/MapoDb.cs index 2c13b59a..6a1561c5 100644 --- a/MapoDb/MapoDb.cs +++ b/MapoDb/MapoDb.cs @@ -88,6 +88,7 @@ namespace MapoDb taAnOpr = new DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter(); taDatiMacch = new DS_applicazioneTableAdapters.DatiMacchineTableAdapter(); taMSM = new DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter(); + taMSFD = new DS_applicazioneTableAdapters.MSFDTableAdapter(); taDatiMacchine = new DS_ProdTempiTableAdapters.DatiMacchineTableAdapter(); taTCRilevati = new DS_ProdTempiTableAdapters.TempiCicloRilevatiTableAdapter(); @@ -112,6 +113,7 @@ namespace MapoDb taAnOpr.Connection.ConnectionString = _connectionString; taDatiMacch.Connection.ConnectionString = _connectionString; taMSM.Connection.ConnectionString = _connectionString; + taMSFD.Connection.ConnectionString = _connectionString; taDatiMacchine.Connection.ConnectionString = _connectionString; taTCRilevati.Connection.ConnectionString = _connectionString; } @@ -299,6 +301,7 @@ namespace MapoDb public DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter taAnOpr; public DS_applicazioneTableAdapters.DatiMacchineTableAdapter taDatiMacch; public DS_applicazioneTableAdapters.MicroStatoMacchinaTableAdapter taMSM; + public DS_applicazioneTableAdapters.MSFDTableAdapter taMSFD; // area tempi ciclo public DS_ProdTempiTableAdapters.DatiMacchineTableAdapter taDatiMacchine;