12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <%@ page pageEncoding="UTF-8"%>
- <%@ page contentType="text/html; charset=UTF-8" language="java" %>
- <%@ page language="java"
- import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.datamodel.xmlmodel.impl.MdpModuleImpl,
- com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllable,
- com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllimpl"%>
- <%
- String code = request.getParameter("code") == null ? "0" : request.getParameter("code");
- String action = request.getParameter("action") == null ? "" : request.getParameter("action");
- MdpModuleImpl mdpmod = new MdpModuleImpl();
- SysModeldllable SysModeldllable = new SysModeldllimpl();
- if(action.equals("save") || action.equals("edit")) {
- String description = request.getParameter("description") == null ? "" : request.getParameter("description");
- String name = request.getParameter("name") == null ? "" : request.getParameter("name");
- String packageName = request.getParameter("packageName") == null ? "" : request.getParameter("packageName");
- String pcode=request.getParameter("pcode") == null ? "" : request.getParameter("pcode");
- String tPrefix=request.getParameter("tPrefix") == null ? "" : request.getParameter("tPrefix");
- mdpmod.setPcode(pcode);
- mdpmod.setCode(code);
- mdpmod.setName(name);
- mdpmod.setDescription(description);
- mdpmod.setPackageName(packageName);
- mdpmod.setTPrefix(tPrefix);
-
-
- if(action.equals("save")){
- SysModeldllable.addMdpModule(mdpmod);
- System.out.println("保存成功!!!");
- }else if (action.equals("edit")){
- SysModeldllable.updateMdpModule(mdpmod);
- System.out.println("修改成功!!!");
- }
- response.sendRedirect("edit.jsp?code="+code+"&refreshNode=true");
- }
- else if (action.equals("del")){
- SysModel sysmodel = ModelFactory.getSysmodel();
- mdpmod = (MdpModuleImpl)sysmodel.getMdpModuleByCode(code);
- SysModeldllable.deleteMdpModule(mdpmod);
- System.out.println("删除成功!!!");
- response.sendRedirect("list.jsp?refreshNode=true");
- }
- %>
|