From f8a3adcd32eddcde26cd4b5d96d0b02f0774a0a9 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 8 Apr 2013 14:21:01 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20fix=20B2013-079=20=E2=80=93=20Users=20can?= =?UTF-8?q?=20now=20use=20=E2=80=9C{MENU}=E2=80=9D=20in=20the=20DBConnecti?= =?UTF-8?q?on.xml=20file=20so=20that=20they=20can=20specify=20a=20database?= =?UTF-8?q?=20in=20a=20PROMS=20shortcut=20(ex=20=20VEPROMS.EXE=20\DB=3DVEP?= =?UTF-8?q?ROMS=5Fxxx)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Generated/Database.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs index 0d05942c..a997f4af 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Database.cs @@ -85,9 +85,18 @@ namespace VEPROMS.CSLA.Library System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); xd.Load(cnOverride); System.Xml.XmlNode xn = xd.SelectSingleNode("DBConnection/@string"); + // bug fix: B2013-079 + // If we are using the DBConnection.xml file, + // Check to see if "{MENU}" is being used and if a database was specified (ex."VEPROMS.EXE \DB=VEPROMS_xxx") + // If both conditions are true, then call the ChooseDatabases() funtion which will return a valid connection string (we hope) + // otherwise use the connection string as it is in the DBConnection.xml if (xn != null) { - return _VEPROMS_Connection = xn.InnerText; + if (xn.InnerText.Contains("{MENU}") && SelectedDatabase != null && SelectedDatabase.Length > 0) + _VEPROMS_Connection = ChooseDatabase(xn.InnerText); + else + _VEPROMS_Connection = xn.InnerText; + return _VEPROMS_Connection; } } // Otherwise get the value from the ConfigurationManager