equipment_use_add_success.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:1k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="java.lang.*"%>
  3. <%@ page import="java.sql.Timestamp"%>
  4. <%@ page import="com.vnex.intranet.util.TimeStamp"%>
  5. <%@ page import="com.vnex.intranet.equipment.value.UserValueBean"%>
  6. <%@ page import="com.vnex.intranet.equipment.process.EquipmentException"%>
  7. <jsp:useBean id="equipmentProxy" class="com.vnex.intranet.equipment.proxy.EquipmentProxyBean" scope="session" /> 
  8. <jsp:useBean id="useValueAdd" class="com.vnex.intranet.equipment.value.EquipmentUseRecordValueBean" scope="session" /> 
  9. <jsp:setProperty name="useValueAdd" property="*" />
  10. <%
  11. Timestamp time = null;
  12. String equipmentId = request.getParameter("equipmentId");
  13. String equipmentCode = request.getParameter("equipmentCode");
  14. if (request.getParameter("startDay").length() != 0)
  15.     {
  16.     String startDay= request.getParameter("startDay") + " 00:00:00";
  17.     time = TimeStamp.toTimestamp(startDay);     
  18. }
  19. if (request.getParameter("equipmentId") == null)
  20. throw new EquipmentException("没有找到相应的ID号!");
  21.     useValueAdd.setEquipmentId(Integer.parseInt(request.getParameter("equipmentId")));
  22. useValueAdd.setStartTime(time);
  23. equipmentProxy.addUseRecord(useValueAdd);
  24. %>
  25. <html>
  26. <head>
  27. <script language=javascript>
  28. function forward()
  29. {
  30. document.location="/mainctrl/equipmentUseList?equipmentId=<%=equipmentId%>&equipmentCode=<%=equipmentCode%>";
  31. }
  32. </script>
  33. </head>
  34. <body onload="javascript:forward()">
  35. 成功!
  36. </body>
  37. <html>