12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <%@ 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.impl.MdpConstantImpl,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllable,
- com.sysmodel.datamodel.xmlmanager.xmlobjdll.SysModeldllimpl"%>
- <%
- String name = request.getParameter("name") == null ? "0" : request.getParameter("name");
- String action = request.getParameter("action") == null ? "" : request.getParameter("action");
- System.out.println("action="+action);
- System.out.println("name="+name);
- MdpConstantImpl MdpConstantImpl = new MdpConstantImpl();
- SysModeldllable SysModeldllable = new SysModeldllimpl();
- if(action.equals("save") || action.equals("edit")) {
-
- String type = request.getParameter("type") == null ? "" : request.getParameter("type");
- String description = request.getParameter("description") == null ? "" : request.getParameter("description");
- String TemplateName = request.getParameter("TemplateName") == null ? "" : request.getParameter("TemplateName");
- String RootFrom = request.getParameter("RootFrom") == null ? "" : request.getParameter("RootFrom");
- String DataSource = request.getParameter("DataSource") == null ? "" : request.getParameter("DataSource");
- String isKeyCodeAuto = request.getParameter("isKeyCodeAuto") == null ? " " : request.getParameter("isKeyCodeAuto");
- String OrderProperty = request.getParameter("OrderProperty") == null ? "" : request.getParameter("OrderProperty");
- String OrderMethod = request.getParameter("OrderMethod") == null ? "" : request.getParameter("OrderMethod");
- MdpConstantImpl.setCodeName(name);
- MdpConstantImpl.setDescription(description);
- MdpConstantImpl.setTemplateName(TemplateName);
- MdpConstantImpl.setRootFrom(RootFrom);
- MdpConstantImpl.setDataSource(new Integer(DataSource));
- MdpConstantImpl.setKeyCodeAuto(Boolean.valueOf(isKeyCodeAuto).booleanValue());
- MdpConstantImpl.setOrderProperty(OrderProperty);
- MdpConstantImpl.setOrderMethod(OrderMethod);
- MdpConstantImpl.setType(type);
-
- if(action.equals("save")){
- SysModeldllable.addConstant(MdpConstantImpl);
- System.out.println("保存成功!!!");
- }else if (action.equals("edit")){
- SysModeldllable.updateConstant(MdpConstantImpl,name);
- System.out.println("修改成功!!!");
- }
- response.sendRedirect("edit.jsp?name="+name+"&refreshNode=true");
- }
- else if (action.equals("del")){
- SysModel sysmodel = ModelFactory.getSysmodel();
- MdpConstantImpl=(MdpConstantImpl)sysmodel.getMdpConstantByName(name);
- String type = MdpConstantImpl.getType();
- SysModeldllable.deleteConstant(MdpConstantImpl);
- System.out.println("删除成功!!!");
- response.sendRedirect("list.jsp?refreshNode=true&type="+type);
- }
- %>
|