static void WebService(Args _args)
{
ClrObject clientType;
ClassLibrary1.ServiceReference1.ClearerServiceClient serviceclient;
ClassLibrary1.ServiceReference1.ClsClearerDataContract[] lstClearerDbContractArray;
ClassLibrary1.ServiceReference1.ClsClearerDataContract lstClearerDbContract;
int i, numElement;
Str accountNo,Code,name;
System.Exception ex;
new InteropPermission(InteropKind::ClrInterop).assert();
try
{
clientType = CLRInterop::getType("ClassLibrary1.ServiceReference1.ClearerServiceClient");
serviceclient = AifUtil::createServiceClient(clientType);
lstClearerDbContractArray = serviceclient.GetAllClearers("GT");
numElement =lstClearerDbContractArray.get_Count();
for(i = 0; i < numElement; i++)
{
lstClearerDbContract = lstClearerDbContractArray.get_Item(i);
accountNo = lstClearerDbContract.get_CLR_ACCOUNT_NO();
Code = lstClearerDbContract.get_CLR_CODE();
name = lstClearerDbContract.get_CLR_NAME();
info(strFmt("%1,%2,%3",accountNo,Code,name));
}
}
catch(Exception::CLRError)
{
ex = CLRInterop::getLastException();
info(ex.ToString());
}
}
{
ClrObject clientType;
ClassLibrary1.ServiceReference1.ClearerServiceClient serviceclient;
ClassLibrary1.ServiceReference1.ClsClearerDataContract[] lstClearerDbContractArray;
ClassLibrary1.ServiceReference1.ClsClearerDataContract lstClearerDbContract;
int i, numElement;
Str accountNo,Code,name;
System.Exception ex;
new InteropPermission(InteropKind::ClrInterop).assert();
try
{
clientType = CLRInterop::getType("ClassLibrary1.ServiceReference1.ClearerServiceClient");
serviceclient = AifUtil::createServiceClient(clientType);
lstClearerDbContractArray = serviceclient.GetAllClearers("GT");
numElement =lstClearerDbContractArray.get_Count();
for(i = 0; i < numElement; i++)
{
lstClearerDbContract = lstClearerDbContractArray.get_Item(i);
accountNo = lstClearerDbContract.get_CLR_ACCOUNT_NO();
Code = lstClearerDbContract.get_CLR_CODE();
name = lstClearerDbContract.get_CLR_NAME();
info(strFmt("%1,%2,%3",accountNo,Code,name));
}
}
catch(Exception::CLRError)
{
ex = CLRInterop::getLastException();
info(ex.ToString());
}
}
No comments:
Post a Comment