succeedcaseUpdate.jsp
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:1k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GB2312"%>
  2. <%@ page import="java.sql.* ,java.util.Date,java.text.SimpleDateFormat"%>
  3. <%
  4.   request.setCharacterEncoding("GB2312");
  5. %>
  6. <jsp:useBean id="succeedcaseBean" class="MyFly.Bean.succeedcaseBean" scope="request"/>
  7. <%
  8.     String index=request.getParameter("index");
  9. String topic=request.getParameter("topic");
  10. String Content=request.getParameter("content");
  11. String origin=request.getParameter("origin");
  12. SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd");//将显示"1999-10-1 21:03:10"的格式. 
  13.     Date currentTime_1 = new Date(); 
  14.     String appendTime = formatter.format(currentTime_1); 
  15. succeedcaseBean.setSucceedID(Integer.parseInt(index));
  16. succeedcaseBean.setTopic(topic);
  17. succeedcaseBean.setContent(Content);
  18. succeedcaseBean.setOrigin(origin);
  19. succeedcaseBean.setAppendTime(appendTime);
  20. if(succeedcaseBean.update() == 1)
  21. {
  22.      out.println("<script language=javascript>location.href='succeedcaseView.jsp';</script>");
  23.  
  24. }
  25. else
  26. {
  27.    out.println("<Script language=JavaScript>alert('添加失败,请重新添加');JavaScript:history.back();</Script>");
  28. }
  29. %>