⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bfhqmodify.jsp

📁 这是一个学习jsp的基本程序
💻 JSP
字号:
<%@ page    language="java"    contentType="text/html; charset=GBK"    import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*"%><%  request.setCharacterEncoding("GBK");  session=request.getSession();  userStruct user=(userStruct)session.getAttribute("user");  if(user==null){  response.sendRedirect("../../login.html");  }else{%><%Context psctx=new InitialContext();Object psref=psctx.lookup("OfficeUnitController");OfficeUnitControllerHome officeUnitControllerHome=(OfficeUnitControllerHome) PortableRemoteObject.narrow(psref,OfficeUnitControllerHome.class);;OfficeUnitController officeUnitController=officeUnitControllerHome.create();Integer planyear = new Integer(request.getParameter("planyear"));Integer unitid = new Integer(request.getParameter("unitid"));Context ctx=new InitialContext(); Object ref=ctx.lookup("SchemeplanController"); SchemeplanControllerHome schemeplanControllerHome=(SchemeplanControllerHome) PortableRemoteObject.narrow(ref,SchemeplanControllerHome.class);; SchemeplanController schemeplanController=schemeplanControllerHome.create(); Collection c = new ArrayList(); c = schemeplanController.getPlanByPlanyear(planyear); Collection collect1 = new ArrayList();Judge jd = new Judge(); Iterator i = c.iterator(); while(i.hasNext()) { SchemeplanStruct sps = (SchemeplanStruct)i.next(); if(sps.planstatus.intValue()==3) { if(jd.decide(unitid,sps.unitid)) { collect1.add(sps); } } }Collection collect = new ArrayList();i = collect1.iterator();while(i.hasNext()){  SchemeplanStruct sps = (SchemeplanStruct)i.next();  Collection tc = schemeplanController.getPlandetailsByPlanid(sps.planid);  Iterator ti = tc.iterator();  while(ti.hasNext())  {  PlandetailsStruct pds = (PlandetailsStruct)ti.next();  collect.add(pds);}}%><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=gb_2312-80"><link rel="stylesheet" href="../../css/stii.css" type="text/css"></HEAD><BODY><form name="myform" method="post" action="bfhqmodified.jsp"><table width=600 class=title cellspacing=0 cellpadding=0 border=1 align=center ><caption align=center><font size=6>未通过申请修改</font></caption><tr align=center><td>设备名称<td>申请单位<td>设备数量<td>设备总价(万元)</tr><%Vector pdv = new Vector();int count = 0;i = collect.iterator();while(i.hasNext()){  PlandetailsStruct pds = (PlandetailsStruct)i.next();  Collection ousc = officeUnitController.getUnitid(pds.unitid);  Iterator ousi = ousc.iterator();  officeUnitStruct ous = (officeUnitStruct)ousi.next();  String name_amount = "amount"+count;  String name_price ="price"+count; pdv.addElement(pds);%><tr align=center><td><%=pds.devicename%><td><%=ous.processname%><td><input type=text value="<%=pds.appamount%>" name="<%=name_amount%>"><td><input type=text value="<%=pds.deviceprice%>" name="<%=name_price%>"></tr><%count++;}session.setAttribute("bfhqmodpdv",pdv);%><tr align=center><td colspan=4><input type=hidden name="planyear" value="<%=planyear%>"><input type=hidden name="unitid" value="<%=unitid%>"><input type=submit name="fdsaf" value=" 确  定 " class="file" onClick="return confirm('请确认设备数量和设备总价输入正确!')">&nbsp;&nbsp;<input type=reset name="gr" value=" 还  原 " class="file">&nbsp;&nbsp;<input type=button name="gfsaf" value=" 取 消 "  class="file" onClick="javascript:history.go(-1)"></td></tr></table></form></BODY></HTML><%}%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -