提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+32 -1
View File
@@ -421,4 +421,35 @@ namespace Lskj.Core
SqlHelper.ConnectionType = ConnectionType.DmServer;
}
SqlHelper.dbFactory = DbProviderFactories.GetFactory(providerName);
if (SqlHelper._connection != null)
{
try
{
SqlHelper._connection.Close();
SqlHelper._connection.Dispose();
}
catch (Exception)
{
}
SqlHelper._connection = null;
}
try
{
SqlHelper._connection = SqlHelper.dbFactory.CreateConnection();
SqlHelper._connection.ConnectionString = connStr;
SqlHelper._connection.Open();
isConnect = true;
}
catch (Exception ex)
{
LogHelper.Instance.WriteLog(ex.Message);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return isConnect;
}
}
}