#region 取得Lib的App.config的连接字符串
try
{
string fileFullPath = Assembly.GetExecutingAssembly().CodeBase.Replace("[url=file:///]file:///", string.Empty);
string filePath = fileFullPath.Substring(0, fileFullPath.LastIndexOf("/")) + "/App.config";
if (document == null)
{
document = new XmlDocument();
}
document.Load(filePath);
connectionString = document.SelectSingleNode(@"/configuration/appSettings/add[@key='connString']").Attributes["value"].Value;
}
catch (XmlException ex)
{
throw new XmlException(ex.Message);
}
#endregion