예제 #1
0
        public void import()
        {
            fillsourceData();
            destinationData.loadData();

            AccountTypeMerger accountTypeMerger = new AccountTypeMerger(sourceData.AccountType, destinationData.AccountTypes);

            accountTypeMerger.merge();

            EnvelopeGroupMerger envelopeGroupMerger = new EnvelopeGroupMerger(sourceData.EnvelopeGroup, destinationData.EnvelopeGroups);

            envelopeGroupMerger.merge();

            TransactionTypeMerger transactionType = new TransactionTypeMerger(sourceData.LineType, destinationData.TransactionTypes);

            transactionType.merge();

            AccountAppender accountAppender = new AccountAppender(sourceData.Account, accountTypeMerger);

            accountAppender.appendAccounts();

            EnvelopeAppender envelopeAppender = new EnvelopeAppender(sourceData.Envelope, envelopeGroupMerger);

            envelopeAppender.appendEnvelopes();

            TransactionAppender transactionAppender = new TransactionAppender(transactionType, accountAppender, envelopeAppender);

            transactionAppender.appendLines(sourceData.LineItem);

            destinationData.saveData();
        }
        public AccountAppender(OldFFDBDataSet.AccountDataTable sourceTable,
                               AccountTypeMerger accountTypeMerger)
        {
            sourceToDestinationID = new Dictionary <int, int>();

            this.sourceTable       = sourceTable;
            this.accountTypeMerger = accountTypeMerger;
        }