Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.69 KB | None | 0 0
  1.     public class ActionsCommHelper
  2.     {
  3.         internal static bool Send(FASR.OperationCall[] ocall, string transactionid, out string recordid)
  4.         {
  5.             Lift.LiftManager.Logger.Write("ActionsCommHelper", "Entering Send({0}, {1})", ocall.Length.ToString(), transactionid);
  6.  
  7.             recordid = "";
  8.             bool ret = false;
  9.             if (ocall == null)
  10.                 throw new Exception("Operation call array is empty");
  11.  
  12.             FASR.ExecuteRequest request = new FASR.ExecuteRequest();
  13.  
  14.             request.OperationCalls = ocall;
  15.             request.ExternalTransactionId = transactionid;
  16.  
  17.             string serverURL = Lift.LiftManager.ConfigProvider.GetValue("wsdl_url");
  18.             FASR.ExecuteResponse response = Lift.LiftManager.RemoteClient.ExecuteRequest<FASR.IntegrationClient, FASR.ExecuteRequest, FASR.ExecuteResponse>(request,
  19.                 new Lift.II.RemoteClientInfo()
  20.                 {
  21.                     Url = serverURL,
  22.                     User = Lift.LiftManager.ConfigProvider.GetValue("wsdl_user"),
  23.                     Password = Lift.LiftManager.ConfigProvider.GetValue("wsdl_password")
  24.                 }
  25.                 );
  26.  
  27.             if (response.Transaction.Status == FASR.TransactionStatus.SUCCESS)
  28.             {
  29.                 ret = true;
  30.                 if (response.Transaction.Operations != null && response.Transaction.Operations.Length > 0)
  31.                     recordid = response.Transaction.Operations[0].RecordID;
  32.             }
  33.  
  34.             Lift.LiftManager.Logger.Write("ActionsCommHelper", "Leaving Send({0}, {1})={2}", ocall.Length.ToString(), transactionid, ret.ToString());
  35.             return ret;
  36.         }
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement