📄 shoppingselectbytype.jsp
字号:
<%@ page language="java" import="java.util.*,com.jxc.vo.*"
pageEncoding="UTF-8"%>
<head>
<style type="text/css">
<!--
.style3 {
font-size: 12px;
font-weight: bold;
}
.style4 {
font-size: 12px
}
.style6 {
font-size: 12px;
color: #FF00FF;
}
.style7 {
color: #000000
}
.style8 {
color: #FF00FF
}
.style10 {color: #0000FF}
-->
</style>
<script language="javascript" src="../JS/pagelist.js"></script>
</head>
<body bgcolor="#F1F4F8">
<%
if (session.getAttribute("yid") == null) {
%>
<script language=javascript>
window.location.href="../erro.jsp";
</script>
<%
}
%>
<form action="ShoppingSelectByType" method="post" name="listpage"class="style4">
<table width="660" height="460">
<tr>
<td bgcolor="#FFCCFF" width="660" height="30">
<jsp:include flush="true" page="Shopping_top.jsp" />
</td>
</tr>
<tr>
<td width="660" height="25">
<strong><span class="style3"><font color="#CC33CC">---->商品信息查询<----</font>
</span> </strong>
<center class="style3">
<strong><font color="#CC33CC"> </font> </strong>
</center>
</td>
</tr>
<tr>
<td width="660" height="25" valign="baseline">
<div align="center" class="style4">
请选择商品的种类:
<select name="stype">
<option value="食品"
<%if(("食品").equals((String)session.getAttribute("stype"))){
out.print( "selected");}
else{out.print( ""); }%>
>
--食品--
</option>
<option value="日用品"
<%if(("日用品").equals((String)session.getAttribute("stype"))){
out.print( "selected");}
else{out.print( ""); }%>>
--日用品--
</option>
<option value="服装" <%if(("服装").equals((String)session.getAttribute("stype"))){
out.print( "selected");}
else{out.print( ""); }%>>
--服装--
</option>
</select>
<input type="submit" name="Submit" value="提交检索">
</div>
</td>
</tr>
<tr>
<td width="660" height="340" valign="baseline">
<div align="center">
<span class="style6"> <%
List list = (List) session.getAttribute("list");
%> <%
if (session.getAttribute("erro") == "succ") {
%> 删除商品信息成功!</span>
<span class="style6"> <%
session.removeAttribute("erro");
} else if (session.getAttribute("erro") == "false") {
%> 删除商品信息失败!</span>
<span class="style6"> <%
session.removeAttribute("erro");
}
%> </span>
<%
if (session.getAttribute("list") != null) {
%>
<table width="640" border="0" align="center" bgcolor="#cccccc">
<tr>
<td bgcolor="#eeeeee" width="73">
<div align="center" class="style6 style4 style7">
商品编号
</div>
</td>
<td bgcolor="#eeeeee" width="86">
<div align="center" class="style6 style4 style7">
商品名
</div>
</td>
<td bgcolor="#eeeeee" width="82">
<div align="center" class="style6 style4 style7">
商品类别
</div>
</td>
<td bgcolor="#eeeeee" width="89">
<div align="center" class="style6 style4 style7">
供货商号
</div>
</td>
<td bgcolor="#eeeeee" width="92">
<div align="center" class="style6 style4 style7">
说明
</div>
</td>
<td bgcolor="#eeeeee" width="82">
<div align="center" class="style6 style4 style7">
生产厂商
</div>
</td>
<td bgcolor="#eeeeee" width="42">
<div align="center" class="style6 style4 style7">
修改
</div>
</td>
<td bgcolor="#eeeeee" width="41">
<div align="center" class="style6 style4 style7">
删除
</div>
</td>
</tr>
<%
if (list.size() == 0) {
%>
<tr>
<td bgcolor="#F1F4F8" colspan="8">
<div align="center" class="style6 style4 style8">
没有任何商品信息!!
</div>
</td>
</tr>
<%
} else {
for (int i = 0; i < list.size(); i++) {
Shopping shop = (Shopping) list.get(i);
%>
<tr>
<td bgcolor="#F1F4F8" width="73">
<div align="center" class="style6 style4 style7"><%=shop.getSid()%></div>
</td>
<td bgcolor="#F1F4F8" width="86">
<div align="center" class="style6 style4 style7"><%=shop.getSname()%></div>
</td>
<td bgcolor="#F1F4F8" width="82">
<div align="center" class="style6 style4 style7"><%=shop.getStype()%></div>
</td>
<td bgcolor="#F1F4F8" width="89">
<div align="center" class="style6 style4 style7">
<a href="#"><%=shop.getGid()%></a>
</div>
</td>
<td bgcolor="#F1F4F8" width="92">
<div align="center" class="style6 style4 style7"><%=shop.getSinfo()%></div>
</td>
<td bgcolor="#F1F4F8" width="82">
<div align="center" class="style6 style4 style7"><%=shop.getSsccs()%></div>
</td>
<td bgcolor="#F1F4F8" width="42">
<div align="center" class="style6 style4 style10">
<a
href="ShoppingSelectById?id=<%=shop.getSid()%>&method=update">修改</a>
</div> </td>
<td bgcolor="#F1F4F8" width="41">
<div align="center" class="style6 style4 style10">
<a
href="ShoppingDelectById?id=<%=shop.getSid()%>&method=selectbytype">删除</a>
</div> </td>
</tr>
<%
}
}
%>
</table>
<%
}
%>
</div>
</td>
</tr>
<%
if (session.getAttribute("list") != null) {
%>
<tr>
<td width="660" height="40">
<jsp:include page="../fenye.jsp"></jsp:include>
</td>
</tr>
<%
}
session.removeAttribute("list");
session.removeAttribute("stype");
session.removeAttribute("lastpagenumber");
session.removeAttribute("pagenumber");
%>
</table></form>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -