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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import = "com.redmoon.oa.vehicle.*"%>
  3. <%@ page import = "cn.js.fan.util.*"%>
  4. <%@ page import = "cn.js.fan.web.*"%>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>车辆维护</title>
  8. </head>
  9. <body>
  10. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  11. <%
  12. if (!privilege.isUserPrivValid(request, "vehicle")) {
  13. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  14. return;
  15. }
  16. %>
  17. <%
  18. VehicleMgr vm = new VehicleMgr();
  19. boolean re = false;
  20. String op = ParamUtil.get(request, "op");
  21. if (op.equals("add")) {
  22. try {
  23. re = vm.create(application, request);
  24. }
  25. catch (ErrMsgException e) {
  26. out.print(StrUtil.Alert_Back(e.getMessage()));
  27. }
  28. if (re) {
  29.     out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request,"res.module.vehicle", "success_add_vehicle")));
  30. }
  31. }
  32. if (op.equals("modify")) {
  33. try {
  34. re = vm.modify(application, request);
  35. }
  36. catch (ErrMsgException e) {
  37. out.print(StrUtil.Alert_Back(e.getMessage()));
  38. }
  39. if (re) {
  40.             out.print(StrUtil.Alert_Redirect(SkinUtil.LoadString(request,"res.module.vehicle", "success_modify_vehicle"), "vehicle_edit.jsp?licenseNo=" + ParamUtil.get(request, "licenseNo")));
  41. }
  42. else
  43. out.print(StrUtil.Alert_Back("操作失败!"));
  44. }
  45. /*
  46. if (op.equals("delattach")) {
  47. try {
  48. re = vm.delAttachment(request);
  49. }
  50. catch (ErrMsgException e) {
  51. out.print(StrUtil.Alert_Back(e.getMessage()));
  52. }
  53. if (re) {
  54. out.print(StrUtil.Alert_Redirect("删除附件成功!", "workplan_edit.jsp?id=" + ParamUtil.getInt(request, "id")));
  55. }
  56. }
  57. */
  58. if (op.equals("del")) {
  59. try {
  60. re = vm.del(application,request);
  61. }
  62. catch (ErrMsgException e) {
  63. out.print(StrUtil.Alert_Back(e.getMessage()));
  64. }
  65. if (re) {
  66. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request,"res.module.vehicle", "success_del_vehicle")));
  67. }
  68. }
  69. %>
  70. </body>
  71. </html>