apzl_leasing/WebContent/Common/ToolsB/RunMethodAJAX.jsp
2018-06-03 22:26:41 +08:00

34 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.amarsoft.are.jbo.*"%><%@
page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBeginMDAJAX.jsp"%><%
String sClassName = CurPage.getParameter("ClassName");
String sMethodName = CurPage.getParameter("MethodName");
String sArgs = CurPage.getParameter("Args");
//¸ù¾ÝmethodTypeÀ´È·¶¨´«ÈëµÄ²ÎÊý
BizObject methodBo = JBOFactory.getBizObjectManager("jbo.sys.CLASS_METHOD")
.createQuery("select methodType from O where ClassName=:ClassName and MethodName=:MethodName ")
.setParameter("ClassName", sClassName).setParameter("MethodName", sMethodName).getSingleResult(false);
if(methodBo!=null){
String methodType = methodBo.getAttribute("methodType").getString();
ASMethod method = null;
JBOTransaction tx = null;
try{
if("JBOQL".equalsIgnoreCase(methodType) || "JBOBizlet".equalsIgnoreCase(methodType)){
tx = JBOFactory.createJBOTransaction();
method = new ASMethod(sClassName,sMethodName,tx);
}else{
method = new ASMethod(sClassName,sMethodName,Sqlca);
}
Any anyValue = method.execute(sArgs);
if(anyValue==null){
out.print("");
}else{
out.print(anyValue.toStringValue());
}
if(tx!=null) tx.commit();
}catch(Exception e){
if(tx!=null) tx.rollback();
}
}
%><%@ include file="/IncludeEndAJAX.jsp"%>