Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerDatabaseSettings"/> class.
        /// </summary>
        /// <param name="dbClient">The database client.</param>
        internal ServerDatabaseSettings(IRegularQueryAdapter dbClient)
        {
            DbData = new Dictionary<string, string>();

            DbData.Clear();
            dbClient.SetQuery("SELECT * FROM server_settings");

            DataTable table = dbClient.GetTable();

            foreach (DataRow dataRow in table.Rows)
                DbData.Add(dataRow[0].ToString(), dataRow[1].ToString());
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServerDatabaseSettings"/> class.
        /// </summary>
        /// <param name="dbClient">The database client.</param>
        internal ServerDatabaseSettings(IRegularQueryAdapter dbClient)
        {
            DbData = new Dictionary <string, string>();

            DbData.Clear();
            dbClient.SetQuery("SELECT * FROM server_settings");

            DataTable table = dbClient.GetTable();

            foreach (DataRow dataRow in table.Rows)
            {
                DbData.Add(dataRow[0].ToString(), dataRow[1].ToString());
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigData"/> class.
 /// </summary>
 /// <param name="dbClient">The database client.</param>
 internal ConfigData(IRegularQueryAdapter dbClient)
 {
     try
     {
         DbData = new Dictionary<string, string>();
         DbData.Clear();
         dbClient.SetQuery("SELECT * FROM server_settings");
         var table = dbClient.GetTable();
         foreach (DataRow dataRow in table.Rows)
             DbData.Add(dataRow[0].ToString(), dataRow[1].ToString());
     }
     catch
     {
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigData"/> class.
 /// </summary>
 /// <param name="dbClient">The database client.</param>
 internal ConfigData(IRegularQueryAdapter dbClient)
 {
     try
     {
         DbData = new Dictionary <string, string>();
         DbData.Clear();
         dbClient.SetQuery("SELECT * FROM `server_settings`");
         var table = dbClient.GetTable();
         foreach (DataRow dataRow in table.Rows)
         {
             DbData.Add(dataRow[0].ToString(), dataRow[1].ToString());
         }
     }
     catch
     {
     }
 }