コード例 #1
0
        public void TransportInstruction(string ChannelId, string ChannelRef, string TransactionId, TransportInstructionDoc aTransportInstructionDoc)
        {
            TransportInstruction transportInstruction = new TransportInstruction();

            transportInstruction.aTransportInstructionDoc = aTransportInstructionDoc;
            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "TI");
                forwardHelper.Forward(transportInstruction);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #2
0
        public void ConfirmationOfReceipt(string ChannelId, string ChannelRef, string TransactionId, ConfirmationOfReceiptHeadDoc aConfirmationOfReceiptHeadDoc)
        {
            ConfirmationOfReceipt confirmationOfReceipt = new ConfirmationOfReceipt();

            confirmationOfReceipt.aConfirmationOfReceiptHeadDoc = aConfirmationOfReceiptHeadDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "COR");
                forwardHelper.Forward(confirmationOfReceipt);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #3
0
        public void InboundOrderCompleted(string ChannelId, string ChannelRef, string TransactionId, InboundOrderCompletedDoc aInboundOrderCompletedDoc)
        {
            InboundOrderCompleted inboundOrderCompleted = new InboundOrderCompleted();

            inboundOrderCompleted.aInboundOrderCompletedDoc = aInboundOrderCompletedDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "IOC");
                forwardHelper.Forward(inboundOrderCompleted);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #4
0
        public void ASN(string ChannelId, string ChannelRef, string TransactionId, ASNHeadDoc aASNHeadDoc)
        {
            ASN asn = new ASN();

            asn.aASNHeadDoc = aASNHeadDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "SR");
                forwardHelper.Forward(asn);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #5
0
        public void ReturnedPackingMaterial(string ChannelId, string ChannelRef, string TransactionId, ReturnedPackingMaterialHeadDoc aReturnedPackingMaterialHeadDoc)
        {
            ReturnedPackingMaterial returnedPackingMaterial = new ReturnedPackingMaterial();

            returnedPackingMaterial.aReturnedPackingMaterialHeadDoc = aReturnedPackingMaterialHeadDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "PM");
                forwardHelper.Forward(returnedPackingMaterial);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #6
0
        public void BalanceAnswer(string ChannelId, string ChannelRef, string TransactionId, BalanceAnswerLineDoc aBalanceAnswerLineDoc)
        {
            BalanceAnswer balanceAnswer = new BalanceAnswer();

            balanceAnswer.aBalanceAnswerLineDoc = aBalanceAnswerLineDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "BA");
                forwardHelper.Forward(balanceAnswer);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #7
0
        public void InventoryChange(string ChannelId, string ChannelRef, string TransactionId, InventoryChangeLineDoc aInventoryChangeLineDoc)
        {
            InventoryChange inventoryChange = new InventoryChange();

            inventoryChange.aInventoryChangeLineDoc = aInventoryChangeLineDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "IC");
                forwardHelper.Forward(inventoryChange);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }
コード例 #8
0
        public void VendorReturnReceipt(string ChannelId, string ChannelRef, string TransactionId, ReturnReceiptHeadDoc aReturnReceiptHeadDoc)
        {
            VendorReturnReceipt vendorReturnReceipt = new VendorReturnReceipt();

            vendorReturnReceipt.aReturnReceiptHeadDoc = aReturnReceiptHeadDoc;

            ForwardHelper forwardHelper = new ForwardHelper();

            try
            {
                forwardHelper.CreateContext(ChannelId, ChannelRef, TransactionId, "RR");
                forwardHelper.Forward(vendorReturnReceipt);
            }
            catch (Exception e)
            {
                try
                {
                    forwardHelper.Abort();
                }
                catch
                {
                    // ignore exceptions in exception handler
                }
                Exception InternalError = new Exception("DataError: Error processing data", e);
                throw (InternalError);
            }
            finally
            {
                forwardHelper.ReleaseContext();
            }

            return;
        }