Added option to Remove Trailing Hard Returns and Manual Page Breaks

Added Server and Database to Window Caption (Title)
This commit is contained in:
Rich
2016-01-20 20:17:16 +00:00
parent 116e10218d
commit 9e170362cc
7 changed files with 55 additions and 10 deletions

View File

@@ -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