【Aras Innovator 二次开发入门】4 来个用户查询
【Aras Innovator 二次开发入门】4 来个用户查询注意: 所有的属性都是小写,空格改成下划线_
Console.WriteLine("3 =============Create a query for all the users ======================");
Item getUserItem = newInnovator.newItem("User", "get");
getUserItem.setAttribute("select", "first_name,last_name");
Item getUserResult = getUserItem.apply();
for(int i =0;i < getUserResult.getItemCount();i++)
{
string userFirstName = getUserResult.getItemByIndex(i).getProperty("first_name");
string userLastName = getUserResult.getItemByIndex(i).getProperty("last_name");
Console.WriteLine("{0}"+ " " + "{1}" + " "+ "{2}", i,userFirstName,userLastName);
}
结果如下:
页:
[1]