📄 order_list.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="" %>
<%@ page import = "com.eshop.dto.*" %>
<%@ page import = "com.eshop.daoImpl.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE3 {font-family: "Times New Roman", Times, serif; font-size: 12px; }
.STYLE4 {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
}
.STYLE7 {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<div align="center" class="STYLE4">订单清单
<%
String admin = (String)session.getAttribute("AdminId");
if(admin != null){
%>
</div>
<p> </p>
<table width="603" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="82"><a href=GoodsAdd.jsp class="STYLE3" >添加商品</a></td>
<td width="82"><a href=GoodsView.jsp class="STYLE3" >查看商品</a></td>
<td width="82"><a href=MemberView.jsp class="STYLE3" >查看会员</a></td>
<td width="82"><a href=MemberSeach.jsp class="STYLE3" >查找会员</a></td>
<td width="102"><a href=order_list.jsp class="STYLE3" >查看所有订单</a></td>
<td width="121"><a href=orderundo.jsp class="STYLE3" >查看未完成订单</a></td>
<td width="52"><a href=index.jsp class="STYLE3" > 返回</a></td>
</tr>
</table>
<%
}
else{
response.sendRedirect("backlogin.jsp");
}
%>
<table width="749" border="0" align="center" cellspacing="0" cellpadding="0">
<tr bgcolor="#0099FF" align="center">
<td width="66"><span class="STYLE3">订单编号</span></td>
<td width="74"><span class="STYLE3">商品编号</span></td>
<td width="106"><span class="STYLE3">购买会员</span></td>
<td width="81"><span class="STYLE3">商品单价</span></td>
<td width="91"><span class="STYLE3">购买数量</span></td>
<td width="83"><span class="STYLE3">总价格</span></td>
<td width="94"><span class="STYLE3">是否发货</span></td>
<td width="79"><span class="STYLE3">发货时间</span></td>
<td width="75"><span class="STYLE3">详单查询</span></td>
</tr>
<%
OrderDaoImpl odi = new OrderDaoImpl();
Vector list = odi.selectAll();
String color ="";
double totle = 0;
for(int i=0;i<list.size();i++)
{
Order o = (Order)list.elementAt(i);
totle +=o.getTotle();
if(i%2==0) color = "#99FFFF";
else color = "#00CCFF";
%>
<tr bgcolor="<%=color %>" align="center">
<td><span class="STYLE3"><%=o.getId() %></span></div></td>
<td><span class="STYLE3"><%=o.getGid() %></span></td>
<td><span class="STYLE3"><%=o.getuserName() %></span></td>
<td><span class="STYLE3"><%=o.getPrice() %></span></td>
<td><span class="STYLE3"><%=o.getMount() %></span></td>
<td><span class="STYLE3"><%=o.getTotle() %></span></td>
<td><span class="STYLE3"><%=o.getEnforce() %></span></td>
<td><span class="STYLE3"><%=o.getDate() %></span></td>
<td><a href="order.jsp?userName=<%=o.getuserName() %>" class="STYLE3">详单</a></td>
</tr>
<%} %>
</table>
<p align="center" class="STYLE7">总交易金额: <%=totle %>元</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -