|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
' B4 t6 a. U3 ^5 Q" ?9 Z6 s8 k
9 K" f7 s S& r4 l5 a5 y4 A. q }1 {; [0 c1 _9 w( Z
. A5 b0 U% S6 gTechnique ! B, S7 W" S4 a5 p& ?
There are a few ways to get an Item when you know its id and type, the simplest $ B7 t. _& p9 M& b" {
being the Innovator.getItemById() method. However, if you need to be granular about : t) u6 {5 N6 p% E8 y' `
your request then building the query using the IOM is required. This provides the
# F! O E3 @8 u; W9 K& }ability to include controls to limit the results and define the structure to be returned ' w% j. E. Y2 _) F
for the Items found.
- _- [) j4 p' H- y7 JJavaScript " S* w& p+ r) E3 g
var qryItem = this.newItem(myType,"get");
U! o7 V4 H. ]+ D& Y5 Z4 v3 iqryItem.setID(myId);
4 O& k, L& Z5 Vvar results = qryItem.apply(); " |$ V+ t# N7 l! t' ?5 t, q
( E; a( d+ }4 `
! T: N2 a& k+ s; ^4 J* Nvar myInnovator = this.newInnovator(); 8 F, c! ^6 d# a/ }
var results = myInnovator.getItemById(myType, myId); ! V. `# s8 M* C4 |: l Q3 Z6 W! c
C# ; a% G: ~: E, w* l5 l
Item qryItem = this.newItem(myType,"get"); 9 G/ P# \5 u" D
qryItem.setID(myId);
( b& q: Q$ }; Y) ?6 KItem results = qryItem.apply();
1 ^( M2 w- i; E3 q6 w9 Z* n! D x' ^! I! N
6 P$ K: m# D5 q' V8 K/ Y
Innovator myInnovator = this.newInnovator();
# H8 h; S8 {% Z% j i9 A+ n' zItem results = myInnovator.getItemById(myType, myId); % U) z. _, e3 K: o, d
VB.Net 7 j2 H7 H6 J" g1 }8 V
Dim qryItem As Item = Me.NewItem(myType,"get") 1 i8 [7 ]; f& I1 W
qryItem.setID(myId) + p; @! r7 q# E/ h2 @
Dim results As Item = qryItem.Apply() 8 h- Q' Y$ N6 {4 R. b
4 H0 N5 R! U% k. k$ x) |! U- N$ |9 I4 X/ Q/ @
Dim myInnovator As Innovator = Me.NewInnovator() 8 v/ V; R; Y' c
Dim results As Item = myInnovator.GetItemById(myType, myId)2 e$ q4 z' N& d2 y* V
. v4 i( E" E, { N0 m, J. U$ J2 S8 ~& l2 q W
9 |% y U4 t5 U i4 d/ U8 z n8 H5 d# @
% q; b2 n' B3 N1 d; t7 Z |
|