コード例 #1
0
ファイル: ServerDatabaseSettings.cs プロジェクト: sgf/Yupi
        /// <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
ファイル: ConfigData.cs プロジェクト: BjkGkh/Azure2
 /// <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
     {
     }
 }