示例#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());
        }
示例#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());
            }
        }
示例#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
     {
     }
 }
示例#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
     {
     }
 }