From 8e13fc717965873edeac3b929d3225fbbd8aba84 Mon Sep 17 00:00:00 2001 From: Rich Date: Mon, 30 Nov 2015 22:36:18 +0000 Subject: [PATCH] Fixed logic that allows the user to select an existing RO database. If the user presses Cancel, the code would crash. The code was changed to cancel the Import. Fixes B2015-216 --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 561e2600..b9ea0ba0 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -236,7 +236,7 @@ namespace VEPROMS dlg.ImportedROFolder = rofolderpath; dlg.LocalROFolders = localROPaths; dlg.ShowDialog(this); - if (dlg.SelectedROFolder != string.Empty) + if ((dlg.SelectedROFolder ?? string.Empty) != string.Empty) // B2015-216 If the return value is null treat it like an empty string { MyRODb = RODb.GetByFolderPath(dlg.SelectedROFolder); oldRODbID = newRODbID = MyRODb.RODbID; @@ -245,6 +245,7 @@ namespace VEPROMS else { MessageBox.Show("Since you did not pick an existing RO folder defined for this database, the import process will terminate."); + this.Close();// Close the Import Window return; } }