public static void RetrieveRooms() { IDataReader reader = DBCommands.RetrieveRooms(); while (reader.Read()) { int roomId = Int32.Parse(reader[0].ToString()); int floor = Int32.Parse(reader[1].ToString()); string name = reader[2].ToString(); string type = reader[3].ToString(); int nPlaces = Int32.Parse(reader[4].ToString()); int nPCs = Int32.Parse(reader[5].ToString()); CreateRoom(roomId, floor, name, type, nPlaces, nPCs); } }