Consoles, database generated.
This commit is contained in:
@@ -18,7 +18,8 @@ namespace Sarand.PatientMgr.App
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static SaPatientMgrApp app = null;
|
||||
private PropertySet properties = null;
|
||||
private readonly PropertySet properties;
|
||||
private SpmSessionProfile_Desktop sessionProfile;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
@@ -37,7 +38,7 @@ namespace Sarand.PatientMgr.App
|
||||
Spm.Site Site = EnumUtil.ParseEnum(properties.GetPropertyValue("Config", "Site"), Spm.Site.Unknown);
|
||||
|
||||
// Default logger properties.
|
||||
Logger.LogFilenamePrefix = "SPM-Desktop";
|
||||
Logger.LogFilenamePrefix = "SPM-DSK";
|
||||
Logger.LogFolder = properties.GetPropertyValue("Logging", "Folder");
|
||||
#if DEBUG
|
||||
Logger.ConsoleLevel = SaMessageLevel.Trace;
|
||||
@@ -92,16 +93,16 @@ namespace Sarand.PatientMgr.App
|
||||
SpmGlobals.Application = new SpmApplication_Desktop(properties, SessionContext, database);
|
||||
|
||||
// Session profile.
|
||||
SpmSessionProfile_Desktop sessionProfile = new SpmSessionProfile_Desktop();
|
||||
sessionProfile = new SpmSessionProfile_Desktop(SessionContext);
|
||||
SpmGlobals_Win.SessionProfile = sessionProfile;
|
||||
}
|
||||
private SacsDatabase OpenDatabase ()
|
||||
{
|
||||
SacsDatabaseConsole.OdbcConfig config = new SacsDatabaseConsole.OdbcConfig();
|
||||
config.location = properties.GetPropertyValue("Database", "Location");
|
||||
config.user = properties.GetPropertyValue("Database", "User");
|
||||
config.pword = properties.GetPropertyValue("Database", "Pword");
|
||||
Logger.Trace("BusinessMgrApp OpenDatabase Location=" + config.location);
|
||||
config.location = properties.GetPropertyValue("Scheduling", "DataSource");
|
||||
config.user = properties.GetPropertyValue("Scheduling", "DataUser");
|
||||
config.pword = properties.GetPropertyValue("Scheduling", "DataPword");
|
||||
Logger.Trace("PatientMgrApp OpenDatabase Location=" + config.location);
|
||||
|
||||
SacsDatabase database = SacsDatabaseConsole.OpenOdbcDatabase(config);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user