Use new generic property (ActiveDatabase) to access the current database name. About Screen
Use new generic property (ActiveDatabase) to access the current database name. Name of Export File Use new generic property (ActiveDatabase) to access the current database name. Name of Error Log FIle. Added new generic property (ActiveDatabase) to access the current database name.
This commit is contained in:
@@ -18,6 +18,7 @@ using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -136,6 +137,16 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return Database._SelectedDatabase; }
|
||||
set { Database._SelectedDatabase = value; }
|
||||
}
|
||||
public static string ActiveDatabase
|
||||
{
|
||||
get
|
||||
{
|
||||
string activeDatabase = SelectedDatabase;
|
||||
if(activeDatabase == null)
|
||||
activeDatabase = Regex.Replace(VEPROMS_Connection, "^.*Initial Catalog=([^;]*);.*$", "$1", RegexOptions.IgnoreCase);
|
||||
return activeDatabase;
|
||||
}
|
||||
}
|
||||
private static string _LastDatabase="NoDefault";
|
||||
public static string LastDatabase
|
||||
{
|
||||
|
Reference in New Issue
Block a user