|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
【Aras二次开发源码】编写可其他方法的子程序的通用方法
& \7 s7 S/ H* A4 n+ O. ?6 dTechnique . x+ @4 ~* ?4 a% n ]& L3 v; Y7 S
Use the Innovator.applyMethod() method to apply Generic Methods. The following
9 a, A7 a; L! }& H0 S) N% y5 t2 qexamples assume a server-side method named "Reverse String" exists, and that it : @/ o4 i' Q h+ Z e1 {+ }8 V
returns a result item containing the reversed contents of the <string> tag. " ]! I+ b, D8 `4 r: Z; I+ n
JavaScript 1 o* m7 G- z; c3 G7 _. r
var inn = this.newInnovator(); ' {/ j% D4 l" }
var results = inn.applyMethod("Reverse String", "<string>abc</string>");
. h. D! p( j3 o! X& i' v) J7 P F// You can also apply a generic client method but only from another client-side method
; X4 \% f4 S& T- r' c// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client"); * i% _% ^4 l; Y4 I) ~
return results.getResult(); // returns "cba" C# " B, L0 b. z" W' v
Innovator inn = this.newInnovator();
. H' r0 h" m, F) }5 P! \; C+ rItem results = inn.applyMethod("Reverse String", "<string>abc</string>"); 5 s& C5 S" a5 L
// Return a result item with "cba" as the contents of the Result tag
9 R$ p& f. u! U: |return inn.newResult(results.getResult());
1 v; X: z) @3 u% r. DVB.Net 9 U1 q, ]" s! ], t3 W# r" _- n
Dim inn As Innovator = Me.newInnovator()
! \7 H5 j3 `& y, N. b% DDim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>")
2 b/ Z7 A7 w# z0 I d3 D! o' Return a result item With "cba" As the contents of the Result tag * K7 a4 I+ ]+ s5 j& S1 \6 b/ ~
Return inn.newResult(results.getResult())
1 U4 y: R" i4 K5 m4 `. |2 [5 w
' n- I Z1 t+ a5 f |
|