Refactor to api connections. Update Checker.

This commit is contained in:
Matthew Burke
2023-08-24 12:45:56 -04:00
parent 4a4bcc81e0
commit 87a73ff24b
14 changed files with 355 additions and 45 deletions
@@ -4,6 +4,9 @@ using System.Collections.Generic;
namespace PWAPPv2.Source.Database
{
/// <summary>
/// Class <c>DatabaseConnection</c> creates and maintains a connection to and OpenDental MySqlDatabase.
/// </summary>
class DatabaseConnection
{
@@ -18,6 +21,12 @@ namespace PWAPPv2.Source.Database
Connection = new MySqlConnection(SqlString);
}
public DatabaseConnection(Config.Configuration config)
{
SqlString = "server=" + config.Get("ODhost") + ";Uid=" + config.Get("ODuser") + ";database=" + config.Get("ODdatabase") + ";Pwd=" + config.Get("ODpassword");
Connection = new MySqlConnection(SqlString);
}
public void Connect()
{
try