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

电子政务应用

开发平台:

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="codeUse" class="com.vnex.intranet.equipment.value.EquipmentUseRecordValueBean" scope="session" /> 
  9. <jsp:setProperty name="codeUse" property="*" />
  10. <%!
  11. String mes;
  12. String loc;
  13. %>
  14. <%
  15. Timestamp time = null;
  16. if (request.getParameter("startDay").length() != 0)
  17.     {
  18.     String startDay= request.getParameter("startDay") + " 00:00:00";
  19.     time = TimeStamp.toTimestamp(startDay);     
  20. }
  21. if (request.getParameter("batchId") == null)
  22. throw new EquipmentException("没有找到相应的批号!");
  23. String batchId = request.getParameter("batchId");
  24. String keyword = request.getParameter("keyword");
  25. String ctn = request.getParameter("ctn");
  26. String start = request.getParameter("start");
  27.     codeUse.setBatchId(Integer.parseInt(batchId));
  28. codeUse.setStartTime(time);
  29. boolean flag = equipmentProxy.addCodeUseRecord(codeUse);
  30. if (flag && ctn.equals("1"))
  31. loc = "/mainctrl/equipmentCodeUseAdd?batchId=" + batchId + "&keyword=" + keyword + "&ctn=" + ctn ;
  32. else
  33. loc = "/mainctrl/equipmentBatchSearchResult?cache=true&start=" + start;
  34. %>
  35. <html>
  36. <head>
  37. <script language=javascript>
  38. function forward()
  39. {
  40. document.location = "<%=loc%>"; 
  41. }
  42. </script>
  43. </head>
  44. <body onload="javascript:forward()">
  45. 成功! 
  46. </body>
  47. <html>