public static List<SalesOrder> querySalesOrder(String idCard)
			throws SQLException, ClassNotFoundException {
		TicketManager ticketManager = new TicketManager();
		List<SalesOrder> result = new ArrayList<SalesOrder>();
		List<String> ticketNumbers = new ArrayList<String>();

		String sql = "Select * from test.train_ticketSalesOrder where IDCard='"
				+ idCard + "'" + " and IsEnable = '1';"; // 查询
		RowSet resultSet = DateBaseManager.query(sql);
		while (resultSet.next()) {
			ticketNumbers.add(resultSet.getString("ticketNumber"));
		}

		List<Ticket> tickets = ticketManager.queryTicketsForNumber(ticketNumbers);
		SalesOrder ticket = EntityCreator.create(idCard, tickets); // 新建一个ticket的
		result.add(ticket);
		return result;
	}