基于JSP小型超市管理系统_第1页
基于JSP小型超市管理系统_第2页
基于JSP小型超市管理系统_第3页
基于JSP小型超市管理系统_第4页
基于JSP小型超市管理系统_第5页
已阅读5页,还剩22页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

课程设计报告课程名称基于J2EE的项目开发设计题目超市管理系统专业班级软件1231姓名刘香弟学号1204311106成绩评定考核内容设计表现设计报告答辩综合评定成绩成绩计算机技术与工程学院和谐勤奋求是创新<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><%@tagliburi="/jsp/jstl/core"prefix="c"%><% Stringpath=request.getContextPath(); StringbasePath=request.getScheme()+"://" +request.getServerName()+":"+request.getServerPort() +path+"/";%><!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"><html> <head> <basehref="<%=basePath%>"> <title>MyJSP'login.jsp'startingpage</title> <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache"> <metahttp-equiv="expires"content="0"> <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3"> <metahttp-equiv="description"content="Thisismypage"> <!-- <linkrel="stylesheet"type="text/css"href="styles.css"> --> <linktype="text/css"rel="stylesheet"href="css/style.css"/> <scripttype="text/javascript"> <!--将表单中的数据清空--> functionclearInfo(onePart){ document.getElementById(onePart).innerHTML=""; } </script> </head> <bodyclass="blue-style"> <divid="login"> <divclass="icon"></div> <divclass="login-box"> <formmethod="post"action="DologinServlet"> <dl> <dt> 用户名: </dt> <dd> <inputtype="text"name="userName"class="input-text"onFocus="clearInfo('tishiMsg')"/> </dd> <dt> 密码: </dt> <dd> <inputtype="password"name="passWord"class="input-text"/> </dd> </dl> <divclass="buttons"> <inputtype="submit"name="submit"value="登录系统" class="input-button"/> <inputtype="reset"name="reset"value="重填"class="input-button"onclick="clearInfo('tishiMsg')"/> </div> </form> <c:iftest="${flag==false}"> <divstyle="margin-left:450px;margin-top:6px;color:#F00"> <spanid="tishiMsg"style="color:#F00">登录失败!请重新登陆</span>publicinterfaceUserDao{ //判断用户登录是否成功 publicUserifLogin(Stringname,Stringpassword); //根据用户名查询用户表中的数据 publicList<User>findUserInfoByName(StringuserName); //获取数据库中用户表中的数据并封装在集合中 publicList<User>getAllUserInfo(); //向用户管理中添加用户信息 publicbooleanadd(Useruser); //根据用户编号修改用户管理页面中的用户信息 publicintupdateUserInfo(Useruser,intuserId); //根据用户名编号查询用户表中的数据 publicUserfindUserInfoById(intuserId); //根据用户编号删除用户管理页面中相应的用户信息 publicintdeleteUserInfoById(intuserId); //分页获取用户信息 publicPageSizegetUserInfoByPage(intcurrPage); //修改用户密码 publicintupdateUserPwdInfo(intuserId,StringuserNewPwd);}<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><%@tagliburi="/jsp/jstl/core"prefix="c"%><% Stringpath=request.getContextPath(); StringbasePath=request.getScheme()+"://" +request.getServerName()+":"+request.getServerPort() +path+"/";%><!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"><html> <head> <basehref="<%=basePath%>"> <title>MyJSP'login.jsp'startingpage</title> <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache"> <metahttp-equiv="expires"content="0"> <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3"> <metahttp-equiv="description"content="Thisismypage"> <!-- <linkrel="stylesheet"type="text/css"href="styles.css"> --> <linktype="text/css"rel="stylesheet"href="css/style.css"/> <scripttype="text/javascript"> <!--将表单中的数据清空--> functionclearInfo(onePart){ document.getElementById(onePart).innerHTML=""; } </script> </head> <bodyclass="blue-style"> <divid="login"> <divclass="icon"></div> <divclass="login-box"> <formmethod="post"action="DologinServlet"> <dl> <dt> 用户名: </dt> <dd> <inputtype="text"name="userName"class="input-text"onFocus="clearInfo('tishiMsg')"/> </dd> <dt> 密码: </dt> <dd> <inputtype="password"name="passWord"class="input-text"/> </dd> </dl> <divclass="buttons"> <inputtype="submit"name="submit"value="登录系统" class="input-button"/> <inputtype="reset"name="reset"value="重填"class="input-button"onclick="clearInfo('tishiMsg')"/> </div> </form> <c:iftest="${flag==false}"> <divstyle="margin-left:450px;margin-top:6px;color:#F00"> <spanid="tishiMsg"style="color:#F00">登录失败!请重新登陆</span> <basehref="<%=basePath%>"> <title>MyJSP'BillModify.jsp'startingpage</title> <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache"> <metahttp-equiv="expires"content="0"> <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3"> <metahttp-equiv="description"content="Thisismypage"> <!-- <linkrel="stylesheet"type="text/css"href="styles.css"> --> <linktype="text/css"rel="stylesheet"href="css/style.css"/> <scripttype="text/javascript"><!--验证账单编号-->functioncheckNum(){ vartxtId=document.getElementById("billNum").value; if(txtId.length==0){ document.getElementById("idMsg").innerHTML="账单编号不能为空!";} if(flag==false){ document.getElementById("idMsg").innerHTML="账单编号已经存在!"; }varreg=/^[0-9]*$/; if(!reg.test(txtId)){ document.getElementById("idMsg").innerHTML="账单编号必须为数字!"; document.getElementById("billNum").value=""; } }<!--将表单中的数据清空--> functionclearInfo(onePart,twoPart){ document.getElementById(onePart).value=""; document.getElementById(twoPart).innerHTML=""; } <!--验证交易金额--> functioncheckMoney(){ vartxtMoney=document.getElementById("money").value; if(txtMoney.length==0){ document.getElementById("moneyMsg").innerHTML="请输入交易金额!";} varreg=/^[0-9]*$/; if(!reg.test(txtMoney)){ document.getElementById("moneyMsg").innerHTML="非法字符,请输入数字!"; document.getElementById("money").value="";<!--验证交易单位--> functioncheckUnit(){ vartxtUnit=document.getElementById("unit").value; if(txtUnit.length==0){ document.getElementById("unitMsg").innerHTML="请输入交易单位!"; } } <!--验证交易数量--> functioncheckAmount(){ vartxtAmount=document.getElementById("amount").value; if(txtAmount.length==0){ document.getElementById("amountMsg").innerHTML="交易数量不能为空!";} varreg=/^[0-9]*$/; if(!reg.test(txtAmount)){ document.getElementById("moneyMsg").innerHTML="非法字符,请输入数字!"; document.getElementById("money").value=""; }} <!--验证商品名称--> functioncheckComName(){ vartxtComName=document.getElementById("comName").value; if(txtComName.length==0){ document.getElementById("comNameMsg").innerHTML="商品名称不能为空!";} varreg=/^[\u4e00-\u9fa5]{0,}$/; if(!reg.test(txtComName)){ document.getElementById("comNameMsg").innerHTML="非法字符,请输入汉字!"; document.getElementById("comNameMsg").value=""; }} <!--验证商品描述--> functioncheckDiscription(){ vartxtDiscription=document.getElementById("discription").value; if(txtDiscription.length==0){ document.getElementById("discriptionMsg").innerHTML="商品描述不能为空!"; document.getElementById("discriptionMsg").value=""; } }<!--验证各表单中输入的数据时否合法-->functionsubmitYesNo(){ varallSpan=document.getElementsByTagName("span"); for(vari=0;i<allSpan.length;i++){ if(allSpan[i].innerHTML.length!=0){ returnfalse; break; }} returntrue;} <!--验证是否确认修改-->functioncheckReModify(){varifModify=confirm("确认修改吗?");if(ifModify){alert("恭喜您!修改成功!!");document.getElementById("myForm").submit();}}<!--验证是否确认删除-->functioncheckReDele(){varifModify=confirm("确认删除吗?");if(ifModify){location.href="DoDeleBillInfoByIdServlet?billId=${bill.billId}";}else{returnfalse;}}<%@pagelanguage="java" import="java.util.*,com.md.smarket.entity.PageSize" pageEncoding="UTF-8"%><%@tagliburi="/jsp/jstl/core"prefix="c"%><% Stringpath=request.getContextPath(); StringbasePath=request.getScheme()+"://" +request.getServerName()+":"+request.getServerPort() +path+"/";%><!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"><html> <head> <basehref="<%=basePath%>"> <title>MyJSP'admin_bill_list.jsp'startingpage</title> <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache"> <metahttp-equiv="expires"content="0"> <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3"> <metahttp-equiv="description"content="Thisismypage"> <!-- <linkrel="stylesheet"type="text/css"href="../styles.css"> --> <linktype="text/css"rel="stylesheet"href="css/style.css"/> <scripttype="text/javascript"> functiongoPage(){ vargoPageNo=document.getElementById("inputPage").value; vargoUrl="DoFindBillInfoByPageServlet?pageNo="+goPageNo; location.href=goUrl; } </script> </head> <body> <% PageSizecurrPage=(PageSize)request.getAttribute("page"); %> <divclass="menu"> <formmethod="post"action="DoFindByCommodyNmeAndIfPayBillInfo"> 商品名称: <inputtype="text"name="productName"class="input-text"/>     是否付款: <selectname="payStatus"> <optionvalue="0"> 请选择 </option> <optionvalue="1"> 已付款 </option> <optionvalue="2"> 未付款 </option> </select>      <inputtype="submit"name="submit"value="组合查询"class="button"/> </form> </div> <divclass="main"> <divclass="optitleclearfix"> <em><inputtype="button"name="button"value="添加数据" class="input-button"onclick="location.href='billAdd.jsp'"/></em> <divclass="title"> 账单管理>> </div> </div> <divclass="content"> <tableclass="list"> <tr> <td>账单编号</td> <td>商品名称</td> <td>商品数量</td> <td>交易金</td> <td>是否付款</td> <td>供应</td> <td>商品描述</td>

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论