From c1b9bf0c5fd8d950b1cbb7bbe6c18a94d07aa53f Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Mon, 11 May 2020 09:05:38 +0200 Subject: [PATCH] Database upgrade bug fixes, ver. 2.26.1460 --- TBF/Program.cs | 4 ++-- TBF/Properties/AssemblyInfo.cs | 4 ++-- TBF/UI/MainWnd.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TBF/Program.cs b/TBF/Program.cs index 86b47362c..43bef683d 100644 --- a/TBF/Program.cs +++ b/TBF/Program.cs @@ -350,6 +350,8 @@ namespace TBF /// Clone() guarantees that current bench settings wont be modified /// when user modifies the database settings in DatabaseSettingsDlg. Config.Data.CurrentBench = (Config.DatabaseSettings)LocalSettings.TestBenches[i].Clone(); + Results.DB.DbType = Config.Data.CurrentBench.WaterMetersDBSettings.DbType; + Results.DB.ConnectionString = Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString; /// Save the selection to local settings LocalSettings.LastBenchName = Config.Data.CurrentBench.BenchName; @@ -367,8 +369,6 @@ namespace TBF /// /// Connect to Results database and determine the last saved batch number. /// - Results.DB.DbType = Config.Data.CurrentBench.WaterMetersDBSettings.DbType; - Results.DB.ConnectionString = Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString; Results.DB.LoadSharedData(); int maxBatchNr = Results.DB.GetMaxSavedBatchNr(); if (!Config.Data.CurrentBench.IsRealBench || Program.LocalSettings.BatchNr <= maxBatchNr) diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 736478cf5..8c4353996 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.26.1458.0")] -[assembly: AssemblyFileVersion("2.26.1458.0")] +[assembly: AssemblyVersion("2.26.1460.0")] +[assembly: AssemblyFileVersion("2.26.1460.0")] diff --git a/TBF/UI/MainWnd.cs b/TBF/UI/MainWnd.cs index 8ab1da5bc..552a62245 100644 --- a/TBF/UI/MainWnd.cs +++ b/TBF/UI/MainWnd.cs @@ -822,7 +822,7 @@ namespace TBF.UI private void upgradeTSMenuItem_Click(object sender, EventArgs e) { - new TBF.UI.Settings.UpgradeSelectionDlg().Show(); + new TBF.UI.Settings.UpgradeSelectionDlg().ShowDialog(); } private void iPerlHeadsToolStripMenuItem_Click(object sender, EventArgs e)