private static void LoadSettingsFromDB()
 {
     Logger.Info("LOADING INITIAL SETTINGS [Mode:DB]...");
     DataAdapter oDB = new DataAdapter();
     Settings.IsTransmitterEnabled = oDB.GetSetting("IsTransmitterEnabled").NullToInt(1);
     Settings.STMServerIP = oDB.GetSetting("STMServerIP").NulltoString("");
     Settings.STMServerPort = oDB.GetSetting("STMServerPort").NullToInt(5555);
     Settings.Version = oDB.GetSetting("PRODUCTVERSION").NulltoString("");
 }
 private STMMessageFilter()
 {
         if (oFilteredEvents == null)
         {
            
             Logger.Debug("STMMessageFilter: Loading....");
             _DataAdapter = new DataAdapter();
             oFilteredEvents = _DataAdapter.GetExcludedEvents();
             Logger.Debug("STMMessageFilter: Loading Complete.");
         }
 }
 private Installations()
 {
     try
     {
         _DataAdapter = new DataAdapter();
         Logger.Debug("Installations", "CONSTRUCTOR" , "Loading....");
         _InstallationtoAsset = _DataAdapter.GetInstallations();
         Logger.Debug("Installations", "CONSTRUCTOR", "Loading Complete.");
     }
     catch
     {
         Logger.Error("Installations", "CONSTRUCTOR", "Error Getting Installation Details:");
         throw;
     }
 }
 public static SiteDetails GetInstance()
 {
     lock (_Lock)
     {
         if (_SiteDetails == null || DateTime.Now.Subtract(dtUpdated).TotalMinutes > Settings.RefreshSiteDetailsInMinutes)
         {
             _SiteDetails = new SiteDetails();
             _DataAdapter = new DataAdapter();
              Hashtable _hsSiteDetails = _DataAdapter.GetSiteDetails();
             _SiteDetails.Area = _hsSiteDetails["Area"].ToString();
             _SiteDetails.Company = _hsSiteDetails["Company"].ToString();
             _SiteDetails.District = _hsSiteDetails["District"].ToString();
             _SiteDetails.Region = _hsSiteDetails["Region"].ToString();
             _SiteDetails.Sub_Company = _hsSiteDetails["Sub_Company"].ToString();
             Relauncher.GetInstance().RegisterForUpdate(_SiteDetails);
             dtUpdated = DateTime.Now;
         }
         return _SiteDetails;
     }
 }