|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
9 a. W% q! C* b2 r5 t/ L; k
; P$ a! K% P% d) a* y) K' C' m; K( g
3 h+ r1 E0 O- [8 |
7 F5 J' l7 {+ c+ P$ _Technique ) _ z2 S. x+ T& j, ~6 ~) j
There are a few ways to get an Item when you know its id and type, the simplest
! |9 N! P; x7 h2 W& T% Zbeing the Innovator.getItemById() method. However, if you need to be granular about $ k6 V7 i' @" U) _1 ?
your request then building the query using the IOM is required. This provides the 6 C- d5 _% {2 A: V, M- F
ability to include controls to limit the results and define the structure to be returned
7 [$ P! B, M& z8 ifor the Items found.
/ T: p' M; K+ ?" x$ t( gJavaScript
/ K; d' A& B1 l0 z' f- Wvar qryItem = this.newItem(myType,"get"); H. I% y% D- `" H( W" v- N
qryItem.setID(myId);
2 h H+ U/ d" ~5 Bvar results = qryItem.apply();
1 Y' W! R( O* m% i6 h9 F) {: v8 n) I! [
9 Q- Q! ^3 `0 h" @8 Q- Svar myInnovator = this.newInnovator(); ; ]9 C( S% ]1 A) v9 \7 L1 ?- O
var results = myInnovator.getItemById(myType, myId); 3 C4 P2 a! P3 D; s/ d
C#
) _+ Y& v7 W- ~; c/ sItem qryItem = this.newItem(myType,"get"); 8 p3 P# e4 D1 q1 e5 U
qryItem.setID(myId); * J0 H! ]* C7 T
Item results = qryItem.apply();
) N: V' P! @ e1 Q9 p
6 P0 S# @. A6 r/ B7 a
/ W# b% F' C4 {! c. o" b" H9 S+ SInnovator myInnovator = this.newInnovator(); ( R) U+ V2 R5 D; Y6 g. F# `" t
Item results = myInnovator.getItemById(myType, myId); $ z! Z, K6 J. f; f# |+ {/ x
VB.Net
0 S* F5 U8 g# T* z2 a5 sDim qryItem As Item = Me.NewItem(myType,"get") 3 |! }. J5 k0 j) m- j: K* O+ c
qryItem.setID(myId)
- w. ~0 x1 Z2 f7 m9 L# f' z& ?Dim results As Item = qryItem.Apply()
* {! e$ s( V( p& a+ |. [: b+ V
' t' I0 J9 y) w0 e6 n
2 t8 |% S }; U1 J) \! w7 JDim myInnovator As Innovator = Me.NewInnovator() : o( T/ t* j5 r4 Z8 o- @, x% T
Dim results As Item = myInnovator.GetItemById(myType, myId) q" W5 d p+ \1 R0 f
. m1 u* O6 ]/ y2 s* I& B3 G6 j. H* Q6 g5 `' b
" z# k) F! R) }. H# h6 H
3 [7 [8 z' t3 {- f9 y, A
! V5 n/ q1 {/ c2 a |
|