Example #1
0
        private static String RenderConversionTables(MySqlConnection conn)
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("<script type=\"text/javascript\">");

            WriteConversionArray(builder, conn.ExecuteDataTable("SELECT id, filename, name_ja, name_en FROM squid_stages ORDER BY id"), "squidStages");
            WriteConversionArray(builder, conn.ExecuteDataTable("SELECT id, NULL AS filename, name_ja, name_en FROM squid_modes ORDER BY id"), "squidModes");
            /*
            WriteConversionArray(builder, conn.ExecuteDataTable("SELECT identifier, filename, name_ja, name_en FROM squid_gear_head ORDER BY filename, identifier"), "squidGearHead");
            WriteConversionArray(builder, conn.ExecuteDataTable("SELECT identifier, filename, name_ja, name_en FROM squid_gear_clothes ORDER BY filename, identifier"), "squidGearClothes");
            WriteConversionArray(builder, conn.ExecuteDataTable("SELECT identifier, filename, name_ja, name_en FROM squid_gear_shoes ORDER BY filename, identifier"), "squidGearShoes");
            WriteConversionArray(builder, conn.ExecuteDataTable("SELECT identifier, filename, name_ja, name_en FROM squid_weapons ORDER BY filename, identifier"), "squidWeapons");
            */

            builder.Append("</script>");

            return builder.ToString();
        }
Example #2
0
 /// <summary>
 /// Execute DataTable
 /// </summary>
 /// <param name="conn"></param>
 /// <param name="cmdText"></param>
 /// <param name="parameters"></param>
 /// <returns></returns>
 public static DataTable ExecuteDataTable(this MySqlConnection conn, string cmdText, MySqlParameter[] parameters)
 {
     conn.CheckNull(nameof(conn));
     return(conn.ExecuteDataTable(cmdText, parameters, CommandType.Text, null));
 }
Example #3
0
 /// <summary>
 /// Execute DataTable
 /// </summary>
 /// <param name="conn"></param>
 /// <param name="cmdText"></param>
 /// <param name="commandType"></param>
 /// <param name="transaction"></param>
 /// <returns></returns>
 public static DataTable ExecuteDataTable(this MySqlConnection conn, string cmdText, CommandType commandType, MySqlTransaction transaction)
 {
     conn.CheckNull(nameof(conn));
     return(conn.ExecuteDataTable(cmdText, null, commandType, transaction));
 }