ÎïÒµ¹ÜÀíÐÅϢϵͳÉè¼Æ--±ÏÒµÂÛÎÄ ÏÂÔØ±¾ÎÄ

4.1.9ÒµÖ÷ÐÅÏ¢²éѯ

ͼ23Ëùʾ¼´ÎªÒµÖ÷ÐÅÏ¢²éѯ½çÃæ£¬ÆÕͨҵÖ÷½ö½ö¿ÉÒÔ²éѯÓû§ÐÅÏ¢£º

ͼ23ÒµÖ÷ÐÅÏ¢²éÑ¯Ò³Ãæ

ºËÐÄ´úÂ룺

37

<%

//»ñÈ¡WebApplicationContext WebApplicationContext wac=

WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());

DButil db = (DButil)wac.getBean(\); int i = 0;

for(userInfo user:userlist){ String userId = user.getUserId(); String houseId=user.getHouseId();

HouseInfo houseInfo=(HouseInfo)db.getObject(\,houseId); String name=user.getName(); String sex=user.getSex();

String profession=user.getProfession(); String telephone=user.getTelephone(); Date cometime=user.getCometime(); int livenumber=user.getLivenumber();

38

if(i%2==0){ } else{ }

i++;

out.println(\); i++;

out.println(\);

%>

<%

}

%>

ÒµÖ÷ÐÕÃû ÐÔ±ð Ö°Òµ µç»° Èëסʱ¼ä ÈëסÈË¿Ú ·¿ÎݵØÖ·
<%= name %> <%= sex %> <%= profession %> <%= telephone %> <%= cometime %> <%= livenumber %> <%= houseInfo.getAddress() %>

4.1.10±¨ÐÞÐÅÏ¢²éѯ

39

ͼ24Ëùʾ¼´Îª±¨ÐÞÐÅÏ¢²éѯ½çÃæ£¬ÒµÖ÷²»µ«Äܹ»¶Ô¸÷ÖÖ±¨ÐÞÐÅÏ¢½øÐвéѯ£¬¶øÇÒ¿ÉÒÔ±¾ÉíÏÖʵÐèÒª°ÑÏàÓ¦±¨ÐÞÉêÇëÌá³ö£º

ͼ24±¨ÐÞÐÅÏ¢²éÑ¯Ò³Ãæ

ºËÐÄ´úÂ룺

<%

40





±àºÅ ÒµÖ÷Ãû µç»° ±¨ÐÞʱ¼ä µØÖ· ±¨ÐÞÄÚÈÝ Íê³É״̬ ²é¿´/ÐÞ¸Ä