2e883008b9e498a2b35990db889b2544494f051b.svn-base 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page language="java"
  4. import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
  5. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  6. com.sysmodel.datamodel.xmlmodel.impl.MdpModuleImpl,
  7. com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllable,
  8. com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllimpl"%>
  9. <%
  10. String code = request.getParameter("code") == null ? "0" : request.getParameter("code");
  11. String action = request.getParameter("action") == null ? "" : request.getParameter("action");
  12. MdpModuleImpl mdpmod = new MdpModuleImpl();
  13. SysModeldllable SysModeldllable = new SysModeldllimpl();
  14. if(action.equals("save") || action.equals("edit")) {
  15. String description = request.getParameter("description") == null ? "" : request.getParameter("description");
  16. String name = request.getParameter("name") == null ? "" : request.getParameter("name");
  17. String packageName = request.getParameter("packageName") == null ? "" : request.getParameter("packageName");
  18. String pcode=request.getParameter("pcode") == null ? "" : request.getParameter("pcode");
  19. String tPrefix=request.getParameter("tPrefix") == null ? "" : request.getParameter("tPrefix");
  20. mdpmod.setPcode(pcode);
  21. mdpmod.setCode(code);
  22. mdpmod.setName(name);
  23. mdpmod.setDescription(description);
  24. mdpmod.setPackageName(packageName);
  25. mdpmod.setTPrefix(tPrefix);
  26. if(action.equals("save")){
  27. SysModeldllable.addMdpModule(mdpmod);
  28. System.out.println("保存成功!!!");
  29. }else if (action.equals("edit")){
  30. SysModeldllable.updateMdpModule(mdpmod);
  31. System.out.println("修改成功!!!");
  32. }
  33. response.sendRedirect("edit.jsp?code="+code+"&refreshNode=true");
  34. }
  35. else if (action.equals("del")){
  36. SysModel sysmodel = ModelFactory.getSysmodel();
  37. mdpmod = (MdpModuleImpl)sysmodel.getMdpModuleByCode(code);
  38. SysModeldllable.deleteMdpModule(mdpmod);
  39. System.out.println("删除成功!!!");
  40. response.sendRedirect("list.jsp?refreshNode=true");
  41. }
  42. %>