private static void Process(IList <KCStore> stores)
        {
            LoggerProperties.RequestId = GetRequestId();
            logger = new KCLoggerProvider(LoggerProperties);

            int index = 0;

            foreach (KCStore store in stores)
            {
                try
                {
                    ProcessStore(store);
                    PXProcessing <KCStore> .SetInfo(index, $"Data Exchange for {store.SiteMasterCD} has been processed successfully");
                }
                catch (Exception exception)
                {
                    string log = KCMessages.ProcessException(store.SiteMasterCD, exception.Message, exception.StackTrace);
                    logger.ClearLoggingIds();
                    logger.Error(log);
                    PXProcessing <KCStore> .SetError(index, new Exception(log));
                }
                index++;
            }
        }
Beispiel #2
0
 public KCInventoryItemDataHelper(KCLoggerProperties loggerProperties)
 {
     logger = new KCLoggerProvider(loggerProperties);
 }
Beispiel #3
0
 public KCOrderItemsValidator(KCILoggerProvider logger)
 {
     this.logger = logger;
 }
Beispiel #4
0
 public KCShipmentDataHelper(KCLoggerProperties loggerProperties)
 {
     logger = new KCLoggerProvider(loggerProperties);
 }
Beispiel #5
0
 public KCInventoryItemAPIHelper(KCARestClient client, KCLoggerProperties loggerProperties)
 {
     this.client = client;
     request     = new KCProductRequest(client.ApiAccessToken);
     logger      = new KCLoggerProvider(loggerProperties);
 }