workplantype_list.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "com.redmoon.oa.workplan.*"%>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  10. <title>工作计划类型管理</title>
  11. <link href="../common.css" rel="stylesheet" type="text/css">
  12. <%@ include file="../inc/nocache.jsp"%>
  13. <script language="JavaScript" type="text/JavaScript">
  14. <!--
  15. //-->
  16. </script>
  17. <style type="text/css">
  18. <!--
  19. .style2 {font-size: 14px}
  20. -->
  21. </style>
  22. </head>
  23. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  24. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  25. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  26. <%
  27. String priv="workplan";
  28. if (!privilege.isUserPrivValid(request, priv)) {
  29. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  30. return;
  31. }
  32. %>
  33. <%@ include file="workplan_inc_menu_top.jsp"%>
  34. <%
  35. String op = ParamUtil.get(request, "op");
  36. if (op.equals("add")) {
  37. WorkPlanTypeMgr wptm = new WorkPlanTypeMgr();
  38. boolean re = false;
  39. try {
  40. re = wptm.create(request);
  41. }
  42. catch (ErrMsgException e) {
  43. out.print(StrUtil.Alert(e.getMessage()));
  44. }
  45. if (re)
  46. out.print(StrUtil.Alert("操作成功!"));
  47. }
  48. if (op.equals("del")) {
  49. WorkPlanTypeMgr wptm = new WorkPlanTypeMgr();
  50. boolean re = false;
  51. try {
  52. re = wptm.del(request);
  53. }
  54. catch (ErrMsgException e) {
  55. out.print(StrUtil.Alert(e.getMessage()));
  56. }
  57. if (re)
  58. out.print(StrUtil.Alert("操作成功!"));
  59. }
  60. %>
  61. <br>
  62. <table width="494" height="89" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  63.   <tr> 
  64.     <td height="23" valign="bottom" background="../images/top-right.gif" class="right-title">&nbsp;&nbsp;<span> 工作计划类型 </span></td>
  65.   </tr>
  66.   <tr> 
  67.     <td valign="top">
  68. <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  69. <form id=form1 name="form1" action="?op=add" method=post>
  70.       <tr>
  71.         <td height="100" align="center" class="p14"><table width="88%" height="81"  border="0" cellpadding="0" cellspacing="0" class="p14">
  72.             <tr>
  73.               <td class="p14">   </td>
  74.             </tr>
  75.             <tr>
  76.               <td class="p14">
  77.   <%
  78.   WorkPlanTypeDb wptd = new WorkPlanTypeDb();
  79.   String sql = "select id from work_plan_type";
  80.   Iterator ir = wptd.list(sql).iterator();
  81.   while (ir.hasNext()) {
  82.    wptd = (WorkPlanTypeDb)ir.next();%>
  83.   <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  84.                 <tr>
  85.                   <td width="71%"><%=wptd.getName()%></td>
  86.                   <td width="17%"><a href="workplantype_edit.jsp?id=<%=wptd.getId()%>">编辑</a></td>
  87.                   <td width="12%"><a href="?op=del&id=<%=wptd.getId()%>">删除</a></td>
  88.                 </tr>
  89.               </table>
  90.   
  91. <%}%>   </td>
  92.             </tr>
  93.           </table>
  94.           <br>          </td>
  95.       </tr></form>
  96.   <form action="?op=add" method=post> 
  97.       <tr>
  98.         <td align="center">
  99. 类型名称:
  100.   <input name="name" maxlength="30">
  101.   &nbsp;
  102.   <input name="submit" type=submit value="创建新类型"></td>
  103.       </tr>
  104.       <tr>
  105.         <td align="center">&nbsp;</td>
  106.       </tr>
  107.   </form>
  108.     </table></td>
  109.   </tr>
  110. </table>
  111. <br>
  112. <br>
  113. </body>
  114. </html>