如何查询/解析BMC AR System票证?

时间:2012-11-23 04:31:46

标签: c# remedy

很遗憾,我没有加入BMC支持者社区的开发者许可证来获取此信息。

在整个网络中,我发现了如何创建BMC AR系统票证,但没有找到如何查询它们,或者如何解析它们。例如,我想将它们中的数据添加到ListView或类似的中。

那么有没有人知道如何在C#中查询/解析BMC AR System票证,或者知道任何可以让我与它们接口的API或库?

2 个答案:

答案 0 :(得分:2)

查询AR系统补救措施ARAPI764.NET C#

以下是有关如何查询表单并返回指定字段值的示例

BMC.ARSystem.Server arserver = new BMC.ARSystem.Server();
arserver.Login("servername", "username", "password", "");

//Search a Remedy Form Start

string RequestID = "000000000000001";

string FromForm = ((BMC.ARSystem.EntryDescription)arserver.GetListEntry("someREMEDYform", string.Format("'1' = \"{0}\"", RequestID))[0]).Description;

string qualification = string.Format("'1' = "+ RequestID );

BMC.ARSystem.EntryListFieldList fieldList = new BMC.ARSystem.EntryListFieldList();
fieldList.Add(new BMC.ARSystem.EntryListField(8));
fieldList.Add(new BMC.ARSystem.EntryListField(3));

var entryList = arserver.GetListEntryWithFields("someREMEDYform", qualification, fieldList, 0, 0);

Console.WriteLine(entryList[0].FieldValues[8]);
Console.WriteLine(entryList[0].FieldValues[3]);

Console.ReadLine();

//Search a Remedy Form End

答案 1 :(得分:0)

在C-API指南中查找ARGetList和ARGetEntry函数。 ARGetList接受一个限定条件作为输入,并返回一个与您选择的表单的限定条件匹配的数组EntryID。

ARGetEntry接受一个EntryID和一个ARFieldID数组。它返回包含在字段列表中的数据(由ARFieldIDs指定),用于EntryID数组指定的记录。

迈克