public void LoadMoves(DatabaseConnection dbConnection, int ID, int formNum) { MySql database = dbConnection.Database; string query = "SELECT pokedex_pokemonlevelmove.LevelNum, pokedex_pokemonlevelmove.Move " + "FROM pokedex_pokemonlevelmove " + "WHERE pokedex_pokemonlevelmove.DexNum = \'" + ID + "\' " + "AND pokedex_pokemonlevelmove.FormNum = \'" + formNum + "\' " + "ORDER BY pokedex_pokemonlevelmove.MoveIndex"; foreach (DataColumnCollection column in database.RetrieveRowsEnumerable(query)) { int levelNum = column["LevelNum"].ValueString.ToInt(); int moveNum = column["Move"].ValueString.ToInt(); LevelUpMove move = new LevelUpMove(moveNum, levelNum); LevelUpMoves.Add(move); } query = "SELECT pokedex_pokemontmmove.Move " + "FROM pokedex_pokemontmmove " + "WHERE pokedex_pokemontmmove.DexNum = \'" + ID + "\' " + "AND pokedex_pokemontmmove.FormNum = \'" + formNum + "\' " + "ORDER BY pokedex_pokemontmmove.MoveIndex"; foreach (DataColumnCollection column in database.RetrieveRowsEnumerable(query)) { TMMoves.Add(column["Move"].ValueString.ToInt()); } query = "SELECT pokedex_pokemoneggmove.Move " + "FROM pokedex_pokemoneggmove " + "WHERE pokedex_pokemoneggmove.DexNum = \'" + ID + "\' " + "AND pokedex_pokemoneggmove.FormNum = \'" + formNum + "\' " + "ORDER BY pokedex_pokemoneggmove.MoveIndex"; foreach (DataColumnCollection column in database.RetrieveRowsEnumerable(query)) { EggMoves.Add(column["Move"].ValueString.ToInt()); } query = "SELECT pokedex_pokemontutormove.Move " + "FROM pokedex_pokemontutormove " + "WHERE pokedex_pokemontutormove.DexNum = \'" + ID + "\' " + "AND pokedex_pokemontutormove.FormNum = \'" + formNum + "\' " + "ORDER BY pokedex_pokemontutormove.MoveIndex"; foreach (DataColumnCollection column in database.RetrieveRowsEnumerable(query)) { TutorMoves.Add(column["Move"].ValueString.ToInt()); } query = "SELECT pokedex_pokemondwmove.Move " + "FROM pokedex_pokemondwmove " + "WHERE pokedex_pokemondwmove.DexNum = \'" + ID + "\' " + "AND pokedex_pokemondwmove.FormNum = \'" + formNum + "\' " + "ORDER BY pokedex_pokemondwmove.MoveIndex"; foreach (DataColumnCollection column in database.RetrieveRowsEnumerable(query)) { DWMoves.Add(column["Move"].ValueString.ToInt()); } query = "SELECT pokedex_pokemoneventmove.Move " + "FROM pokedex_pokemoneventmove " + "WHERE pokedex_pokemoneventmove.DexNum = \'" + ID + "\' " + "AND pokedex_pokemoneventmove.FormNum = \'" + formNum + "\' " + "ORDER BY pokedex_pokemoneventmove.MoveIndex"; foreach (DataColumnCollection column in database.RetrieveRowsEnumerable(query)) { EventMoves.Add(column["Move"].ValueString.ToInt()); } }