|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
【Aras二次开发源码】编写可其他方法的子程序的通用方法
4 }0 M! { G$ j% ?1 P' \$ ~- mTechnique & r' T4 t% g; F9 t$ {# F& @
Use the Innovator.applyMethod() method to apply Generic Methods. The following
* }8 |- G4 V4 C' Yexamples assume a server-side method named "Reverse String" exists, and that it 2 s$ _- T7 j1 |
returns a result item containing the reversed contents of the <string> tag.
2 b5 M9 J3 t- ~JavaScript
* m/ E i N' Cvar inn = this.newInnovator();
- l7 K$ m9 f8 I8 Y2 C, wvar results = inn.applyMethod("Reverse String", "<string>abc</string>");
+ ]) C5 I6 A3 u// You can also apply a generic client method but only from another client-side method t2 X& v, m- Y$ k- s/ M
// var results = inn.applyMethod("Reverse String JS","<string>abc</string>","client"); , y) {2 J0 Q7 N/ t) U
return results.getResult(); // returns "cba" C# 8 c/ ]* V5 {* v! ^5 }2 F' c! G8 S
Innovator inn = this.newInnovator(); ' u; C2 S/ v, K) F: {! |; B9 a
Item results = inn.applyMethod("Reverse String", "<string>abc</string>"); ' }) G E8 I; @. M+ i$ s8 R; s1 ]
// Return a result item with "cba" as the contents of the Result tag
5 Y$ u. ?. y7 s3 Ereturn inn.newResult(results.getResult());
: M" C [& P5 i) @% L( F: {VB.Net ; k }7 ~6 H. v& f1 o, N
Dim inn As Innovator = Me.newInnovator() - t4 M& @. [ s" s
Dim results As Item = inn.applyMethod("Reverse String", "<string>abc</string>") 7 c; S& |) [9 x# o) _' g
' Return a result item With "cba" As the contents of the Result tag 6 I- f8 g( p# F, u
Return inn.newResult(results.getResult())
; M2 O9 i! u+ m6 x( B
! e- M) u9 ~: K& Y |
|