예제 #1
0
        /// <summary>
        /// Log Outbound Transaction To History
        /// </summary>
        /// <param name="transactionQueueItem"></param>
        /// <returns></returns>
        private async Task LogOutboundTransactionToHistory(TransactionQueueOutbound transactionQueueItem)
        {
            TransactionQueueOutboundHistory transactionHistory = new TransactionQueueOutboundHistory();

            transactionHistory.TransactionQueueOutboundId = transactionQueueItem.TransactionQueueOutboundId;
            transactionHistory.TransactionCode            = transactionQueueItem.TransactionCode;
            transactionHistory.Payload        = transactionQueueItem.Payload;
            transactionHistory.ExchangeName   = transactionQueueItem.ExchangeName;
            transactionHistory.SentToExchange = transactionQueueItem.SentToExchange;
            transactionHistory.DateOutboundTransactionCreated = transactionQueueItem.DateCreated;
            transactionHistory.DateSentToExchange             = transactionQueueItem.DateSentToExchange;
            transactionHistory.DateToResendToExchange         = transactionQueueItem.DateToResendToExchange;

            await _purchaseOrderManagementDataService.CreateOutboundTransactionQueueHistory(transactionHistory);

            await _purchaseOrderManagementDataService.DeleteOutboundTransactionQueueEntry(transactionQueueItem.TransactionQueueOutboundId);
        }