private static ResponseRd GetOrderFromStore(string orderAtoId, string wsAddress)
 {
     using (var client = new QueryFunctionClient(new BasicHttpBinding(), new EndpointAddress(wsAddress + SettingsData.Constants.StoreOrder.WsQueryFunction)))
     {
         var iTries = 0;
         while (iTries < 2)
         {
             try
             {
                 var result = client.GetOrderById(long.Parse(orderAtoId));
                 if (!result.IsSuccess)
                 {
                     continue;
                 }
                 client.Close();
                 return(result);
             }
             catch (Exception ex)
             {
                 Console.WriteLine(ex.Message);
             }
             Thread.Sleep(200);
             iTries++;
         }
         client.Close();
     }
     return(null);
 }
Exemple #2
0
 public ResponseRd CallWsGetOrder(long atoOrderId, EventLog eventLog)
 {
     try
     {
         return(_client.GetOrderById(atoOrderId));
     }
     catch (Exception ex)
     {
         eventLog.WriteEntry(ex.Message + " -ST- " + ex.StackTrace, EventLogEntryType.Error);
         return(null);
     }
 }