$PBExportHeader$f_getprintout_bycus.srf
global type f_getprintout_bycus from function_object
end type

forward prototypes
global function integer f_getprintout_bycus (string arg_dwname, string arg_dname, integer arg_default_flag, ref string arg_rs_dname, ref string arg_dwsyntax, ref string arg_msg)
global function integer f_getprintout_bycus (string arg_dwname, long arg_cuscomid, ref string arg_rs_dname, ref string arg_dwsyntax, ref string arg_msg)
end prototypes

global function integer f_getprintout_bycus (string arg_dwname, string arg_dname, integer arg_default_flag, ref string arg_rs_dname, ref string arg_dwsyntax, ref string arg_msg);integer rslt,i
oleobject request,response,list
string defaultalise,alise 
Long currow,findrow

rslt = 1
arg_msg= ''

request = FXAppCom.CreatePbDictionary()
request.SetString("token",app_token_fx)
request.SetString("dwname",arg_dwname)
request.SetString("aliase",arg_dname)
request.SetInt("default_flag",arg_default_flag)

response = FXAppCom.DoExecute("GetPrintOut", request)
arg_msg = response.GetString('ErrMsg')
if (arg_msg <> '') then
	rslt = 0
	arg_dwsyntax = ""
	MessageBox('提示', '获取打印格式有误:' + arg_msg)
	goto ext
end if
arg_rs_dname = response.getstring("aliase")
arg_dwsyntax = response.getstring("dwSyntax")

ext:
return rslt
end function

global function integer f_getprintout_bycus (string arg_dwname, long arg_cuscomid, ref string arg_rs_dname, ref string arg_dwsyntax, ref string arg_msg);integer rslt,i
oleobject request,response,list
string defaultalise,alise 
Long currow,findrow

rslt = 1
arg_msg= ''

request = FXAppCom.CreatePbDictionary()
request.SetString("token",app_token_fx)
request.SetString("dwname",arg_dwname)
request.SetInt("cuscomid",arg_cuscomid)

response = FXAppCom.DoExecute("GetPrintOut", request)
arg_msg = response.GetString('ErrMsg')
if (arg_msg <> '') then
	rslt = 0
	arg_dwsyntax = ""
	MessageBox('提示', '获取打印格式有误:' + arg_msg)
	goto ext
end if
arg_rs_dname = response.getstring("aliase")
arg_dwsyntax = response.getstring("dwSyntax")

ext:
return rslt
end function

