From f1e03db5633382779ec3a342a3feb4bf3a4f307c Mon Sep 17 00:00:00 2001 From: Luc Vandenbroucke Date: Thu, 6 Feb 2020 09:37:51 +0100 Subject: [PATCH] comments, event text --- EpdBase/EpdBase.cpp | 22 +- eDosStation/DataSet1.Designer.cs | 1179 ++++++++++++++++++++++++++++++ eDosStation/DataSet1.xsd | 142 +++- eDosStation/EntryBadge.xaml | 24 + eDosStation/EntryBadge.xaml.cs | 110 ++- eDosStation/MainWindow.xaml | 19 +- eDosStation/MainWindow.xaml.cs | 7 + eDosStation/Station.cs | 51 +- 8 files changed, 1500 insertions(+), 54 deletions(-) diff --git a/EpdBase/EpdBase.cpp b/EpdBase/EpdBase.cpp index 871cb5c..ba4ecfe 100644 --- a/EpdBase/EpdBase.cpp +++ b/EpdBase/EpdBase.cpp @@ -20,7 +20,6 @@ DWORD EpdBase::Epd2U::StartCom() if (InitRv == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData); else { CommsInitialized = 1; - //SetDiscoveryExpirationPeriod(port, DiscoveryExpirationPeriod); } return Error; } @@ -30,7 +29,6 @@ EpdBase::Epd2U::~Epd2U() DeinitComms(port); } - int EpdBase::Epd2U::StartDiscover() { System::Diagnostics::Trace::WriteLine("StartDiscover"); @@ -113,23 +111,23 @@ void EpdBase::Epd2U::DecodeStatus() WORD EpdBase::Epd2U::ReadStatus() { Error = 0; ReadStatusRV = 0; - memset(WearerID, 0, WearerIDLength+1); - memset(WearerName, 0, WearerNameLength+1); + memset(WearerID, 0, WearerIDLength + 1); + memset(WearerName, 0, WearerNameLength + 1); EpdClock = RealTime = IssueCount = OffTime = OperatingStatus = ErrorStatus = AlarmStatus = OtherAlarms = EEPROMBadSectors = 0; ErrorSource = ErrorReason = ErrorData = 0; EpdID = HardVersion = SoftVersion = FunctionFlags = 0; CommitRV = ReadEpdStatus(&EpdClock, &RealTime, &IssueCount, &OffTime, &OperatingStatus, &ErrorStatus, &AlarmStatus, &OtherAlarms, &EEPROMBadSectors); - if (CommitRV==1) CommitRV= ReadEpdID( + if (CommitRV == 1) CommitRV = ReadEpdID( &EpdID, - &HardVersion, + &HardVersion, &SoftVersion, &FunctionFlags); - if (CommitRV==1) CommitRV = Commit(); - if(CommitRV == 0) { + if (CommitRV == 1) CommitRV = Commit(); + if (CommitRV == 0) { Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData); - ReadStatusRV= ErrorReason; + ReadStatusRV = ErrorReason; return 0; } else { @@ -140,14 +138,14 @@ WORD EpdBase::Epd2U::ReadStatus() DecodeFunctionFlags(); } - if (CommitRV == 1 && EPDIssued == 1) + if (CommitRV == 1 && EPDIssued == 1) { CommitRV = ReadWearer( WearerID, WearerIDLength, WearerName, WearerNameLength); - if(CommitRV==1) CommitRV = Commit(); + if (CommitRV == 1) CommitRV = Commit(); if (CommitRV == 0) { Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData); ReadStatusRV = ErrorReason; @@ -158,7 +156,7 @@ WORD EpdBase::Epd2U::ReadStatus() if (WearerID[i] == 0xb) WearerID[i] = '0'; else WearerID[i] |= 0x30; } } - return CommitRV; + return CommitRV; } WORD EpdBase::Epd2U::EPDReadExtraStatus() diff --git a/eDosStation/DataSet1.Designer.cs b/eDosStation/DataSet1.Designer.cs index 578d920..5344fd3 100644 --- a/eDosStation/DataSet1.Designer.cs +++ b/eDosStation/DataSet1.Designer.cs @@ -28,6 +28,8 @@ namespace eDosStation { private GetTaskInfoDataTable tableGetTaskInfo; + private CommentOnEventDataTable tableCommentOnEvent; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -62,6 +64,9 @@ namespace eDosStation { if ((ds.Tables["GetTaskInfo"] != null)) { base.Tables.Add(new GetTaskInfoDataTable(ds.Tables["GetTaskInfo"])); } + if ((ds.Tables["CommentOnEvent"] != null)) { + base.Tables.Add(new CommentOnEventDataTable(ds.Tables["CommentOnEvent"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -100,6 +105,16 @@ namespace eDosStation { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public CommentOnEventDataTable CommentOnEvent { + get { + return this.tableCommentOnEvent; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -173,6 +188,9 @@ namespace eDosStation { if ((ds.Tables["GetTaskInfo"] != null)) { base.Tables.Add(new GetTaskInfoDataTable(ds.Tables["GetTaskInfo"])); } + if ((ds.Tables["CommentOnEvent"] != null)) { + base.Tables.Add(new CommentOnEventDataTable(ds.Tables["CommentOnEvent"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -218,6 +236,12 @@ namespace eDosStation { this.tableGetTaskInfo.InitVars(); } } + this.tableCommentOnEvent = ((CommentOnEventDataTable)(base.Tables["CommentOnEvent"])); + if ((initTable == true)) { + if ((this.tableCommentOnEvent != null)) { + this.tableCommentOnEvent.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -232,6 +256,8 @@ namespace eDosStation { base.Tables.Add(this.tableGetTaskList); this.tableGetTaskInfo = new GetTaskInfoDataTable(); base.Tables.Add(this.tableGetTaskInfo); + this.tableCommentOnEvent = new CommentOnEventDataTable(); + base.Tables.Add(this.tableCommentOnEvent); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -246,6 +272,12 @@ namespace eDosStation { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private bool ShouldSerializeCommentOnEvent() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -307,6 +339,9 @@ namespace eDosStation { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public delegate void GetTaskInfoRowChangeEventHandler(object sender, GetTaskInfoRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public delegate void CommentOnEventRowChangeEventHandler(object sender, CommentOnEventRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -1289,6 +1324,357 @@ namespace eDosStation { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class CommentOnEventDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnID_CommnentOnEvent; + + private global::System.Data.DataColumn columnTriggerTable; + + private global::System.Data.DataColumn columnTriggerField; + + private global::System.Data.DataColumn columnTriggerStatus; + + private global::System.Data.DataColumn columnComment_FR; + + private global::System.Data.DataColumn columnComment_NL; + + private global::System.Data.DataColumn columnComment_EN; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventDataTable() { + this.TableName = "CommentOnEvent"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal CommentOnEventDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected CommentOnEventDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn ID_CommnentOnEventColumn { + get { + return this.columnID_CommnentOnEvent; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn TriggerTableColumn { + get { + return this.columnTriggerTable; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn TriggerFieldColumn { + get { + return this.columnTriggerField; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn TriggerStatusColumn { + get { + return this.columnTriggerStatus; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn Comment_FRColumn { + get { + return this.columnComment_FR; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn Comment_NLColumn { + get { + return this.columnComment_NL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn Comment_ENColumn { + get { + return this.columnComment_EN; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventRow this[int index] { + get { + return ((CommentOnEventRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event CommentOnEventRowChangeEventHandler CommentOnEventRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event CommentOnEventRowChangeEventHandler CommentOnEventRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event CommentOnEventRowChangeEventHandler CommentOnEventRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event CommentOnEventRowChangeEventHandler CommentOnEventRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void AddCommentOnEventRow(CommentOnEventRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventRow AddCommentOnEventRow(string TriggerTable, string TriggerField, bool TriggerStatus, string Comment_FR, string Comment_NL, string Comment_EN) { + CommentOnEventRow rowCommentOnEventRow = ((CommentOnEventRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + TriggerTable, + TriggerField, + TriggerStatus, + Comment_FR, + Comment_NL, + Comment_EN}; + rowCommentOnEventRow.ItemArray = columnValuesArray; + this.Rows.Add(rowCommentOnEventRow); + return rowCommentOnEventRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventRow FindByID_CommnentOnEvent(int ID_CommnentOnEvent) { + return ((CommentOnEventRow)(this.Rows.Find(new object[] { + ID_CommnentOnEvent}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public override global::System.Data.DataTable Clone() { + CommentOnEventDataTable cln = ((CommentOnEventDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new CommentOnEventDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal void InitVars() { + this.columnID_CommnentOnEvent = base.Columns["ID_CommnentOnEvent"]; + this.columnTriggerTable = base.Columns["TriggerTable"]; + this.columnTriggerField = base.Columns["TriggerField"]; + this.columnTriggerStatus = base.Columns["TriggerStatus"]; + this.columnComment_FR = base.Columns["Comment_FR"]; + this.columnComment_NL = base.Columns["Comment_NL"]; + this.columnComment_EN = base.Columns["Comment_EN"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitClass() { + this.columnID_CommnentOnEvent = new global::System.Data.DataColumn("ID_CommnentOnEvent", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnID_CommnentOnEvent); + this.columnTriggerTable = new global::System.Data.DataColumn("TriggerTable", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTriggerTable); + this.columnTriggerField = new global::System.Data.DataColumn("TriggerField", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTriggerField); + this.columnTriggerStatus = new global::System.Data.DataColumn("TriggerStatus", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTriggerStatus); + this.columnComment_FR = new global::System.Data.DataColumn("Comment_FR", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnComment_FR); + this.columnComment_NL = new global::System.Data.DataColumn("Comment_NL", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnComment_NL); + this.columnComment_EN = new global::System.Data.DataColumn("Comment_EN", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnComment_EN); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnID_CommnentOnEvent}, true)); + this.columnID_CommnentOnEvent.AutoIncrement = true; + this.columnID_CommnentOnEvent.AutoIncrementSeed = -1; + this.columnID_CommnentOnEvent.AutoIncrementStep = -1; + this.columnID_CommnentOnEvent.AllowDBNull = false; + this.columnID_CommnentOnEvent.ReadOnly = true; + this.columnID_CommnentOnEvent.Unique = true; + this.columnTriggerTable.MaxLength = 100; + this.columnTriggerField.MaxLength = 100; + this.columnComment_FR.MaxLength = 5000; + this.columnComment_NL.MaxLength = 5000; + this.columnComment_EN.MaxLength = 5000; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventRow NewCommentOnEventRow() { + return ((CommentOnEventRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new CommentOnEventRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(CommentOnEventRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.CommentOnEventRowChanged != null)) { + this.CommentOnEventRowChanged(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.CommentOnEventRowChanging != null)) { + this.CommentOnEventRowChanging(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.CommentOnEventRowDeleted != null)) { + this.CommentOnEventRowDeleted(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.CommentOnEventRowDeleting != null)) { + this.CommentOnEventRowDeleting(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void RemoveCommentOnEventRow(CommentOnEventRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DataSet1 ds = new DataSet1(); + 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 = "CommentOnEventDataTable"; + 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. /// @@ -2147,6 +2533,200 @@ namespace eDosStation { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class CommentOnEventRow : global::System.Data.DataRow { + + private CommentOnEventDataTable tableCommentOnEvent; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal CommentOnEventRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableCommentOnEvent = ((CommentOnEventDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int ID_CommnentOnEvent { + get { + return ((int)(this[this.tableCommentOnEvent.ID_CommnentOnEventColumn])); + } + set { + this[this.tableCommentOnEvent.ID_CommnentOnEventColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string TriggerTable { + get { + try { + return ((string)(this[this.tableCommentOnEvent.TriggerTableColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'TriggerTable\' in table \'CommentOnEvent\' is DBNull.", e); + } + } + set { + this[this.tableCommentOnEvent.TriggerTableColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string TriggerField { + get { + try { + return ((string)(this[this.tableCommentOnEvent.TriggerFieldColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'TriggerField\' in table \'CommentOnEvent\' is DBNull.", e); + } + } + set { + this[this.tableCommentOnEvent.TriggerFieldColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool TriggerStatus { + get { + try { + return ((bool)(this[this.tableCommentOnEvent.TriggerStatusColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'TriggerStatus\' in table \'CommentOnEvent\' is DBNull.", e); + } + } + set { + this[this.tableCommentOnEvent.TriggerStatusColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string Comment_FR { + get { + try { + return ((string)(this[this.tableCommentOnEvent.Comment_FRColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Comment_FR\' in table \'CommentOnEvent\' is DBNull.", e); + } + } + set { + this[this.tableCommentOnEvent.Comment_FRColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string Comment_NL { + get { + try { + return ((string)(this[this.tableCommentOnEvent.Comment_NLColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Comment_NL\' in table \'CommentOnEvent\' is DBNull.", e); + } + } + set { + this[this.tableCommentOnEvent.Comment_NLColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string Comment_EN { + get { + try { + return ((string)(this[this.tableCommentOnEvent.Comment_ENColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Comment_EN\' in table \'CommentOnEvent\' is DBNull.", e); + } + } + set { + this[this.tableCommentOnEvent.Comment_ENColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsTriggerTableNull() { + return this.IsNull(this.tableCommentOnEvent.TriggerTableColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetTriggerTableNull() { + this[this.tableCommentOnEvent.TriggerTableColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsTriggerFieldNull() { + return this.IsNull(this.tableCommentOnEvent.TriggerFieldColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetTriggerFieldNull() { + this[this.tableCommentOnEvent.TriggerFieldColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsTriggerStatusNull() { + return this.IsNull(this.tableCommentOnEvent.TriggerStatusColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetTriggerStatusNull() { + this[this.tableCommentOnEvent.TriggerStatusColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsComment_FRNull() { + return this.IsNull(this.tableCommentOnEvent.Comment_FRColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetComment_FRNull() { + this[this.tableCommentOnEvent.Comment_FRColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsComment_NLNull() { + return this.IsNull(this.tableCommentOnEvent.Comment_NLColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetComment_NLNull() { + this[this.tableCommentOnEvent.Comment_NLColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsComment_ENNull() { + return this.IsNull(this.tableCommentOnEvent.Comment_ENColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetComment_ENNull() { + this[this.tableCommentOnEvent.Comment_ENColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -2214,6 +2794,40 @@ namespace eDosStation { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public class CommentOnEventRowChangeEvent : global::System.EventArgs { + + private CommentOnEventRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventRowChangeEvent(CommentOnEventRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace eDosStation.DataSet1TableAdapters { @@ -2611,6 +3225,505 @@ namespace eDosStation.DataSet1TableAdapters { } } + /// + ///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 CommentOnEventTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public CommentOnEventTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "CommentOnEvent"; + tableMapping.ColumnMappings.Add("ID_CommnentOnEvent", "ID_CommnentOnEvent"); + tableMapping.ColumnMappings.Add("TriggerTable", "TriggerTable"); + tableMapping.ColumnMappings.Add("TriggerField", "TriggerField"); + tableMapping.ColumnMappings.Add("TriggerStatus", "TriggerStatus"); + tableMapping.ColumnMappings.Add("Comment_FR", "Comment_FR"); + tableMapping.ColumnMappings.Add("Comment_NL", "Comment_NL"); + tableMapping.ColumnMappings.Add("Comment_EN", "Comment_EN"); + 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 [HPH_REMS_new].[dbo].[CommentOnEvent] WHERE (([ID_CommnentOnEvent] = @Original_ID_CommnentOnEvent) AND ((@IsNull_TriggerTable = 1 AND [TriggerTable] IS NULL) OR ([TriggerTable] = @Original_TriggerTable)) AND ((@IsNull_TriggerField = 1 AND [TriggerField] IS NULL) OR ([TriggerField] = @Original_TriggerField)) AND ((@IsNull_TriggerStatus = 1 AND [TriggerStatus] IS NULL) OR ([TriggerStatus] = @Original_TriggerStatus)) AND ((@IsNull_Comment_FR = 1 AND [Comment_FR] IS NULL) OR ([Comment_FR] = @Original_Comment_FR)) AND ((@IsNull_Comment_NL = 1 AND [Comment_NL] IS NULL) OR ([Comment_NL] = @Original_Comment_NL)) AND ((@IsNull_Comment_EN = 1 AND [Comment_EN] IS NULL) OR ([Comment_EN] = @Original_Comment_EN)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID_CommnentOnEvent", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID_CommnentOnEvent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TriggerTable", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerTable", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TriggerTable", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerTable", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TriggerField", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerField", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TriggerField", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerField", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TriggerStatus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerStatus", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TriggerStatus", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerStatus", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Comment_FR", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_FR", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Comment_FR", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_FR", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Comment_NL", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_NL", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Comment_NL", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_NL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Comment_EN", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_EN", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Comment_EN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_EN", 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 [HPH_REMS_new].[dbo].[CommentOnEvent] ([TriggerTable], [TriggerField], [TriggerStatus], [Comment_FR], [Comment_NL], [Comment_EN]) VALUES (@TriggerTable, @TriggerField, @TriggerStatus, @Comment_FR, @Comment_NL, @Comment_EN); +SELECT ID_CommnentOnEvent, TriggerTable, TriggerField, TriggerStatus, Comment_FR, Comment_NL, Comment_EN FROM CommentOnEvent WHERE (ID_CommnentOnEvent = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TriggerTable", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerTable", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TriggerField", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerField", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TriggerStatus", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerStatus", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Comment_FR", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_FR", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Comment_NL", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_NL", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Comment_EN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_EN", 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 [HPH_REMS_new].[dbo].[CommentOnEvent] SET [TriggerTable] = @TriggerTable, [TriggerField] = @TriggerField, [TriggerStatus] = @TriggerStatus, [Comment_FR] = @Comment_FR, [Comment_NL] = @Comment_NL, [Comment_EN] = @Comment_EN WHERE (([ID_CommnentOnEvent] = @Original_ID_CommnentOnEvent) AND ((@IsNull_TriggerTable = 1 AND [TriggerTable] IS NULL) OR ([TriggerTable] = @Original_TriggerTable)) AND ((@IsNull_TriggerField = 1 AND [TriggerField] IS NULL) OR ([TriggerField] = @Original_TriggerField)) AND ((@IsNull_TriggerStatus = 1 AND [TriggerStatus] IS NULL) OR ([TriggerStatus] = @Original_TriggerStatus)) AND ((@IsNull_Comment_FR = 1 AND [Comment_FR] IS NULL) OR ([Comment_FR] = @Original_Comment_FR)) AND ((@IsNull_Comment_NL = 1 AND [Comment_NL] IS NULL) OR ([Comment_NL] = @Original_Comment_NL)) AND ((@IsNull_Comment_EN = 1 AND [Comment_EN] IS NULL) OR ([Comment_EN] = @Original_Comment_EN))); +SELECT ID_CommnentOnEvent, TriggerTable, TriggerField, TriggerStatus, Comment_FR, Comment_NL, Comment_EN FROM CommentOnEvent WHERE (ID_CommnentOnEvent = @ID_CommnentOnEvent)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TriggerTable", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerTable", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TriggerField", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerField", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TriggerStatus", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerStatus", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Comment_FR", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_FR", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Comment_NL", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_NL", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Comment_EN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_EN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID_CommnentOnEvent", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID_CommnentOnEvent", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TriggerTable", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerTable", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TriggerTable", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerTable", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TriggerField", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerField", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TriggerField", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerField", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TriggerStatus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerStatus", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TriggerStatus", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TriggerStatus", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Comment_FR", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_FR", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Comment_FR", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_FR", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Comment_NL", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_NL", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Comment_NL", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_NL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Comment_EN", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_EN", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Comment_EN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Comment_EN", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID_CommnentOnEvent", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID_CommnentOnEvent", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.RemoteSQL; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT [ID_CommnentOnEvent]\r\n ,[TriggerTable]\r\n ,[TriggerField]\r\n " + + ",[TriggerStatus]\r\n ,[Comment_FR]\r\n ,[Comment_NL]\r\n ,[Comment_EN]\r" + + "\n FROM [HPH_REMS_new].[dbo].[CommentOnEvent]"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DataSet1.CommentOnEventDataTable 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DataSet1.CommentOnEventDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DataSet1.CommentOnEventDataTable dataTable = new DataSet1.CommentOnEventDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DataSet1.CommentOnEventDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DataSet1 dataSet) { + return this.Adapter.Update(dataSet, "CommentOnEvent"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + 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", "15.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", "15.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_ID_CommnentOnEvent, string Original_TriggerTable, string Original_TriggerField, global::System.Nullable Original_TriggerStatus, string Original_Comment_FR, string Original_Comment_NL, string Original_Comment_EN) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID_CommnentOnEvent)); + if ((Original_TriggerTable == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_TriggerTable)); + } + if ((Original_TriggerField == null)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_TriggerField)); + } + if ((Original_TriggerStatus.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((bool)(Original_TriggerStatus.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_Comment_FR == null)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Comment_FR)); + } + if ((Original_Comment_NL == null)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Comment_NL)); + } + if ((Original_Comment_EN == null)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Comment_EN)); + } + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string TriggerTable, string TriggerField, global::System.Nullable TriggerStatus, string Comment_FR, string Comment_NL, string Comment_EN) { + if ((TriggerTable == null)) { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(TriggerTable)); + } + if ((TriggerField == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(TriggerField)); + } + if ((TriggerStatus.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(TriggerStatus.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Comment_FR == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Comment_FR)); + } + if ((Comment_NL == null)) { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Comment_NL)); + } + if ((Comment_EN == null)) { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Comment_EN)); + } + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string TriggerTable, string TriggerField, global::System.Nullable TriggerStatus, string Comment_FR, string Comment_NL, string Comment_EN, int Original_ID_CommnentOnEvent, string Original_TriggerTable, string Original_TriggerField, global::System.Nullable Original_TriggerStatus, string Original_Comment_FR, string Original_Comment_NL, string Original_Comment_EN, int ID_CommnentOnEvent) { + if ((TriggerTable == null)) { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(TriggerTable)); + } + if ((TriggerField == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(TriggerField)); + } + if ((TriggerStatus.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(TriggerStatus.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Comment_FR == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Comment_FR)); + } + if ((Comment_NL == null)) { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Comment_NL)); + } + if ((Comment_EN == null)) { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Comment_EN)); + } + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ID_CommnentOnEvent)); + if ((Original_TriggerTable == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_TriggerTable)); + } + if ((Original_TriggerField == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_TriggerField)); + } + if ((Original_TriggerStatus.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_TriggerStatus.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_Comment_FR == null)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Comment_FR)); + } + if ((Original_Comment_NL == null)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_Comment_NL)); + } + if ((Original_Comment_EN == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_Comment_EN)); + } + this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(ID_CommnentOnEvent)); + 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string TriggerTable, string TriggerField, global::System.Nullable TriggerStatus, string Comment_FR, string Comment_NL, string Comment_EN, int Original_ID_CommnentOnEvent, string Original_TriggerTable, string Original_TriggerField, global::System.Nullable Original_TriggerStatus, string Original_Comment_FR, string Original_Comment_NL, string Original_Comment_EN) { + return this.Update(TriggerTable, TriggerField, TriggerStatus, Comment_FR, Comment_NL, Comment_EN, Original_ID_CommnentOnEvent, Original_TriggerTable, Original_TriggerField, Original_TriggerStatus, Original_Comment_FR, Original_Comment_NL, Original_Comment_EN, Original_ID_CommnentOnEvent); + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -2623,6 +3736,8 @@ namespace eDosStation.DataSet1TableAdapters { private UpdateOrderOption _updateOrder; + private CommentOnEventTableAdapter _commentOnEventTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -2638,6 +3753,20 @@ namespace eDosStation.DataSet1TableAdapters { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public CommentOnEventTableAdapter CommentOnEventTableAdapter { + get { + return this._commentOnEventTableAdapter; + } + set { + this._commentOnEventTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -2657,6 +3786,10 @@ namespace eDosStation.DataSet1TableAdapters { if ((this._connection != null)) { return this._connection; } + if (((this._commentOnEventTableAdapter != null) + && (this._commentOnEventTableAdapter.Connection != null))) { + return this._commentOnEventTableAdapter.Connection; + } return null; } set { @@ -2670,6 +3803,9 @@ namespace eDosStation.DataSet1TableAdapters { public int TableAdapterInstanceCount { get { int count = 0; + if ((this._commentOnEventTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -2681,6 +3817,15 @@ namespace eDosStation.DataSet1TableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateUpdatedRows(DataSet1 dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { int result = 0; + if ((this._commentOnEventTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.CommentOnEvent.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._commentOnEventTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -2691,6 +3836,14 @@ namespace eDosStation.DataSet1TableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateInsertedRows(DataSet1 dataSet, global::System.Collections.Generic.List allAddedRows) { int result = 0; + if ((this._commentOnEventTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.CommentOnEvent.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._commentOnEventTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -2701,6 +3854,14 @@ namespace eDosStation.DataSet1TableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateDeletedRows(DataSet1 dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._commentOnEventTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.CommentOnEvent.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._commentOnEventTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } return result; } @@ -2740,6 +3901,11 @@ namespace eDosStation.DataSet1TableAdapters { if ((dataSet.HasChanges() == false)) { return 0; } + if (((this._commentOnEventTableAdapter != null) + && (this.MatchTableAdapterConnection(this._commentOnEventTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" + @@ -2772,6 +3938,15 @@ namespace eDosStation.DataSet1TableAdapters { try { // ---- Prepare for update ----------- // + if ((this._commentOnEventTableAdapter != null)) { + revertConnections.Add(this._commentOnEventTableAdapter, this._commentOnEventTableAdapter.Connection); + this._commentOnEventTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._commentOnEventTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._commentOnEventTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._commentOnEventTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._commentOnEventTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -2830,6 +4005,10 @@ namespace eDosStation.DataSet1TableAdapters { if (workConnOpened) { workConnection.Close(); } + if ((this._commentOnEventTableAdapter != null)) { + this._commentOnEventTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._commentOnEventTableAdapter])); + this._commentOnEventTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/eDosStation/DataSet1.xsd b/eDosStation/DataSet1.xsd index 2bc513f..92efef9 100644 --- a/eDosStation/DataSet1.xsd +++ b/eDosStation/DataSet1.xsd @@ -75,6 +75,97 @@ + + + + + + DELETE FROM [HPH_REMS_new].[dbo].[CommentOnEvent] WHERE (([ID_CommnentOnEvent] = @Original_ID_CommnentOnEvent) AND ((@IsNull_TriggerTable = 1 AND [TriggerTable] IS NULL) OR ([TriggerTable] = @Original_TriggerTable)) AND ((@IsNull_TriggerField = 1 AND [TriggerField] IS NULL) OR ([TriggerField] = @Original_TriggerField)) AND ((@IsNull_TriggerStatus = 1 AND [TriggerStatus] IS NULL) OR ([TriggerStatus] = @Original_TriggerStatus)) AND ((@IsNull_Comment_FR = 1 AND [Comment_FR] IS NULL) OR ([Comment_FR] = @Original_Comment_FR)) AND ((@IsNull_Comment_NL = 1 AND [Comment_NL] IS NULL) OR ([Comment_NL] = @Original_Comment_NL)) AND ((@IsNull_Comment_EN = 1 AND [Comment_EN] IS NULL) OR ([Comment_EN] = @Original_Comment_EN))) + + + + + + + + + + + + + + + + + + + + INSERT INTO [HPH_REMS_new].[dbo].[CommentOnEvent] ([TriggerTable], [TriggerField], [TriggerStatus], [Comment_FR], [Comment_NL], [Comment_EN]) VALUES (@TriggerTable, @TriggerField, @TriggerStatus, @Comment_FR, @Comment_NL, @Comment_EN); +SELECT ID_CommnentOnEvent, TriggerTable, TriggerField, TriggerStatus, Comment_FR, Comment_NL, Comment_EN FROM CommentOnEvent WHERE (ID_CommnentOnEvent = SCOPE_IDENTITY()) + + + + + + + + + + + + + SELECT [ID_CommnentOnEvent] + ,[TriggerTable] + ,[TriggerField] + ,[TriggerStatus] + ,[Comment_FR] + ,[Comment_NL] + ,[Comment_EN] + FROM [HPH_REMS_new].[dbo].[CommentOnEvent] + + + + + + UPDATE [HPH_REMS_new].[dbo].[CommentOnEvent] SET [TriggerTable] = @TriggerTable, [TriggerField] = @TriggerField, [TriggerStatus] = @TriggerStatus, [Comment_FR] = @Comment_FR, [Comment_NL] = @Comment_NL, [Comment_EN] = @Comment_EN WHERE (([ID_CommnentOnEvent] = @Original_ID_CommnentOnEvent) AND ((@IsNull_TriggerTable = 1 AND [TriggerTable] IS NULL) OR ([TriggerTable] = @Original_TriggerTable)) AND ((@IsNull_TriggerField = 1 AND [TriggerField] IS NULL) OR ([TriggerField] = @Original_TriggerField)) AND ((@IsNull_TriggerStatus = 1 AND [TriggerStatus] IS NULL) OR ([TriggerStatus] = @Original_TriggerStatus)) AND ((@IsNull_Comment_FR = 1 AND [Comment_FR] IS NULL) OR ([Comment_FR] = @Original_Comment_FR)) AND ((@IsNull_Comment_NL = 1 AND [Comment_NL] IS NULL) OR ([Comment_NL] = @Original_Comment_NL)) AND ((@IsNull_Comment_EN = 1 AND [Comment_EN] IS NULL) OR ([Comment_EN] = @Original_Comment_EN))); +SELECT ID_CommnentOnEvent, TriggerTable, TriggerField, TriggerStatus, Comment_FR, Comment_NL, Comment_EN FROM CommentOnEvent WHERE (ID_CommnentOnEvent = @ID_CommnentOnEvent) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -83,7 +174,7 @@ - + @@ -113,7 +204,7 @@ - + @@ -175,6 +266,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -185,5 +319,9 @@ + + + + \ No newline at end of file diff --git a/eDosStation/EntryBadge.xaml b/eDosStation/EntryBadge.xaml index adaae82..acb2f60 100644 --- a/eDosStation/EntryBadge.xaml +++ b/eDosStation/EntryBadge.xaml @@ -34,6 +34,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eDosStation/EntryBadge.xaml.cs b/eDosStation/EntryBadge.xaml.cs index 72f58be..478a47c 100644 --- a/eDosStation/EntryBadge.xaml.cs +++ b/eDosStation/EntryBadge.xaml.cs @@ -29,7 +29,7 @@ namespace eDosStation EpdBaseClr.Epd2 ep; bool EpdFound = false; DispatcherTimer dispatcherTimer; - int Search; + int Search, UserSeconds; Boolean Inst1 = false, Inst2 = false; public static OkReadBadge.Badging a; @@ -41,7 +41,9 @@ namespace eDosStation string csn, site, code; static User _User; + DataSet1.CommentOnEventDataTable dtCOE; DataSet1.GetTaskInfoRow CurTaskRow; + enum eCOE { quiz=1} ; private bool StopReadBadge=true; public EntryBadge(EpdBaseClr.Epd2 curEP, Station curStation) { @@ -102,12 +104,12 @@ namespace eDosStation Search--; if (Search > 0) { - statusEPD.Text = $"Search {Search} ({ep.ConnectError})"; + statusEPD.Text = $"Searching EPD ... {Search} ({ep.ConnectError})"; dispatcherTimer.Start(); } else { - statusEPD.Text = $"Search Timeout"; + statusEPD.Text = $"No EPD found"; } } } @@ -245,44 +247,88 @@ namespace eDosStation } getTaskListViewSource.View.MoveCurrentToFirst(); } - void AskTask() + + public string getCommentOnEvent(string prefix, int id) { + string res=string.Empty; + if (!string.IsNullOrWhiteSpace(prefix)) res = prefix + "\n"; + DataSet1.CommentOnEventRow r = dtCOE.FindByID_CommnentOnEvent(id); + string l = _User?.Language ?? "E"; + + if (r!=null) + switch (l) + { + case "N": res += r.Comment_NL; break; + case "F": res += r.Comment_FR; break; + default: res += r.Comment_EN; break; + } + return res.Replace("\\n","\n"); + } + bool ShowUserInfo() + { + bool doCancel = false; + UserSeconds = 10; + //UserScreen + string ReasonNoAccess = string.Empty; + tbUser.IsSelected = true; if (_User == null || _User.VisitIDLocked == true || _User.AccessAllow == false) { - tbNotAllowed.IsSelected = true; - if (_User.VisitIDLocked == true || _User.AccessAllow == false) tReasonNoAccess.Text = _User.ReasonNoAccess; - else tReasonNoAccess.Text = "No identification"; + //tbNotAllowed.IsSelected = true; + if (_User.VisitIDLocked == true || _User.AccessAllow == false) + ReasonNoAccess = _User.ReasonNoAccess; + else ReasonNoAccess = getCommentOnEvent(string.Empty, 3); + } + + if (!string.IsNullOrEmpty(_User.UserComment)) + { + UserComment.Text = _User.UserComment; + boxComment.Visibility = Visibility.Visible; + } + else + boxComment.Visibility = Visibility.Hidden; + + if (!string.IsNullOrWhiteSpace(ReasonNoAccess)) UserAccess.Text = ReasonNoAccess; + else UserAccess.Text = "Welcome to eDOS"; + Username.Text = string.Concat(_User.FirstName, " ", _User.LastName); + pUserSeconds.Maximum = UserSeconds; pUserSeconds.Value = UserSeconds; + tReasonNoAccess.Text = ReasonNoAccess; + dispatcherTimer = new DispatcherTimer(DispatcherPriority.Normal); + dispatcherTimer.Interval = TimeSpan.FromSeconds(1); + dispatcherTimer.Tick += SwitchToTask; + dispatcherTimer.Start(); + return doCancel; + } + + private void SwitchToTask(object sender, EventArgs e) + { + if (--UserSeconds > 0) + { + tUserSeconds.Text = UserSeconds.ToString(); + pUserSeconds.Value = UserSeconds; } else { - if (!string.IsNullOrEmpty(_User.UserComment)) - { - MessageBox.Show(_User.UserComment, "Comment", MessageBoxButton.OK, MessageBoxImage.Asterisk); - } - eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1"))); - using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter()) - { - dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin); - } - tbTask.IsSelected = true; - bool isAlara = (cbAlara.IsChecked == true); - SetFilter(isAlara); + dispatcherTimer.Stop(); + dispatcherTimer.Tick -= SwitchToTask; + AskTask(); } + } + void AskTask() + { + eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1"))); + using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter()) + { + dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin); + } + tbTask.IsSelected = true; + bool isAlara = (cbAlara.IsChecked == true); + SetFilter(isAlara); } void CheckBadge() { _User = new User(CSN.Text, Code.Text); - if (_User.Error == 0) - { - Naam.Text = string.Concat(_User.FirstName, " ", _User.LastName); - AskTask(); - } - else - { - MessageBox.Show(_User.ErrorMessage); - Close(); - } + ShowUserInfo(); //AskTask(); } public void showBadge() { @@ -493,6 +539,10 @@ namespace eDosStation cbInst2.IsChecked = Inst2; } + dtCOE = new DataSet1.CommentOnEventDataTable(); + using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter()) + dt.Fill(dtCOE); + string TestCSN = thisStation.TestCSN; initialising = false; @@ -509,7 +559,7 @@ namespace eDosStation { MessageBox.Show(_User.ErrorMessage, "DB Error", MessageBoxButton.OK, MessageBoxImage.Exclamation); } else { - Dispatcher.InvokeAsync(AskTask); + Dispatcher.InvokeAsync(ShowUserInfo); //AskTask } } } diff --git a/eDosStation/MainWindow.xaml b/eDosStation/MainWindow.xaml index e965a3d..bfd99a5 100644 --- a/eDosStation/MainWindow.xaml +++ b/eDosStation/MainWindow.xaml @@ -20,15 +20,20 @@ - - - + + + + - - - - + + + + + + + + diff --git a/eDosStation/MainWindow.xaml.cs b/eDosStation/MainWindow.xaml.cs index 9d07f20..06b79d3 100644 --- a/eDosStation/MainWindow.xaml.cs +++ b/eDosStation/MainWindow.xaml.cs @@ -57,6 +57,13 @@ namespace eDosStation private void Window_Loaded(object sender, RoutedEventArgs e) { thisStation = new Station(""); + if (thisStation.insComments.Length > 2) { + ibComment.Child= thisStation.tbComments; + //itComment = thisStation.tbComments; + ibComment.Visibility = Visibility.Visible; + } + else + ibComment.Visibility = Visibility.Hidden; ep = new EpdBaseClr.Epd2(thisStation.ComPort); } } diff --git a/eDosStation/Station.cs b/eDosStation/Station.cs index 1eb5876..b63010a 100644 --- a/eDosStation/Station.cs +++ b/eDosStation/Station.cs @@ -4,6 +4,8 @@ using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Controls; +using System.Windows.Documents; namespace eDosStation { @@ -19,6 +21,8 @@ namespace eDosStation public bool Changed = false; public int Error = 0; public string ErrorMessage; + public StringBuilder insComments; + public TextBlock tbComments; public Station(string Station) { @@ -27,13 +31,18 @@ namespace eDosStation Inst_CODE2 = 11; Inst_Name1 = "BR1"; Inst_Name2 = "Venus"; TestCSN = "0428790A0B4E80"; - + insComments = new StringBuilder(); + tbComments = new TextBlock(); + tbComments.FontSize = 15; + tbComments.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; + tbComments.TextAlignment = System.Windows.TextAlignment.Center; + using (var co = new SqlConnection(Properties.Settings.Default.RemoteSQL)) { + co.Open(); using (var cmd = new SqlCommand("StationSettingsSelect", co)) { cmd.CommandType = System.Data.CommandType.StoredProcedure; - co.Open(); try { var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow); @@ -63,8 +72,44 @@ namespace eDosStation Error = 1; ErrorMessage = ex.Message; } - co.Close(); } + + + using (var cmd2 = new SqlCommand("GetInstallationsComments", co)) + { + cmd2.CommandType = System.Data.CommandType.StoredProcedure; + cmd2.Parameters.AddWithValue("@Inst_CODE1", Inst_CODE1); + if (Inst_CODE2 > 0) cmd2.Parameters.AddWithValue("@Inst_CODE2", Inst_CODE2); + try + { + var rs = cmd2.ExecuteReader(System.Data.CommandBehavior.SingleResult); + string curins = string.Empty, thisins= string.Empty, thiscomment = string.Empty; + if (rs.HasRows ) + while (rs.Read()) + { + thisins = rs.GetString(2); + thiscomment = rs.GetString(3).Replace("\\n", "\n"); + if (curins.CompareTo(thisins) !=0) + { + if (curins != string.Empty) tbComments.Inlines.Add(new LineBreak()); + tbComments.Inlines.Add(new Bold(new Run($"Installation {thisins}:\n") { FontSize=20 })); + insComments.AppendLine($"Installation {thisins}"); + curins = thisins; + } + tbComments.Inlines.Add( new Run(thiscomment) ); + + + + } + rs.Close(); + } + catch (System.Exception ex) + { + Error = 2; + ErrorMessage = ex.Message; + } + } + co.Close(); } }