Hi,
I generated c# class with smartobject service tester tool, and opened in visual studio. I want to know if it is possible to code my own getList method and generate new smartobject with that class.
Hi,
I generated c# class with smartobject service tester tool, and opened in visual studio. I want to know if it is possible to code my own getList method and generate new smartobject with that class.
I just experimented with that as well. I didn't know you could build a class from the tester tool...pretty cool.
Can you extract the existing GetList method and create a new project and deploy that to your K2 server?
public DataTable GetList() {
// Set method to execute
_smartObject.MethodToExecute = "GetList";
// Assign Input properties
if (AutoID != null)
{
SetPropertyValue(_smartObject.ListMethods["GetList"].InputProperties["AutoID"],AutoID);
}
if (Start_Time != null)
{
SetPropertyValue(_smartObject.ListMethods["GetList"].InputProperties["Start_Time"],Start_Time);
}
if (End_Time != null)
{
SetPropertyValue(_smartObject.ListMethods["GetList"].InputProperties["End_Time"],End_Time);
}
if (PTOID != null)
{
SetPropertyValue(_smartObject.ListMethods["GetList"].InputProperties["PTOID"],PTOID);
}
try
{
SmartObjectClientServer soServer = CreateConnection();
// Execute SmartObject
using (soServer.Connection)
{
return soServer.ExecuteListDataTable(_smartObject);
}
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.