admin.jsp
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:

Java编程

开发平台:

Java

  1. <html>
  2. <head>
  3.   <title>Administrator Page</title>
  4. </head>
  5. <%@ page errorPage="error.jsp" %>
  6. <%@ page import="java.util.*,day21ex.order.OrderDetails"%>
  7. <h3>Pending order List</h3>
  8.         
  9. <table border=1>        
  10.   <tr>
  11.     <th><b>Order Id<b></b></th>
  12.     <th><b>Student Id</b></th>
  13.     <th><b>Order Date</b></th>
  14.     <th><b>Amount</b></th>
  15.     <th><b>Status</b></th>
  16.     <th><b>Action</b></th>
  17.   </tr>
  18.     <%
  19.       Collection orders 
  20.         = (java.util.Collection) session.getAttribute("orderToApproveList");
  21.       if ( orders != null ) {
  22.       Iterator it = orders.iterator();
  23.       while ( it != null && it.hasNext() ) {
  24.          OrderDetails orderDetails = (OrderDetails)it.next();
  25.     %>
  26.      <tr>
  27.        <td><%= orderDetails.getOrderId() %> </td>
  28.        <td> <%= orderDetails.getStudentId() %> </td>
  29.        <td> <%= java.text.DateFormat.getDateInstance(java.text.DateFormat.LONG).format( orderDetails.getOrderDate()) %> </td>
  30.        <td> <%= java.text.NumberFormat.getCurrencyInstance().format(orderDetails.getAmount()) %> </td>
  31.        <td> <%= orderDetails.getStatus() %> </td>
  32.        <td> <a href="/ursday21ex/URSControllerServlet?pageName=adminPage&orderId=<%=orderDetails.getOrderId()%>">Approve</a> </td>
  33.        </tr>
  34.      <% 
  35.          }
  36.        }
  37.       %>
  38. </table>
  39. </body>
  40. </html>