From 5873c927abab69d6a0a25ba4be4ddd648dd325c1 Mon Sep 17 00:00:00 2001 From: Luc Vandenbroucke Date: Mon, 26 Apr 2021 10:35:23 +0200 Subject: [PATCH] Async waiter --- eDosStation/App.config | 6 ++---- eDosStation/DataInterface.cs | 10 +++++----- eDosStation/EntryBadge.xaml.cs | 8 ++++---- eDosStation/Properties/Settings.Designer.cs | 4 ++-- eDosStation/Properties/Settings.settings | 4 ++-- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/eDosStation/App.config b/eDosStation/App.config index 9712aae..45ca604 100644 --- a/eDosStation/App.config +++ b/eDosStation/App.config @@ -9,10 +9,8 @@ - - + diff --git a/eDosStation/DataInterface.cs b/eDosStation/DataInterface.cs index b077cf4..8cf7041 100644 --- a/eDosStation/DataInterface.cs +++ b/eDosStation/DataInterface.cs @@ -106,6 +106,7 @@ namespace eDosStation ConCentralStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString; localConnection = new SqlConnection(currentConStr); NextIDCommand = new SqlCommand("SELECT NEXT VALUE FOR VisitSequence as VisitID", localConnection); + isLocal = true; MakeCommands(); bool rv= checkCon(false); @@ -260,10 +261,9 @@ namespace eDosStation public void FillComment() { - if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable(); - using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter()) + if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable(); + using (var dt = CommentTA()) { - dt.Connection.ConnectionString = currentConStr; dt.Fill(dtCOE); } } @@ -275,9 +275,9 @@ namespace eDosStation public void FillTaskInfo(User _User, DataSet1 dataSet1) { - using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter()) + using (var dataSet1GetTaskInfoTableAdapter = TaskInfoTa()) // new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter()) { - dataSet1GetTaskInfoTableAdapter.Connection.ConnectionString = currentConStr; + //dataSet1GetTaskInfoTableAdapter.Connection.ConnectionString = currentConStr; dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin); } } diff --git a/eDosStation/EntryBadge.xaml.cs b/eDosStation/EntryBadge.xaml.cs index d145c86..dc7c588 100644 --- a/eDosStation/EntryBadge.xaml.cs +++ b/eDosStation/EntryBadge.xaml.cs @@ -43,10 +43,10 @@ namespace eDosStation public EntryBadge(EpdBaseClr.Epd2 curEP, Station curStation) { - dataInterface = curStation.dataInterface; - ep=curEP; - thisStation = curStation; InitializeComponent(); + dataInterface = curStation.dataInterface; + ep = curEP; + thisStation = curStation; _User = null; } private bool LoadDoses() @@ -533,7 +533,7 @@ namespace eDosStation } private void Window_Loaded(object sender, RoutedEventArgs e) { - dataInterface.checkCon(); + // dataInterface.checkCon(); EpdFound = false; initialising = true; tbEntry.IsSelected = true; diff --git a/eDosStation/Properties/Settings.Designer.cs b/eDosStation/Properties/Settings.Designer.cs index ea4182d..5f81703 100644 --- a/eDosStation/Properties/Settings.Designer.cs +++ b/eDosStation/Properties/Settings.Designer.cs @@ -110,8 +110,8 @@ namespace eDosStation.Properties { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] - [global::System.Configuration.DefaultSettingValueAttribute("Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+" + - "8;TrustServerCertificate=True;Application Name=eDosStation")] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=eDosLocal;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Info" + + "pla+8;TrustServerCertificate=True;Application Name=eDosStation")] public string localConnectionString { get { return ((string)(this["localConnectionString"])); diff --git a/eDosStation/Properties/Settings.settings b/eDosStation/Properties/Settings.settings index 28f030a..fb189e4 100644 --- a/eDosStation/Properties/Settings.settings +++ b/eDosStation/Properties/Settings.settings @@ -26,10 +26,10 @@ <?xml version="1.0" encoding="utf-16"?> <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <ConnectionString>Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation</ConnectionString> + <ConnectionString>Data Source=eDosLocal;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation</ConnectionString> <ProviderName>System.Data.SqlClient</ProviderName> </SerializableConnectionString> - Data Source=HPHDB;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation + Data Source=eDosLocal;Initial Catalog=eDosLocal;User ID=eDosStation;Password=Infopla+8;TrustServerCertificate=True;Application Name=eDosStation \ No newline at end of file