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++;
            }
        }
Exemplo n.º 2
0
 public KCInventoryItemDataHelper(KCLoggerProperties loggerProperties)
 {
     logger = new KCLoggerProvider(loggerProperties);
 }
Exemplo n.º 3
0
 public KCOrderItemsValidator(KCILoggerProvider logger)
 {
     this.logger = logger;
 }
Exemplo n.º 4
0
 public KCShipmentDataHelper(KCLoggerProperties loggerProperties)
 {
     logger = new KCLoggerProvider(loggerProperties);
 }
Exemplo n.º 5
0
 public KCInventoryItemAPIHelper(KCARestClient client, KCLoggerProperties loggerProperties)
 {
     this.client = client;
     request     = new KCProductRequest(client.ApiAccessToken);
     logger      = new KCLoggerProvider(loggerProperties);
 }