商品管理增删改查.doc
文本预览下载声明
08信管2班 李晓龙 40805060222
查询所有
%@ page contentType=text/html;charset=GBk%
%@ page import=java.util.* %
%@ page import=goods.* %
jsp:useBean id=goodsmanageBeanId scope=session class=goods.goodsmanage/
htmlheadtitle显示所有商品信息/title/head
body bgcolor=grey
center
h1显示所有商品信息/h1
table border=2
tr
td商品编号/tdtd名称/tdtd规格/tdtd类型/tdtd价格/tdtd数量/tdtd金额/tdtd出厂日期/tdtd商品简介/tdtd是否打折/tdtd喜欢的商品类型/td
/tr
%
java.util.Hashtable goodsreg= new Hashtable();
goodsform allgoods=new goodsform();
java.util.Enumeration myEnumeration=null;
int goodsNum = 0;
if(goodsmanageBeanId.SearchAllUser())
{ goodsreg=goodsmanageBeanId.getMyHashtable();
myEnumeration=goodsreg.elements();
while(myEnumeration.hasMoreElements())
{ allgoods=(goodsform)myEnumeration.nextElement();
%
tr
td%=allgoods.getgoodsnumber() %/td
td%=allgoods.getgoodsname()%/td
td%=allgoods.getgoodssize() %/td
td%=allgoods.getgoodstype() %/td
td%=allgoods.getgoodsprice() %/td
td%=allgoods.getgoodsamount() %/td
td%=allgoods.getgoodssum() %/td
td%=allgoods.getgoodsdate() %/td
td%=allgoods.getgoodsintr() %/td
td%=allgoods.getisdiscount() %/td
td%=allgoods.getlikegoodstype()%/td
/tr
% }
}
if(goodsmanageBeanId.CountAllUser()==true)
{ goodsNum=goodsmanageBeanId.getgoodsNum();
}
%
tr
td商品数量/td
td%=goodsNum %/td
tda href=index.html返回首页/a/td
/tr
/table
/center
/body
/html
查询
%@ page contentType=text/html;charset=GBk%
%@ page import=java.util.* %
%@ page import=java.sql.* %
%@ page import=java.text.* %
jsp:useBean id=goodsmanageBeanId scope=session class=goods.goodsmanage/
%
request.setCharacterEncoding(gb2312);
String goodsnumber=;
String goodsname=;
String goodssize=;
int goodstype=0;
String goodstype1=;
String goodsprice=;
String goodsamount=;
int goodssum=0;
String goodsdate=;
String goodsintr=;
String isdiscount=;
String likegoodstype=;
goodsnumber=request.getParameter(goodsnumber).trim();
if(goodsmanageBeanId.SearchgoodsBygoodsnumber(goodsnumber)==true)
{ goodsnumber=goodsmanageBeanId.getgoodsreg().getgoodsnumber
显示全部