【Aras二次开发】查询一个对象代码
Technique
There are a few ways to get an Item when you know its id and type, the simplest
being theInnovator.getItemById()method.However, if you need to be granular about
your request then building the query using the IOM is required.This provides the
ability to include controls to limit the results and define the structure to be returned
for the Items found.
JavaScript
var qryItem = this.newItem(myType,"get");
qryItem.setID(myId);
var results = qryItem.apply();
var myInnovator = this.newInnovator();
var results = myInnovator.getItemById(myType, myId);
C#
Item qryItem = this.newItem(myType,"get");
qryItem.setID(myId);
Item results = qryItem.apply();
Innovator myInnovator = this.newInnovator();
Item results = myInnovator.getItemById(myType, myId);
VB.Net
Dim qryItem As Item = Me.NewItem(myType,"get")
qryItem.setID(myId)
Dim results As Item = qryItem.Apply()
Dim myInnovator As Innovator = Me.NewInnovator()
Dim results As Item = myInnovator.GetItemById(myType, myId)
页:
[1]