Added option to Remove Trailing Hard Returns and Manual Page Breaks
Added Server and Database to Window Caption (Title)
This commit is contained in:
@@ -32,6 +32,27 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
public static string DBServer
|
||||
{ get
|
||||
{
|
||||
try
|
||||
{
|
||||
string server = "";
|
||||
string db = "";
|
||||
Match m = Regex.Match(Database.VEPROMS_SqlConnection.ConnectionString, "Data Source=([^;]+)(;[^;]+)*;*Initial Catalog=([^;]+)(;[^;]+)*");
|
||||
if (m.Success && m.Groups.Count > 4)
|
||||
{
|
||||
server = m.Groups[1].Value;
|
||||
db = m.Groups[3].Value;
|
||||
}
|
||||
return string.Format("{0} - {1}", server, db);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return Database.VEPROMS_SqlConnection.ConnectionString;
|
||||
}
|
||||
}
|
||||
}
|
||||
private static int _DefaultTimeout = 600; // 600 seconds, i.e. 10 minutes
|
||||
|
||||
public static int DefaultTimeout
|
||||
|
Reference in New Issue
Block a user