/// <summary>
        /// Create Outbound Transaction Queue History
        /// </summary>
        /// <param name="transactionQueueItem"></param>
        /// <returns></returns>
        public async Task CreateOutboundTransactionQueueHistory(TransactionQueueOutboundHistory transactionQueueItem)
        {
            DateTime dateCreated = DateTime.UtcNow;

            transactionQueueItem.DateCreated = dateCreated;

            await dbConnection.TransactionQueueOutboundHistory.AddAsync(transactionQueueItem);
        }
Ejemplo n.º 2
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 _inventoryManagementDataService.CreateOutboundTransactionQueueHistory(transactionHistory);

            await _inventoryManagementDataService.DeleteOutboundTransactionQueueEntry(transactionQueueItem.TransactionQueueOutboundId);
        }