JAVAWeb开发酒店管理系统总结报告_第1页
JAVAWeb开发酒店管理系统总结报告_第2页
JAVAWeb开发酒店管理系统总结报告_第3页
JAVAWeb开发酒店管理系统总结报告_第4页
JAVAWeb开发酒店管理系统总结报告_第5页
已阅读5页,还剩47页未读 继续免费阅读

下载本文档

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

文档简介

课程设计报告书班级软件1201学号姓名李明坤学号姓名顾敬程学号姓名曹笑诚一设计内容1设计课题2设计目的3小组分工4程序代码5效果截图6总结感受二设计步骤1.设计课题:红酒公司管理系统2.设计目的:管理员的登录,然后实现酒店管理员对本酒店VIP客户,酒品及员工的增删改查功能,以及分页功能。酒品的模糊搜索和备注功能。以及有一个Filter。3.小组分工:顾敬程:管理员的登录,然后实现酒店管理员对本酒店酒品的增删改查功能,以及分页功能,酒品的模糊搜索和备注功能,能够在当前取得管理员名字与备注内容一起显示,和一个Filter。李明坤:实现酒店管理员对本酒店VIP客户的增删改查功能,以及分页功能,图片的查找,JSP美化。曹笑诚:实现酒店管理员对本酒店员工的增删改查功能,以及分页功能,首页的设计。4.程序部分主要代码:Jsp页面:(1)欢迎界面:<body><center><imgheight="500"width="1300"src="images/huanyin.jpg"><ahref="managerLogin.jsp"class="STYLE1">登录</a></center></body>(2)登录页面<div><spanstyle="color:red">${requestScope.msg}</span><formaction="ManagerServlet?flag=6"method="post"><center><spanclass="STYLE10"><strong><fontface="楷体"size="5">管理员登录页面</font></strong><br></span><br><spanclass="STYLE10"><fontsize="4"face="楷体">管理员</font></span>:<inputtype="text"name="managername"><br/><spanclass="STYLE10"><fontsize="4"face="楷体">密码</font></span>:<inputtype="password"name="password"><br><br/><inputtype="submit"value="登录"><inputtype="reset"value="重置"><br/></center></form></div>(3)首页面<divid="top"><ulclass="topNav"><li><ahref="ListUser.jsp"class="hover">vip管理</a></li><li><ahref="ListProduct.jsp">酒品管理</a></li><li><ahref="ListMessage.jsp">员工管理</a></li><liclass="noImg"><ahref="../managerLogin.jsp">返回登录</a></li></ul><label>Search</label><inputtype="submit"name="signup"value=""class="signup"/><h1></h1></div>(4)vip管理①进入页面<divid="topMain"><divid="top"><ahref="index.html"><imgsrc="images/red_juice.gif"alt="redjuice"width="202"height="81"border="0"class="logo"/></a><ahref="#"><imgsrc="images/login.gif"alt="login"width="106"height="80"border="0"class="login"/></a><ulclass="topNav"><li><ahref="../Userservlet?flag=5"class="topNav">查看所有VIP信息</a></li><li><ahref="manager.jsp">返回首页</a></li>②显示页面<body><spanclass="STYLE22">显示vip信息</span><tableborder="1"><tr><td>用户ID</td><td>用户名</td><td>vip卡号</td><td>修改操作</td><td>删除操作</td></tr><c:forEachitems="${requestScope.pageBean.data}"var="u"><tr><td>${u.id}</td><td>${u.username}</td><td>${u.password}</td><td><ahref="updateUser.jsp?userid=${u.id}&username=${u.username}&password=${u.password}">修改</a></td><td><ahref="../Userservlet?flag=4&userid=${u.id}">删除</a></td>当前页:<inputid="pageNo"type="text"name="pageNo"value="${pageBean.pageNo}"/>总记录数:${pageBean.totalCount}条共有${pageBean.totalPage}页</center><c:iftest="${pageBean.previous}"><center><ahref="../Userservlet?flag=5&pageNo=${pageBean.pageNo-1}">上一页</a></center></c:if><c:iftest="${pageBean.next}"><center><ahref="../Userservlet?flag=5&pageNo=${pageBean.pageNo+1}">下一页</a></center></c:if><center><ahref="../Userservlet?flag=5&pageNo=${pageBean.totalPage}">最后一页</a></center></td></tr></table></div></div>③修改页面<div><p><spanclass="STYLE19">修改卡号</span></p><p><br></p><formaction="../Userservlet"method="post"><p><inputtype="hidden"name="flag"value="3">vipID:<inputtype="text"name="userid"value="${param.userid}"readonly="readonly"/><br>Vip名:<inputtype="text"name="username"value="${param.username}"readonly="readonly"/><br>vip原卡号:<inputtype="text"name="oldpwd"value="${param.password}"readonly="readonly"/><br>vip新卡号:<inputtype="text"name="newpwd"/></p><p><br><inputtype="submit"value="修改"><inputtype="reset"value="重填"></p></form></div>④增添页面<formaction="../Userservlet?flag=2"method="post"><p>请输入vip名:<inputtype="text"name="username"/><br/>请输入您卡号:<inputtype="text"name="password"></p><p><br/><inputtype="submit"value="添加"><inputtype="reset"value="重填"><br/>(4)酒品管理①进入页面<li><ahref="../ProductServlet?flag=5"class="topNav">查看所有酒品信息</a></li><li><ahref="manager.jsp">返回主页</a></li>②显示页面<spanclass="STYLE21">显示酒品信息</span><br></center><tableborder="1"><tr><td>酒品ID<td></td>酒名</td><td>酒品图片<td></td>酒品介绍<td></td></td>酒品价格<td>酒品本周得分<td></td>修改操作<td></td></td>删除操作</tr><c:forEachitems="${requestScope.pageBean.data}"var="u"><tr><td>${u.id}<td></td>${u.cpname}<td></td><imgwidth="200"height="200"src="${u.cppicture}"></img><td></td>${u.cpintroduce}</td><td>${u.cpprice}<td></td>${u.cpflid}<td></td><ahref="updateproduct.jsp?cpid=${u.id}&cpname=${u.cpname}&cppicture=${u.cppicture}&cpprice=${u.cpprice}&cpflid=${u.cpflid}">修改</a></td><td><ahref="ProductServlet?flag=4&cpid=${u.id}">删除</a><palign="center">当前页:<inputid="pageNo"type="text"name="pageNo"value="${pageBean.pageNo}"/>总记录数:${pageBean.totalCount}条共有${pageBean.totalPage}页</p><palign="center"><c:iftest="${pageBean.previous}"><ahref="ProductServlet?flag=5&pageNo=${pageBean.pageNo-1}">上一页</a></c:if><c:iftest="${pageBean.next}"><ahref="ProductServlet?flag=5&pageNo=${pageBean.pageNo+1}">下一页</a></c:if><ahref="ProductServlet?flag=5&pageNo=${pageBean.totalPage}">最后一页</a></p></td></tr></table></div>③修改页面<pclass="STYLE17"><fontface="楷体">修改酒品</font><p><br></p></p><formaction="../ProductServlet?flag=3"method="post"><fontsize="4"face="楷体"><p><spanclass="STYLE18">酒品ID:<inputtype="text"name="cpid"value="${param.cpid}"readonly="readonly"/></span></p><pclass="STYLE18"><inputtype="text"酒品新名:name="newcpname"/><br>酒品新介绍::<inputtype="text"name="newcpintroduce"/><br/>酒品新图片路径:<inputtype="text"name="newcppicture"><br/>酒品原价格:<inputtype="text"name="oldcpprice"value="${param.cpprice}"readonly="readonly"/><br>酒品新价格:<inputtype="text"name="newcpprice"/><br>酒品原得分<inputtype="text"name="oldcpflid"value="${param.cpflid}"readonly="readonly"/><br>酒品新得分:<inputtype="text"name="newcpflid"/></p><p><br><inputtype="submit"value="修改"><inputtype="reset"value="重填"><br/></p></form></div></center>④增添页面<p><spanclass="STYLE13"><fontsize="5"><fontface="楷体">添加一个酒品</font></span></p><p><br></p><formaction="../ProductServlet?flag=2"method="post"><p><fontsize="4"face="楷体"><spanclass="STYLE14">请输入酒品名:<inputtype="text"name="cpname"/><br/>请输入酒介绍:<inputtype="text"name="cpintroduce"/><br/>请输入酒图片:<inputtype="text"name="cppicture"/><br/>请输入酒价格:<inputtype="text"name="cpprice"><br/>请输酒品得分:<inputtype="text"name="cpflid"></font></p><p><fontsize="4"face="楷体"><br/><inputtype="submit"value="添加"><inputtype="reset"value="重填">⑤搜索显示+备注功能+备注显示<fontsize="4"face="楷体"color="#ff8040">图片</font>:<imgwidth="200"height="200"src="${u.cppicture}"></img><br/><fontsize="4"face="楷体"color="#ffff00">价格</font>:${u.cpprice}<br/><fontsize="4"face="楷体"color="#ff8040">简介</font>:${u.cpintroduce}<br/>id:${u.id}<formaction="CpServlet?flag=12&cpid=${u.id}"method="post"><inputtype="hidden"name="cpplid"value="${u.id}"><tableborder="1"rules="rows"><tr><td><fontsize="4"face="楷体"color="#ffff00">备注内容</font>:</td><td><textareaname="cpplcontent"rows="8"cols="34"></textarea></td></tr><tralign="center"height="30"><tdcolspan="2"><fontsize="4"face="楷体"color="#ff8040"><inputtype="submit"value="确认"></font><fontsize="4"><inputtype="reset"value="重置"></font></td></table></form></c:forEach><c:forEachitems="${requestScope.cppllist}"var="c"><fontface="楷体"size="4"color="#ff8000">备注内容</font>:${c.cpplcontent}<fontsize="4"face="楷体"color="#ffff00">管理员</font>${c.cpplusername}<br/></c:forEach></div><br/>(5)员工管理①进入页面<li><ahref="../MessageServlet?flag=5"class="topNav">查看所有员工信息</a></li><li><ahref="manager.jsp">返回主页</a></li>②显示页面<spanclass="STYLE20">显示员工信息</span><br><tableborder="1"><tr><td>员工ID</td><td>用户名</td><td>员工电话</td><td>修改操作</td><td>删除操作</td></tr><c:forEachitems="${requestScope.pageBean.data}"var="u"><tr><td>${u.id}</td><td>${u.username}</td><td>${u.password}</td><td><ahref="updateMessage.jsp?userid=${u.id}&username=${u.username}&password=${u.password}">修改</a></td><td><ahref="../MessageServlet?flag=4&userid=${u.id}">删除</a></td></tr></c:forEach></table><p></p><p><ahref="registerMessage.jsp">添加新员工</a><ahref="manager.jsp">返回主页</a><p></p><palign="center">当前页:<inputid="pageNo"type="text"name="pageNo"value="${pageBean.pageNo}"/></p><palign="center">总记录数:${pageBean.totalCount}条<palign="center">共有${pageBean.totalPage}页<c:iftest="${pageBean.previous}"></p><ahref="../MessageServlet?flag=5&pageNo=${pageBean.pageNo-1}"><br>上一页</a></c:if><c:iftest="${pageBean.next}"><ahref="../MessageServlet?flag=5&pageNo=${pageBean.pageNo+1}">下一页</a></c:if><ahref="../MessageServlet?flag=5&pageNo=${pageBean.totalPage}">最后一页</a></p></td></tr></div>③修改页面<pclass="STYLE16">修改员工信息</p><p><br></p><formaction="../MessageServlet?flag=3"method="post"><p>用户ID:<inputtype="text"name="userid"value="${param.userid}"readonly="readonly"/><br>用户名:<inputtype="text"name="username"value="${param.username}"readonly="readonly"/><br>员工原电话:<inputtype="text"name="oldpwd"value="${param.password}"readonly="readonly"/><br>员工新电话:<inputtype="text"name="newpwd"/></p><p><br><inputtype="submit"value="修改"><inputtype="reset"value="重填"></p></form>④增添页面<pclass="STYLE12">添加一个新员工</p><formaction="../MessageServlet?flag=2"method="post"><p>请输入员工名:<inputtype="text"name="username"/><p>请输入您电话:<inputtype="text"name="password"></p><p><br/><inputtype="submit"value="添加">后台:(1)FilterpublicvoiddoFilter(ServletRequestreq,ServletResponseresp,FilterChainchain)throwsIOException,ServletException{HttpServletRequestrequest=(HttpServletRequest)req;HttpServletResponseresponse=(HttpServletResponse)resp;HttpSessionsession=request.getSession();if(null!=session.getAttribute("manager")){chain.doFilter(request,response);}else{request.setAttribute("msg","您没有权限访问!");request.getRequestDispatcher("../index.jsp").forward(request,response);}}publicvoidinit(FilterConfigarg0)throwsServletException{System.out.println("log-init");(2)Servlet1vip//增添vipprivatevoidinserttwo(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{Stringusername=request.getParameter("username");Stringpassword=request.getParameter("password");Useruser=newUser();user.setUsername(username);user.setPassword(password);intb=us.inserttwo(user);listPage(request,response);}//分页privatevoidlistPage(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubStringpageNoStr=request.getParameter("pageNo");if(pageNoStr!=null){pageNo=Integer.valueOf(pageNoStr);}PageBean<User>pageBean=newPageBean<User>();List<User>list=us.listPage(null,pageNo,pageSize);pageBean.setData(list);pageBean.setPageNo(pageNo);pageBean.setPageSize(pageSize);pageBean.setTotalCount(us.count());request.setAttribute("pageBean",pageBean);request.getRequestDispatcher("xsUser.jsp").forward(request,response);}//删除一个vip信息privatevoiddeleteOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubintid=Integer.parseInt(request.getParameter("userid"));us.deleteOne(id);//findAll(request,response);listPage(request,response);}//修改一个vip的密码privatevoidupdateOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubintid=//Integer.parseInt(request.getParameter("userid"));intid=Integer.parseInt(request.getParameter("userid"));Stringusername=request.getParameter("username");//Stringoldpwd=request.getParameter("oldpwd");Stringnewpwd=request.getParameter("newpwd");Useruser=newUser();user.setPassword(newpwd);user.setUsername(username);us.updateOne(user,id);//findAll(request,response);listPage(request,response);}//查询全部vip信息privatevoidfindAll(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubList<User>list=us.findAll();request.setAttribute("list",list);request.getRequestDispatcher("xsUser.jsp").forward(request,response);}2酒品//分页privatevoidlistPage(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{StringpageNoStr=request.getParameter("pageNo");if(pageNoStr!=null){pageNo=Integer.valueOf(pageNoStr);}PageBean<Product>pageBean=newPageBean<Product>();List<Product>list=us.listPage(null,pageNo,pageSize);pageBean.setData(list);pageBean.setPageNo(pageNo);pageBean.setPageSize(pageSize);pageBean.setTotalCount(us.count());request.setAttribute("pageBean",pageBean);request.getRequestDispatcher("xsProduct.jsp").forward(request,response);}//删除一个酒品信息privatevoiddeleteOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{intid=Integer.parseInt(request.getParameter("cpid"));us.deleteOne(id);//findAll(request,response);listPage(request,response);}//修改一个酒品信息privatevoidupdateOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubintid=Integer.parseInt(request.getParameter("cpid"));Stringnewcpname=request.getParameter("newcpname");Stringnewcpintroduce=request.getParameter("newcpintroduce");Stringnewcppicture=request.getParameter("newcppicture");Stringnewcpflid=request.getParameter("newcpflid");Stringnewcpprice=request.getParameter("newcpprice");Productcp=newProduct();cp.setCpintroduce(newcpintroduce);cp.setCppicture(newcppicture);cp.setCpprice(newcpprice);cp.setCpflid(newcpflid);cp.setCpname(newcpname);us.updateOne(cp,id);//findAll(request,response);listPage(request,response);}//添加一个酒品信息privatevoidinsertOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{Stringcpname=request.getParameter("cpname");Stringcpintroduce=request.getParameter("cpintroduce");Stringcppicture=request.getParameter("cppicture");Stringcpprice=request.getParameter("cpprice");Stringcpflid=request.getParameter("cpflid");Productcp=newProduct();cp.setCpintroduce(cpintroduce);cp.setCpname(cpname);cp.setCppicture(cppicture);cp.setCpprice(cpprice);cp.setCpflid(cpflid);intb=us.insertOne(cp);//findAll(request,response);listPage(request,response);}//查询全部酒品信息publicvoidfindAll(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{List<Product>list=us.findAll();request.setAttribute("list",list);request.getRequestDispatcher("xsProduct.jsp").forward(request,response);}//搜索菜品信息publicvoidfindAll10(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{Stringsscpname=request.getParameter("sscpname");List<Cp>list=us.findAll10(sscpname);request.setAttribute("list",list);request.getRequestDispatcher("cp3.jsp").forward(request,response);}//搜索后提取备注和菜品信息privatevoidfindOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{intid=Integer.parseInt(request.getParameter("cpid"));List<Cp>list=us.findOne(id);request.setAttribute("list",list);List<Cppl>cppllist=cs.findOne(id);request.setAttribute("cppllist",cppllist);request.getRequestDispatcher("cp3.jsp").forward(request,response);}//添加一个备注信息并获取管理员名字PrivatevoidinsertOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{HttpSessionsession=request.getSession();Stringcpplcontent=request.getParameter("cpplcontent");if(null!=session.getAttribute("user")){Stringcpplusername=((Manager)session.getAttribute("manager")).getManagername();}else{}intcpplflid=Integer.parseInt(request.getParameter("cpplid"));Cpplcppl=newCppl();cppl.setCpplcontent(cpplcontent);cppl.setCpplusername(cpplusername);cppl.setCpplflid(cpplflid);intb=us.insertOne(cppl);findOne(request,response);}}3员工//增加员工privatevoidinserttwo(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{Stringusername=request.getParameter("username");Stringpassword=request.getParameter("password");Messagemessage=newMessage();message.setUsername(username);message.setPassword(password);intb=us.inserttwo(message);listPage(request,response);}privatevoidlistPage(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubStringpageNoStr=request.getParameter("pageNo");if(pageNoStr!=null){pageNo=Integer.valueOf(pageNoStr);}PageBean<Message>pageBean=newPageBean<Message>();List<Message>list=us.listPage(null,pageNo,pageSize);pageBean.setData(list);pageBean.setPageNo(pageNo);pageBean.setPageSize(pageSize);pageBean.setTotalCount(us.count());request.setAttribute("pageBean",pageBean);request.getRequestDispatcher("xsMessage.jsp").forward(request,response);}//删除一个员工信息privatevoiddeleteOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubintid=Integer.parseInt(request.getParameter("userid"));us.deleteOne(id);//findAll(request,response);listPage(request,response);}//修改一个员工的密码privatevoidupdateOne(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubintid=//Integer.parseInt(request.getParameter("userid"));intid=Integer.parseInt(request.getParameter("userid"));Stringusername=request.getParameter("username");//Stringoldpwd=request.getParameter("oldpwd");Stringnewpwd=request.getParameter("newpwd");Messagemessage=newMessage();message.setPassword(newpwd);message.setUsername(username);us.updateOne(message,id);//findAll(request,response);listPage(request,response);}//查询全部员工信息privatevoidfindAll(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{//TODOAuto-generatedmethodstubList<Message>list=us.findAll();request.setAttribute("list",list);request.getRequestDispatcher("xsMessage.jsp").forward(request,response);}}④管理员privatevoidmanagerLogin(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{HttpSessionsession=request.getSession();StringmanagerName=request.getParameter("managername");StringpassWord=request.getParameter("password");Managermanager=us.managerLogin(managerName,passWord);if(manager!=null){session.setAttribute("manager",manager);request.getRequestDispatcher("manager/manager.jsp").forward(request,response);}else{request.setAttribute("msg","用户名和密码不正确!请输入用户名与密码!");request.getRequestDispatcher("managerLogin.jsp").forward(request,response);}(3)Dao.Impl1Vip//查询publicList<User>findAll(){Connectionconn=JdbcUti.getInstance().getConn();Stringsql="select*fromusertab11";List<User>list=newArrayList<User>();Statementstmt=null;ResultSetrs=null;try{stmt=conn.createStatement();rs=stmt.executeQuery(sql);while(rs.next()){Useruser=newUser();user.setId(rs.getInt("id"));user.setUsername(rs.getString("username"));user.setPassword(rs.getString("password"));list.add(user);}}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}finally{JdbcUti.getInstance().free(conn,stmt,rs);}returnlist;}//删除一个vippublicintdeleteOne(intid){Connectionconn=JdbcUti.getInstance().getConn();Stringsql="deletefromusertab11whereid=?";PreparedStatementpstmt=null;ResultSetrs=null;intb=0;try{pstmt=conn.prepareStatement(sql);pstmt.setInt(1,id);b=pstmt.executeUpdate();}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}finally{JdbcUti.getInstance().free(conn,pstmt,rs);}returnb;}//修改一个vippublicintupdateOne(Useruser,intid){Connectionconn=JdbcUti.getInstance().getConn();Stringsql="updateusertab11setpassword=?whereid=?";PreparedStatementpstmt=null;ResultSetrs=null;intb=0;try{pstmt=conn.prepareStatement(sql);pstmt.setString(1,user.getPassword());pstmt.setInt(2,id);b=pstmt.executeUpdate();}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}finally{JdbcUti.getInstance().free(conn,pstmt,rs);}returnb;}//分页总数publicintcount(){Connectionconn=JdbcUti.getInstance().getConn();Stringsql="selectcount(*)fromusertab11";PreparedStatementpstmt=null;ResultSetrs=null;intb=0;try{pstmt=conn.prepareStatement(sql);rs=pstmt.executeQuery();if(rs.next()){b=rs.getInt(1);}}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}finally{JdbcUti.getInstance().free(conn,pstmt,rs);}returnb;}//分页publicList<User>listPage(Stringsql,intpageNo,intpageSize){Connectionconn=JdbcUti.getInstance().getConn();List<User>list=newArrayList<User>();Statementstmt=null;ResultSetrs=null;intpagePos=(pageNo-1)*pageSize;if(sql==null){sql="select*fromusertab11orderbyidlimit"+pagePos+","+pageSize;}try{stmt=conn.createStatement();rs=stmt.executeQuery(sql);while(rs.next()){Useruser=newUser();user.setId(rs.getInt("id"));user.setUsername(rs.getString("username"));user.setPassword(rs.getString("password"));list.add(user);}}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}finally{JdbcUti.getInstance().free(conn,stmt,rs);}returnlist;}//增加vippublicintinserttwo(Useruser){Connectionconn=JdbcUti.getInstance().getConn();Stringsql="insertintousertab11(username,password)values(?,?)";PreparedStatementpstmt=null;ResultSetrs=null;intb=0;try{pstmt=conn.prepareStatement(sql);pstmt.setString(1,user.getUsername());pstmt.setString(2,user.getPassword());b=pstmt.executeUpdate(

温馨提示

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

评论

0/150

提交评论