diff --git a/.vs/MP-Admin/v14/.suo b/.vs/MP-Admin/v14/.suo index 34c8457f..a8a566be 100644 Binary files a/.vs/MP-Admin/v14/.suo and b/.vs/MP-Admin/v14/.suo differ diff --git a/.vs/MP-IO/v14/.suo b/.vs/MP-IO/v14/.suo index 5cabbca1..75c8e74b 100644 Binary files a/.vs/MP-IO/v14/.suo and b/.vs/MP-IO/v14/.suo differ diff --git a/.vs/MP-MON/v14/.suo b/.vs/MP-MON/v14/.suo index ebfb628a..09ee2cce 100644 Binary files a/.vs/MP-MON/v14/.suo and b/.vs/MP-MON/v14/.suo differ diff --git a/.vs/MP-Site/v14/.suo b/.vs/MP-Site/v14/.suo index 5c889fce..c2a2b8f9 100644 Binary files a/.vs/MP-Site/v14/.suo and b/.vs/MP-Site/v14/.suo differ diff --git a/MP-IO/inputIOB.aspx.cs b/MP-IO/inputIOB.aspx.cs index a29b3e8d..37c02c3e 100644 --- a/MP-IO/inputIOB.aspx.cs +++ b/MP-IO/inputIOB.aspx.cs @@ -65,7 +65,7 @@ namespace MP_IO dataOraEvento = dataOraEvento.AddTicks(-tiks); } } - catch(Exception exc) + catch (Exception exc) { logger.lg.scriviLog(string.Format("Errore calcolo ms evento/ora corrente da device remoto:{0}dtEve: {1}{0}dtCurr: {2}{0}{3}", Environment.NewLine, dtEve, dtCurr, exc), tipoLog.EXCEPTION); } @@ -75,6 +75,20 @@ namespace MP_IO { if (idxMacchina != "" && valore != "") { + // 2016.12.23 modifica x recording catena di input... + // se abilitato registro evento sul DB + int idxMacc = 0; + try + { + idxMacc = Convert.ToInt32(idxMacchina); + } + catch + { } + if (idxMacc > 0 && MapoDb.MapoDb.obj.sLogEnabled(idxMacc)) + { + MapoDb.MapoDb.obj.saveSigLog(idxMacchina, valore, dataOraEvento, contatore); + } + // continuo col resto try { // ora processo e salvo il valore del microstato... @@ -108,7 +122,6 @@ namespace MP_IO Response.Clear(); Response.Write(answ); Context.Response.End(); - } } } \ No newline at end of file diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs index ed6ab28c..57ea668c 100644 --- a/MapoDb/DS_applicazione.Designer.cs +++ b/MapoDb/DS_applicazione.Designer.cs @@ -70,6 +70,8 @@ namespace MapoDb { private ParetoDurateDataTable tableParetoDurate; + private SignalLogDataTable tableSignalLog; + private global::System.Data.DataRelation relationFK_Macchine2FamiglieMacchine_FamiglieMacchine; private global::System.Data.DataRelation relationFK_Macchine2FamiglieMacchine_Macchine; @@ -211,6 +213,9 @@ namespace MapoDb { if ((ds.Tables["ParetoDurate"] != null)) { base.Tables.Add(new ParetoDurateDataTable(ds.Tables["ParetoDurate"])); } + if ((ds.Tables["SignalLog"] != null)) { + base.Tables.Add(new SignalLogDataTable(ds.Tables["SignalLog"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -459,6 +464,16 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public SignalLogDataTable SignalLog { + get { + return this.tableSignalLog; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -595,6 +610,9 @@ namespace MapoDb { if ((ds.Tables["ParetoDurate"] != null)) { base.Tables.Add(new ParetoDurateDataTable(ds.Tables["ParetoDurate"])); } + if ((ds.Tables["SignalLog"] != null)) { + base.Tables.Add(new SignalLogDataTable(ds.Tables["SignalLog"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -766,6 +784,12 @@ namespace MapoDb { this.tableParetoDurate.InitVars(); } } + this.tableSignalLog = ((SignalLogDataTable)(base.Tables["SignalLog"])); + if ((initTable == true)) { + if ((this.tableSignalLog != null)) { + this.tableSignalLog.InitVars(); + } + } this.relationFK_Macchine2FamiglieMacchine_FamiglieMacchine = this.Relations["FK_Macchine2FamiglieMacchine_FamiglieMacchine"]; this.relationFK_Macchine2FamiglieMacchine_Macchine = this.Relations["FK_Macchine2FamiglieMacchine_Macchine"]; this.relationFK_TransizioneStati_FamiglieMacchine = this.Relations["FK_TransizioneStati_FamiglieMacchine"]; @@ -844,6 +868,8 @@ namespace MapoDb { base.Tables.Add(this.tableRemoteRebootLog); this.tableParetoDurate = new ParetoDurateDataTable(); base.Tables.Add(this.tableParetoDurate); + this.tableSignalLog = new SignalLogDataTable(); + base.Tables.Add(this.tableSignalLog); 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); @@ -1072,6 +1098,12 @@ namespace MapoDb { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeSignalLog() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -1196,6 +1228,9 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void ParetoDurateRowChangeEventHandler(object sender, ParetoDurateRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void SignalLogRowChangeEventHandler(object sender, SignalLogRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -6928,6 +6963,8 @@ namespace MapoDb { private global::System.Data.DataColumn columninsEnabled; + private global::System.Data.DataColumn columnsLogEnabled; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public DatiMacchineDataTable() { @@ -7033,6 +7070,14 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn sLogEnabledColumn { + get { + return this.columnsLogEnabled; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -7070,7 +7115,7 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public DatiMacchineRow AddDatiMacchineRow(int idxMacchina, bool palletChange, string kanban_A, string kanban_B, string serialPort, int refreshPeriod, bool simulazione, bool simplePallet, bool insEnabled) { + public DatiMacchineRow AddDatiMacchineRow(int idxMacchina, bool palletChange, string kanban_A, string kanban_B, string serialPort, int refreshPeriod, bool simulazione, bool simplePallet, bool insEnabled, bool sLogEnabled) { DatiMacchineRow rowDatiMacchineRow = ((DatiMacchineRow)(this.NewRow())); object[] columnValuesArray = new object[] { idxMacchina, @@ -7081,7 +7126,8 @@ namespace MapoDb { refreshPeriod, simulazione, simplePallet, - insEnabled}; + insEnabled, + sLogEnabled}; rowDatiMacchineRow.ItemArray = columnValuesArray; this.Rows.Add(rowDatiMacchineRow); return rowDatiMacchineRow; @@ -7120,6 +7166,7 @@ namespace MapoDb { this.columnsimulazione = base.Columns["simulazione"]; this.columnsimplePallet = base.Columns["simplePallet"]; this.columninsEnabled = base.Columns["insEnabled"]; + this.columnsLogEnabled = base.Columns["sLogEnabled"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -7143,6 +7190,8 @@ namespace MapoDb { base.Columns.Add(this.columnsimplePallet); this.columninsEnabled = new global::System.Data.DataColumn("insEnabled", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columninsEnabled); + this.columnsLogEnabled = new global::System.Data.DataColumn("sLogEnabled", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnsLogEnabled); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidxMacchina}, true)); this.columnidxMacchina.AllowDBNull = false; @@ -7150,6 +7199,7 @@ namespace MapoDb { this.columnkanban_A.MaxLength = 50; this.columnkanban_B.MaxLength = 50; this.columnserialPort.MaxLength = 50; + this.columnsLogEnabled.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8567,6 +8617,344 @@ namespace MapoDb { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class SignalLogDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidxMsg; + + private global::System.Data.DataColumn columndtCurr; + + private global::System.Data.DataColumn columnIdxMacchina; + + private global::System.Data.DataColumn columnvalore; + + private global::System.Data.DataColumn columndtEve; + + private global::System.Data.DataColumn columncontatore; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogDataTable() { + this.TableName = "SignalLog"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SignalLogDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected SignalLogDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn idxMsgColumn { + get { + return this.columnidxMsg; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn dtCurrColumn { + get { + return this.columndtCurr; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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", "4.0.0.0")] + public global::System.Data.DataColumn valoreColumn { + get { + return this.columnvalore; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn dtEveColumn { + get { + return this.columndtEve; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn contatoreColumn { + get { + return this.columncontatore; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogRow this[int index] { + get { + return ((SignalLogRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SignalLogRowChangeEventHandler SignalLogRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SignalLogRowChangeEventHandler SignalLogRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SignalLogRowChangeEventHandler SignalLogRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SignalLogRowChangeEventHandler SignalLogRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddSignalLogRow(SignalLogRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogRow AddSignalLogRow(System.DateTime dtCurr, string IdxMacchina, string valore, System.DateTime dtEve, int contatore) { + SignalLogRow rowSignalLogRow = ((SignalLogRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + dtCurr, + IdxMacchina, + valore, + dtEve, + contatore}; + rowSignalLogRow.ItemArray = columnValuesArray; + this.Rows.Add(rowSignalLogRow); + return rowSignalLogRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogRow FindByidxMsg(int idxMsg) { + return ((SignalLogRow)(this.Rows.Find(new object[] { + idxMsg}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + SignalLogDataTable cln = ((SignalLogDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new SignalLogDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnidxMsg = base.Columns["idxMsg"]; + this.columndtCurr = base.Columns["dtCurr"]; + this.columnIdxMacchina = base.Columns["IdxMacchina"]; + this.columnvalore = base.Columns["valore"]; + this.columndtEve = base.Columns["dtEve"]; + this.columncontatore = base.Columns["contatore"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnidxMsg = new global::System.Data.DataColumn("idxMsg", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidxMsg); + this.columndtCurr = new global::System.Data.DataColumn("dtCurr", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndtCurr); + this.columnIdxMacchina = new global::System.Data.DataColumn("IdxMacchina", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIdxMacchina); + this.columnvalore = new global::System.Data.DataColumn("valore", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnvalore); + this.columndtEve = new global::System.Data.DataColumn("dtEve", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndtEve); + this.columncontatore = new global::System.Data.DataColumn("contatore", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncontatore); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnidxMsg}, true)); + this.columnidxMsg.AutoIncrement = true; + this.columnidxMsg.AutoIncrementSeed = -1; + this.columnidxMsg.AutoIncrementStep = -1; + this.columnidxMsg.AllowDBNull = false; + this.columnidxMsg.ReadOnly = true; + this.columnidxMsg.Unique = true; + this.columndtCurr.AllowDBNull = false; + this.columnIdxMacchina.AllowDBNull = false; + this.columnIdxMacchina.MaxLength = 50; + this.columnvalore.AllowDBNull = false; + this.columnvalore.MaxLength = 50; + this.columncontatore.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogRow NewSignalLogRow() { + return ((SignalLogRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new SignalLogRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(SignalLogRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.SignalLogRowChanged != null)) { + this.SignalLogRowChanged(this, new SignalLogRowChangeEvent(((SignalLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.SignalLogRowChanging != null)) { + this.SignalLogRowChanging(this, new SignalLogRowChangeEvent(((SignalLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.SignalLogRowDeleted != null)) { + this.SignalLogRowDeleted(this, new SignalLogRowChangeEvent(((SignalLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.SignalLogRowDeleting != null)) { + this.SignalLogRowDeleting(this, new SignalLogRowChangeEvent(((SignalLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveSignalLogRow(SignalLogRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_applicazione ds = new DS_applicazione(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "SignalLogDataTable"; + 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. /// @@ -11266,6 +11654,17 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool sLogEnabled { + get { + return ((bool)(this[this.tableDatiMacchine.sLogEnabledColumn])); + } + set { + this[this.tableDatiMacchine.sLogEnabledColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IspalletChangeNull() { @@ -11892,6 +12291,104 @@ namespace MapoDb { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class SignalLogRow : global::System.Data.DataRow { + + private SignalLogDataTable tableSignalLog; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SignalLogRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableSignalLog = ((SignalLogDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int idxMsg { + get { + return ((int)(this[this.tableSignalLog.idxMsgColumn])); + } + set { + this[this.tableSignalLog.idxMsgColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public System.DateTime dtCurr { + get { + return ((global::System.DateTime)(this[this.tableSignalLog.dtCurrColumn])); + } + set { + this[this.tableSignalLog.dtCurrColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string IdxMacchina { + get { + return ((string)(this[this.tableSignalLog.IdxMacchinaColumn])); + } + set { + this[this.tableSignalLog.IdxMacchinaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string valore { + get { + return ((string)(this[this.tableSignalLog.valoreColumn])); + } + set { + this[this.tableSignalLog.valoreColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public System.DateTime dtEve { + get { + try { + return ((global::System.DateTime)(this[this.tableSignalLog.dtEveColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'dtEve\' in table \'SignalLog\' is DBNull.", e); + } + } + set { + this[this.tableSignalLog.dtEveColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int contatore { + get { + return ((int)(this[this.tableSignalLog.contatoreColumn])); + } + set { + this[this.tableSignalLog.contatoreColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsdtEveNull() { + return this.IsNull(this.tableSignalLog.dtEveColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetdtEveNull() { + this[this.tableSignalLog.dtEveColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -12673,6 +13170,40 @@ namespace MapoDb { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class SignalLogRowChangeEvent : global::System.EventArgs { + + private SignalLogRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogRowChangeEvent(SignalLogRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace MapoDb.DS_applicazioneTableAdapters { @@ -21749,10 +22280,11 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( tableMapping.ColumnMappings.Add("simulazione", "simulazione"); tableMapping.ColumnMappings.Add("simplePallet", "simplePallet"); tableMapping.ColumnMappings.Add("insEnabled", "insEnabled"); + tableMapping.ColumnMappings.Add("sLogEnabled", "sLogEnabled"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[DatiMacchine] WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[DatiMacchine] WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_palletChange", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); @@ -21771,9 +22303,10 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_simplePallet", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simplePallet", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_insEnabled", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_insEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_sLogEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sLogEnabled", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[DatiMacchine] ([idxMacchina], [palletChange], [kanban_A], [kanban_B], [serialPort], [refreshPeriod], [simulazione], [simplePallet], [insEnabled]) VALUES (@idxMacchina, @palletChange, @kanban_A, @kanban_B, @serialPort, @refreshPeriod, @simulazione, @simplePallet, @insEnabled)"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[DatiMacchine] ([idxMacchina], [palletChange], [kanban_A], [kanban_B], [serialPort], [refreshPeriod], [simulazione], [simplePallet], [insEnabled], [sLogEnabled]) VALUES (@idxMacchina, @palletChange, @kanban_A, @kanban_B, @serialPort, @refreshPeriod, @simulazione, @simplePallet, @insEnabled, @sLogEnabled)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -21784,9 +22317,10 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@simulazione", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simulazione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@simplePallet", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simplePallet", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@insEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sLogEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sLogEnabled", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[DatiMacchine] SET [idxMacchina] = @idxMacchina, [palletChange] = @palletChange, [kanban_A] = @kanban_A, [kanban_B] = @kanban_B, [serialPort] = @serialPort, [refreshPeriod] = @refreshPeriod, [simulazione] = @simulazione, [simplePallet] = @simplePallet, [insEnabled] = @insEnabled WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)))"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[DatiMacchine] SET [idxMacchina] = @idxMacchina, [palletChange] = @palletChange, [kanban_A] = @kanban_A, [kanban_B] = @kanban_B, [serialPort] = @serialPort, [refreshPeriod] = @refreshPeriod, [simulazione] = @simulazione, [simplePallet] = @simplePallet, [insEnabled] = @insEnabled, [sLogEnabled] = @sLogEnabled WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled))"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -21797,6 +22331,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@simulazione", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simulazione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@simplePallet", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simplePallet", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@insEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sLogEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sLogEnabled", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMacchina", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_palletChange", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_palletChange", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "palletChange", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); @@ -21814,6 +22349,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_simplePallet", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "simplePallet", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_insEnabled", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_insEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "insEnabled", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_sLogEnabled", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sLogEnabled", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -21833,7 +22369,9 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT *\r\nFROM DatiMacchine WHERE (idxMacchina = @idxMacchina)"; + this._commandCollection[1].CommandText = "SELECT idxMacchina, insEnabled, kanban_A, kanban_B, palletChange, refreshPeriod, " + + "sLogEnabled, serialPort, simplePallet, simulazione FROM DatiMacchine WHERE (idxM" + + "acchina = @idxMacchina)"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMacchina", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -21907,7 +22445,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_kanban_A, string Original_kanban_B, string Original_serialPort, global::System.Nullable Original_refreshPeriod, global::System.Nullable Original_simulazione, global::System.Nullable Original_simplePallet, global::System.Nullable Original_insEnabled) { + public virtual int Delete(int Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_kanban_A, string Original_kanban_B, string Original_serialPort, global::System.Nullable Original_refreshPeriod, global::System.Nullable Original_simulazione, global::System.Nullable Original_simplePallet, global::System.Nullable Original_insEnabled, bool Original_sLogEnabled) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxMacchina)); if ((Original_palletChange.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); @@ -21973,6 +22511,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; } + this.Adapter.DeleteCommand.Parameters[17].Value = ((bool)(Original_sLogEnabled)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -21993,7 +22532,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int idxMacchina, global::System.Nullable palletChange, string kanban_A, string kanban_B, string serialPort, global::System.Nullable refreshPeriod, global::System.Nullable simulazione, global::System.Nullable simplePallet, global::System.Nullable insEnabled) { + public virtual int Insert(int idxMacchina, global::System.Nullable palletChange, string kanban_A, string kanban_B, string serialPort, global::System.Nullable refreshPeriod, global::System.Nullable simulazione, global::System.Nullable simplePallet, global::System.Nullable insEnabled, bool sLogEnabled) { this.Adapter.InsertCommand.Parameters[0].Value = ((int)(idxMacchina)); if ((palletChange.HasValue == true)) { this.Adapter.InsertCommand.Parameters[1].Value = ((bool)(palletChange.Value)); @@ -22043,6 +22582,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( else { this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; } + this.Adapter.InsertCommand.Parameters[9].Value = ((bool)(sLogEnabled)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -22073,6 +22613,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable simulazione, global::System.Nullable simplePallet, global::System.Nullable insEnabled, + bool sLogEnabled, int Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_kanban_A, @@ -22081,7 +22622,8 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable Original_refreshPeriod, global::System.Nullable Original_simulazione, global::System.Nullable Original_simplePallet, - global::System.Nullable Original_insEnabled) { + global::System.Nullable Original_insEnabled, + bool Original_sLogEnabled) { this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(idxMacchina)); if ((palletChange.HasValue == true)) { this.Adapter.UpdateCommand.Parameters[1].Value = ((bool)(palletChange.Value)); @@ -22131,71 +22673,73 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( else { this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_idxMacchina)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(sLogEnabled)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_idxMacchina)); if ((Original_palletChange.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[11].Value = ((bool)(Original_palletChange.Value)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_palletChange.Value)); } else { - this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; } if ((Original_kanban_A == null)) { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_kanban_A)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_kanban_A)); } if ((Original_kanban_B == null)) { - this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_kanban_B)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_kanban_B)); } if ((Original_serialPort == null)) { - this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_serialPort)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_serialPort)); } if ((Original_refreshPeriod.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_refreshPeriod.Value)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(Original_refreshPeriod.Value)); } else { - this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; } if ((Original_simulazione.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[21].Value = ((bool)(Original_simulazione.Value)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((bool)(Original_simulazione.Value)); } else { - this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; } if ((Original_simplePallet.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[23].Value = ((bool)(Original_simplePallet.Value)); + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[24].Value = ((bool)(Original_simplePallet.Value)); } else { - this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; } if ((Original_insEnabled.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[25].Value = ((bool)(Original_insEnabled.Value)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[26].Value = ((bool)(Original_insEnabled.Value)); } else { - this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[26].Value = global::System.DBNull.Value; } + this.Adapter.UpdateCommand.Parameters[27].Value = ((bool)(Original_sLogEnabled)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -22225,6 +22769,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable simulazione, global::System.Nullable simplePallet, global::System.Nullable insEnabled, + bool sLogEnabled, int Original_idxMacchina, global::System.Nullable Original_palletChange, string Original_kanban_A, @@ -22233,8 +22778,9 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( global::System.Nullable Original_refreshPeriod, global::System.Nullable Original_simulazione, global::System.Nullable Original_simplePallet, - global::System.Nullable Original_insEnabled) { - return this.Update(Original_idxMacchina, palletChange, kanban_A, kanban_B, serialPort, refreshPeriod, simulazione, simplePallet, insEnabled, Original_idxMacchina, Original_palletChange, Original_kanban_A, Original_kanban_B, Original_serialPort, Original_refreshPeriod, Original_simulazione, Original_simplePallet, Original_insEnabled); + global::System.Nullable Original_insEnabled, + bool Original_sLogEnabled) { + return this.Update(Original_idxMacchina, palletChange, kanban_A, kanban_B, serialPort, refreshPeriod, simulazione, simplePallet, insEnabled, sLogEnabled, Original_idxMacchina, Original_palletChange, Original_kanban_A, Original_kanban_B, Original_serialPort, Original_refreshPeriod, Original_simulazione, Original_simplePallet, Original_insEnabled, Original_sLogEnabled); } } @@ -23805,6 +24351,376 @@ SELECT idxReboot, IdxMacchina, IPv4, Agent, DataOraBoot, macAddr FROM RemoteRebo return dataTable; } } + + /// + ///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 SignalLogTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SignalLogTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "SignalLog"; + tableMapping.ColumnMappings.Add("idxMsg", "idxMsg"); + tableMapping.ColumnMappings.Add("dtCurr", "dtCurr"); + tableMapping.ColumnMappings.Add("IdxMacchina", "IdxMacchina"); + tableMapping.ColumnMappings.Add("valore", "valore"); + tableMapping.ColumnMappings.Add("dtEve", "dtEve"); + tableMapping.ColumnMappings.Add("contatore", "contatore"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[SignalLog] WHERE (([idxMsg] = @Original_idxMsg) AND ([dtCurr] = @Original_dtCurr) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([valore] = @Original_valore) AND ((@IsNull_dtEve = 1 AND [dtEve] IS NULL) OR ([dtEve] = @Original_dtEve)) AND ([contatore] = @Original_contatore))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMsg", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMsg", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dtCurr", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtCurr", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dtEve", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEve", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dtEve", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEve", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_contatore", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contatore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[SignalLog] ([dtCurr], [IdxMacchina], [valore], [dtEve], [contatore]) VALUES (@dtCurr, @IdxMacchina, @valore, @dtEve, @contatore); +SELECT idxMsg, dtCurr, IdxMacchina, valore, dtEve, contatore FROM SignalLog WHERE (idxMsg = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtCurr", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtCurr", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtEve", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEve", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@contatore", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contatore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[SignalLog] SET [dtCurr] = @dtCurr, [IdxMacchina] = @IdxMacchina, [valore] = @valore, [dtEve] = @dtEve, [contatore] = @contatore WHERE (([idxMsg] = @Original_idxMsg) AND ([dtCurr] = @Original_dtCurr) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([valore] = @Original_valore) AND ((@IsNull_dtEve = 1 AND [dtEve] IS NULL) OR ([dtEve] = @Original_dtEve)) AND ([contatore] = @Original_contatore)); +SELECT idxMsg, dtCurr, IdxMacchina, valore, dtEve, contatore FROM SignalLog WHERE (idxMsg = @idxMsg)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtCurr", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtCurr", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtEve", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEve", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@contatore", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contatore", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxMsg", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxMsg", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dtCurr", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtCurr", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "valore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_dtEve", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEve", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dtEve", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEve", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_contatore", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "contatore", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxMsg", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idxMsg", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonProConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT idxMsg, dtCurr, IdxMacchina, valore, dtEve, contatore FROM dbo.SignalLog"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_applicazione.SignalLogDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_applicazione.SignalLogDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_applicazione.SignalLogDataTable dataTable = new DS_applicazione.SignalLogDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_applicazione.SignalLogDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_applicazione dataSet) { + return this.Adapter.Update(dataSet, "SignalLog"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_idxMsg, System.DateTime Original_dtCurr, string Original_IdxMacchina, string Original_valore, global::System.Nullable Original_dtEve, int Original_contatore) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxMsg)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_dtCurr)); + if ((Original_IdxMacchina == null)) { + throw new global::System.ArgumentNullException("Original_IdxMacchina"); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_IdxMacchina)); + } + if ((Original_valore == null)) { + throw new global::System.ArgumentNullException("Original_valore"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_valore)); + } + if ((Original_dtEve.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_dtEve.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_contatore)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(System.DateTime dtCurr, string IdxMacchina, string valore, global::System.Nullable dtEve, int contatore) { + this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(dtCurr)); + if ((IdxMacchina == null)) { + throw new global::System.ArgumentNullException("IdxMacchina"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(IdxMacchina)); + } + if ((valore == null)) { + throw new global::System.ArgumentNullException("valore"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(valore)); + } + if ((dtEve.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(dtEve.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(contatore)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(System.DateTime dtCurr, string IdxMacchina, string valore, global::System.Nullable dtEve, int contatore, int Original_idxMsg, System.DateTime Original_dtCurr, string Original_IdxMacchina, string Original_valore, global::System.Nullable Original_dtEve, int Original_contatore, int idxMsg) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((System.DateTime)(dtCurr)); + if ((IdxMacchina == null)) { + throw new global::System.ArgumentNullException("IdxMacchina"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(IdxMacchina)); + } + if ((valore == null)) { + throw new global::System.ArgumentNullException("valore"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(valore)); + } + if ((dtEve.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(dtEve.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(contatore)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_idxMsg)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_dtCurr)); + if ((Original_IdxMacchina == null)) { + throw new global::System.ArgumentNullException("Original_IdxMacchina"); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_IdxMacchina)); + } + if ((Original_valore == null)) { + throw new global::System.ArgumentNullException("Original_valore"); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_valore)); + } + if ((Original_dtEve.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((System.DateTime)(Original_dtEve.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_contatore)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(idxMsg)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(System.DateTime dtCurr, string IdxMacchina, string valore, global::System.Nullable dtEve, int contatore, int Original_idxMsg, System.DateTime Original_dtCurr, string Original_IdxMacchina, string Original_valore, global::System.Nullable Original_dtEve, int Original_contatore) { + return this.Update(dtCurr, IdxMacchina, valore, dtEve, contatore, Original_idxMsg, Original_dtCurr, Original_IdxMacchina, Original_valore, Original_dtEve, Original_contatore, Original_idxMsg); + } + } } #pragma warning restore 1591 \ No newline at end of file diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd index c80762de..c6cf20bc 100644 --- a/MapoDb/DS_applicazione.xsd +++ b/MapoDb/DS_applicazione.xsd @@ -1990,7 +1990,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( - DELETE FROM [dbo].[DatiMacchine] WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled))) + DELETE FROM [dbo].[DatiMacchine] WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled)) @@ -2009,12 +2009,13 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( + - INSERT INTO [dbo].[DatiMacchine] ([idxMacchina], [palletChange], [kanban_A], [kanban_B], [serialPort], [refreshPeriod], [simulazione], [simplePallet], [insEnabled]) VALUES (@idxMacchina, @palletChange, @kanban_A, @kanban_B, @serialPort, @refreshPeriod, @simulazione, @simplePallet, @insEnabled) + INSERT INTO [dbo].[DatiMacchine] ([idxMacchina], [palletChange], [kanban_A], [kanban_B], [serialPort], [refreshPeriod], [simulazione], [simplePallet], [insEnabled], [sLogEnabled]) VALUES (@idxMacchina, @palletChange, @kanban_A, @kanban_B, @serialPort, @refreshPeriod, @simulazione, @simplePallet, @insEnabled, @sLogEnabled) @@ -2025,6 +2026,7 @@ SELECT MatrOpr, Cognome, Nome, isAdmin, authKey FROM AnagraficaOperatori WHERE ( + @@ -2037,7 +2039,7 @@ FROM dbo.DatiMacchine - UPDATE [dbo].[DatiMacchine] SET [idxMacchina] = @idxMacchina, [palletChange] = @palletChange, [kanban_A] = @kanban_A, [kanban_B] = @kanban_B, [serialPort] = @serialPort, [refreshPeriod] = @refreshPeriod, [simulazione] = @simulazione, [simplePallet] = @simplePallet, [insEnabled] = @insEnabled WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled))) + UPDATE [dbo].[DatiMacchine] SET [idxMacchina] = @idxMacchina, [palletChange] = @palletChange, [kanban_A] = @kanban_A, [kanban_B] = @kanban_B, [serialPort] = @serialPort, [refreshPeriod] = @refreshPeriod, [simulazione] = @simulazione, [simplePallet] = @simplePallet, [insEnabled] = @insEnabled, [sLogEnabled] = @sLogEnabled WHERE (([idxMacchina] = @Original_idxMacchina) AND ((@IsNull_palletChange = 1 AND [palletChange] IS NULL) OR ([palletChange] = @Original_palletChange)) AND ((@IsNull_kanban_A = 1 AND [kanban_A] IS NULL) OR ([kanban_A] = @Original_kanban_A)) AND ((@IsNull_kanban_B = 1 AND [kanban_B] IS NULL) OR ([kanban_B] = @Original_kanban_B)) AND ((@IsNull_serialPort = 1 AND [serialPort] IS NULL) OR ([serialPort] = @Original_serialPort)) AND ((@IsNull_refreshPeriod = 1 AND [refreshPeriod] IS NULL) OR ([refreshPeriod] = @Original_refreshPeriod)) AND ((@IsNull_simulazione = 1 AND [simulazione] IS NULL) OR ([simulazione] = @Original_simulazione)) AND ((@IsNull_simplePallet = 1 AND [simplePallet] IS NULL) OR ([simplePallet] = @Original_simplePallet)) AND ((@IsNull_insEnabled = 1 AND [insEnabled] IS NULL) OR ([insEnabled] = @Original_insEnabled)) AND ([sLogEnabled] = @Original_sLogEnabled)) @@ -2048,6 +2050,7 @@ FROM dbo.DatiMacchine + @@ -2065,6 +2068,7 @@ FROM dbo.DatiMacchine + @@ -2080,13 +2084,13 @@ FROM dbo.DatiMacchine + - SELECT * -FROM DatiMacchine WHERE (idxMacchina = @idxMacchina) + SELECT idxMacchina, insEnabled, kanban_A, kanban_B, palletChange, refreshPeriod, sLogEnabled, serialPort, simplePallet, simulazione FROM DatiMacchine WHERE (idxMacchina = @idxMacchina) @@ -2411,6 +2415,75 @@ SELECT idxReboot, IdxMacchina, IPv4, Agent, DataOraBoot, macAddr FROM RemoteRebo + + + + + + DELETE FROM [dbo].[SignalLog] WHERE (([idxMsg] = @Original_idxMsg) AND ([dtCurr] = @Original_dtCurr) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([valore] = @Original_valore) AND ((@IsNull_dtEve = 1 AND [dtEve] IS NULL) OR ([dtEve] = @Original_dtEve)) AND ([contatore] = @Original_contatore)) + + + + + + + + + + + + + + INSERT INTO [dbo].[SignalLog] ([dtCurr], [IdxMacchina], [valore], [dtEve], [contatore]) VALUES (@dtCurr, @IdxMacchina, @valore, @dtEve, @contatore); +SELECT idxMsg, dtCurr, IdxMacchina, valore, dtEve, contatore FROM SignalLog WHERE (idxMsg = SCOPE_IDENTITY()) + + + + + + + + + + + + SELECT idxMsg, dtCurr, IdxMacchina, valore, dtEve, contatore FROM dbo.SignalLog + + + + + + UPDATE [dbo].[SignalLog] SET [dtCurr] = @dtCurr, [IdxMacchina] = @IdxMacchina, [valore] = @valore, [dtEve] = @dtEve, [contatore] = @contatore WHERE (([idxMsg] = @Original_idxMsg) AND ([dtCurr] = @Original_dtCurr) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([valore] = @Original_valore) AND ((@IsNull_dtEve = 1 AND [dtEve] IS NULL) OR ([dtEve] = @Original_dtEve)) AND ([contatore] = @Original_contatore)); +SELECT idxMsg, dtCurr, IdxMacchina, valore, dtEve, contatore FROM SignalLog WHERE (idxMsg = @idxMsg) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2899,6 +2972,7 @@ SELECT idxReboot, IdxMacchina, IPv4, Agent, DataOraBoot, macAddr FROM RemoteRebo + @@ -3013,6 +3087,30 @@ SELECT idxReboot, IdxMacchina, IPv4, Agent, DataOraBoot, macAddr FROM RemoteRebo + + + + + + + + + + + + + + + + + + + + + + + + @@ -3120,6 +3218,10 @@ SELECT idxReboot, IdxMacchina, IPv4, Agent, DataOraBoot, macAddr FROM RemoteRebo + + + + diff --git a/MapoDb/DS_applicazione.xss b/MapoDb/DS_applicazione.xss index 7f8eb0ee..bfe91843 100644 --- a/MapoDb/DS_applicazione.xss +++ b/MapoDb/DS_applicazione.xss @@ -4,34 +4,35 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + 667 @@ -43,7 +44,7 @@ - + 699 @@ -55,7 +56,7 @@ - + 754 @@ -67,7 +68,7 @@ - + 636 @@ -83,7 +84,7 @@ - + 386 @@ -99,7 +100,7 @@ - + 322 @@ -111,7 +112,7 @@ - + 659 @@ -127,7 +128,7 @@ - + 872 @@ -139,7 +140,7 @@ - + 814 @@ -151,7 +152,7 @@ - + 1285 @@ -175,7 +176,7 @@ - + 1285 @@ -187,7 +188,7 @@ - + 298 @@ -199,7 +200,7 @@ - + 610 @@ -211,7 +212,7 @@ - + 619 @@ -223,7 +224,7 @@ - + 1444 @@ -235,7 +236,7 @@ - + 716 @@ -247,7 +248,7 @@ - + 943 @@ -259,7 +260,7 @@ - + 1285 @@ -279,7 +280,7 @@ - + 943 @@ -291,7 +292,7 @@ - + 965 @@ -307,7 +308,7 @@ - + 1108 @@ -319,7 +320,7 @@ - + 982 diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index d4373a1e..00f923ab 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -28,6 +28,7 @@ namespace MapoDb public DS_applicazioneTableAdapters.AnagraficaOperatori2insTableAdapter taOp2ins; public DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter taTranIngr; public DS_applicazioneTableAdapters.RemoteRebootLogTableAdapter taRemReb; + public DS_applicazioneTableAdapters.SignalLogTableAdapter taSigLog; // Table adapter x DS_ProdTempi public DS_ProdTempiTableAdapters.AnagArticoliTableAdapter taAnagArt; public DS_ProdTempiTableAdapters.ODLTableAdapter taODL; @@ -71,6 +72,7 @@ namespace MapoDb taOp2ins = new DS_applicazioneTableAdapters.AnagraficaOperatori2insTableAdapter(); taTranIngr = new DS_applicazioneTableAdapters.TransizioneIngressiTableAdapter(); taRemReb = new DS_applicazioneTableAdapters.RemoteRebootLogTableAdapter(); + taSigLog = new DS_applicazioneTableAdapters.SignalLogTableAdapter(); taAnagArt = new DS_ProdTempiTableAdapters.AnagArticoliTableAdapter(); taODL = new DS_ProdTempiTableAdapters.ODLTableAdapter(); taDatiMacchine = new DS_ProdTempiTableAdapters.DatiMacchineTableAdapter(); @@ -112,6 +114,7 @@ namespace MapoDb taOp2ins.Connection.ConnectionString = connectionString; taTranIngr.Connection.ConnectionString = connectionString; taRemReb.Connection.ConnectionString = connectionString; + taSigLog.Connection.ConnectionString = connectionString; taAnagArt.Connection.ConnectionString = connectionString; taODL.Connection.ConnectionString = connectionString; taDatiMacchine.Connection.ConnectionString = connectionString; diff --git a/MapoDb/MapoDb.cs b/MapoDb/MapoDb.cs index e00c77f6..2a10ed25 100644 --- a/MapoDb/MapoDb.cs +++ b/MapoDb/MapoDb.cs @@ -386,7 +386,7 @@ namespace MapoDb return answ; } /// - /// restituisce boolean se la amcchian sia abilitata x inserimento dati (tab DatiMacchine) + /// restituisce boolean se la macchina sia abilitata x inserimento dati (tab DatiMacchine) /// /// /// @@ -402,6 +402,41 @@ namespace MapoDb return answ; } /// + /// restituisce boolean se la macchina sia abilitata x registrazione segnali in input (tab DatiMacchine) + /// + /// + /// + public bool sLogEnabled(int idxMacchina) + { + bool answ = false; + try + { + answ = ((DS_applicazione.DatiMacchineRow)taDatiMacch.GetByIdx(idxMacchina)[0]).sLogEnabled; + } + catch + { } + return answ; + } + /// + /// salva il segnale di "microstato" + /// + /// idx macchina + /// valore ingresso + /// data-ora evento (server) + /// sequenza dati inviati + /// + public void saveSigLog(string idxMacchina, string valore, DateTime dtEve, string contatore) + { + int cont = 0; + try + { + cont = Convert.ToInt32(contatore); + } + catch + { } + DataLayer.obj.taSigLog.Insert(DateTime.Now, idxMacchina, valore, dtEve, cont); + } + /// /// controlla se da il segnale di "microstato" deriva un evento da generare - modalità OFFLINE /// /// idx macchina