processupdate.jsp

来自「07年做得人力资源管理系统」· JSP 代码 · 共 33 行

JSP
33
字号
<%@ page language="java" import="com.buat.hr.institution.Institution,com.buat.hr.institution.InstitutionDAO" pageEncoding="gbk"%>
<%   
         String idstr=request.getParameter("id");
         int id=0;
         try{
           id=Integer.parseInt(idstr);
         }catch(Exception e){}
         String name=request.getParameter("name");
         String reason=request.getParameter("reason");
         String explains=request.getParameter("explains");
         Institution institution=new Institution(name,reason,explains);
         InstitutionDAO dao=new InstitutionDAO();  
         boolean successful=dao.updateInstitution(institution,id); 
         String message="Congratulations!修改信息成功!";
         if(successful==false)
           message="Sorry!修改信息失败!";
 %>
<html>
   <head>
   </head>
  
  <body background="../bg.jpg">
     <script type="text/javascript">
     window.alert("<%=message%>")
  		<%if(message.equals("Congratulations!修改信息成功!")){ %>
   			window.location.href="Scan.jsp";
   		<%}else {%>
   			window.location.href="Update.jsp";
   		<%}%>
   	</script>
  </body>
</html>

⌨️ 快捷键说明

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