📄 bookgood.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {font-family: "新宋体"}
.STYLE2 {font-size: medium}
-->
</style>
</head>
<body bgcolor="#0099FF">
<%
session.getAttribute("dept_id");
%>
<h1 align="center">请订购商品</h1><h3><a href="operator.jsp">返回</a></h3><hr>
<form name="form1" method="post" action="">
<table width="949" border="1">
<tr>
<td height="33"><h3 align="center"bgcolor="#FFCC99">商品编号</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品名称</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">供货商编号</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品单价</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品单位</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">商品信息</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">部门编号</h3></td>
<td><h3 align="center"bgcolor="#FFCC99">订购</h3></td>
</tr>
<%
try{
ResultSet rs =(ResultSet)request.getAttribute("applet");
int dept_id = 0;
while(rs.next()){
//dept_id = rs.getInt("dept_id");
%>
<tr>
<td height="34" align="center"><%=rs.getInt("good_id")%></td>
<td align="center">*<%=rs.getString("good_name")%>*</td>
<td align="center"><%=rs.getInt("vender_id")%></td>
<td align="center">¥:<%=rs.getDouble("good_price")%>元</td>
<td align="center"><%=rs.getString("good_unit")%></td>
<td align="center"><%=rs.getString("good_message")%></td>
<td align="center"><%=rs.getInt("dept_id")%></td>
<td align="center"><a href=/SMarket/c?id=<%=rs.getInt("good_id")%> class="STYLE2">订购</a></td>
</tr>
<%
}
session.setAttribute("dept_id",session.getAttribute("dept_id"));
%>
</table>
<p> </p>
<hr>
<p><h3 align="center"><a href="booknewgood.jsp?id=<%=dept_id%>" class="STYLE1">订购新商品</a></h3>
</p>
<%
}catch(Exception e){
e.printStackTrace();
}
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -