public frmMain() { InitializeComponent(); MobileCommon.ServerName = ConfigurationManager.AppSettings["ServerName"]; MobileCommon.DatabaseName = ConfigurationManager.AppSettings["DatabaseName"]; MobileCommon.MobileDB = $"Data Source ={MobileCommon.ServerName}; Initial Catalog = {MobileCommon.DatabaseName}; Integrated Security = True;"; GuiCommon.HMDevXManager = new TUC_HMDevXManager.TUC_HMDevXManager(defaultLookAndFeel1); ReflexCommon.SqlCommon.ReportMessage += GuiCommon.ShowMessage; DataManage.ReportMessage += GuiCommon.ShowMessage; DataManage.CheckCreateDatabase(); if (!DataManage.HasDBAccess()) { GuiCommon.ShowMessage("Please contact your system administrator to grant you database access."); return; } DataManage.Purge(); }