JSP实现树型组织架构(3)--管理页面orgManage.jsp__教程 |
|
日期:2007-5-20 1:14:54 人气:94 [大 中 小] |
|
|
|
</tr> <% try{ int i=1; ps=conn.prepareStatement(queryCount); ps.setString(1, "A10%"); rs=ps.executeQuery(); int result=1; while(rs.next()) { result++;} //out.println(result);
for( i=1; i<=result; i++){ ps=conn.prepareStatement(queryName) ; String queryNameCondition="A"+(9+i)+"%"; //out.println(queryNameCondition); ps.setString(1, queryNameCondition); ResultSet rs1=ps.executeQuery(); String qa=null; String qaTemp=null; String qaTemp1=null;
while( rs1.next()){ qa=rs1.getString("total"); qaTemp=qa.substring(3,5); qaTemp1=qa.substring(3,6);
%>
<tr bgcolor="#F0F8FF"> <td width="29%" height="18"><%=rs1.getString("name")%></td> <td width="19%" height="18"> </td> <td width="19%" height="18"> </td> <td width="19%" height="18"> </td> <td width="19%" height="18"><a href="orgDelete.jsp?name=<%=rs1.getString("name")%>">刪除部門</a></td>
</tr> <%
queryNameCondition=qaTemp1+"%"; //out.println(queryNameCondition); ps.setString(1, queryNameCondition); ResultSet rs2=ps.executeQuery(); int result1=1; while(rs2.next()) { result1++;} //out.println(result1); for( i=1; i<=result1; i++){ ps=conn.prepareStatement(queryName) ; ps.setString(1, queryNameCondition); ResultSet rs3=ps.executeQuery(); String qb=null; String qbTemp=null; String qbTemp1=null; while( rs3.next()){
qb=rs3.getString("total"); qbTemp=qb.substring(3,5); qbTemp1=qb.substring(3,6); %> <tr bgcolor="#F0F8FF"> <td width="29%" height="18"> </td> <td width="19%" height="18"><%=rs3.getString("name")%></td> <td width="19%" height="18"> </td> <td width="19%" height="18"> </td> <td width="19%" height="18"><a href="orgDelete.jsp?name=<%=rs3.getString("name")%>">刪除部門</a></td> </tr> <% ps=conn.prepareStatement(queryCount);
queryNameCondition=qbTemp1+"%";
//out.println(queryNameCondition); ps.setString(1, queryNameCondition); ResultSet rs4=ps.executeQuery(); int result2=1; while(rs4.next()) { result2++;} //out.println(result); for( i=1; i<=result2; i++){ ps=conn.prepareStatement(queryName) ; ps.setString(1, queryNameCondition); ResultSet rs5=ps.executeQuery(); String qc=null; String qcTemp=null; String qcTemp1=null; while( rs5.next()){ qc=rs5.getString("total"); qcTemp=qc.substring(3,5); qcTemp1=qc.substring(3,6); %>
<tr bgcolor="#F0F8FF"> <td width="29%" height="18"> </td> <td width="19%" height="18"> </td> |
|
出处:本站原创 作者:佚名 |
|
|