예제 #1
0
        private void WriteFileControlFillerRecords()
        {
            if (Configuration.BlockingFactor <= 0)
            {
                return;
            }

            uint remain = _runningStatObject.TotalNoOfRecord % Configuration.BlockingFactor;

            if (remain <= 0)
            {
                return;
            }

            ChoNACHAFileControlRecord NACHAFileControlFillerRecord = ChoActivator.CreateInstanceAndInit <ChoNACHAFileControlRecord>();

            NACHAFileControlFillerRecord.BatchCount                   = 999999;
            NACHAFileControlFillerRecord.BlockCount                   = 999999;
            NACHAFileControlFillerRecord.EntryAddendaCount            = 99999999;
            NACHAFileControlFillerRecord.EntryHash                    = 9999999999;
            NACHAFileControlFillerRecord.TotalDebitEntryDollarAmount  = 9999999999.99M;
            NACHAFileControlFillerRecord.TotalCreditEntryDollarAmount = 9999999999.99M;
            NACHAFileControlFillerRecord.Reserved = ChoString.Repeat("9", 39);

            for (int i = 0; i < Configuration.BlockingFactor - remain; i++)
            {
                _writer.Write(NACHAFileControlFillerRecord);
            }
        }
예제 #2
0
        private void Init()
        {
            _writer = new ChoManifoldWriter(_streamWriter, Configuration as ChoManifoldRecordConfiguration).WithRecordSelector(0, 1, typeof(ChoNACHABatchHeaderRecord), typeof(ChoNACHABatchControlRecord),
                                                                                                                               typeof(ChoNACHAFileHeaderRecord), typeof(ChoNACHAFileControlRecord), typeof(ChoNACHAEntryDetailRecord), typeof(ChoNACHAAddendaRecord));
            _writer.Configuration.ObjectValidationMode = ChoObjectValidationMode.ObjectLevel;

            WriteFileHeader();
            _fileControlRecord = ChoActivator.CreateInstanceAndInit <ChoNACHAFileControlRecord>();
        }
예제 #3
0
        private void Init()
        {
            _writer = new ChoManifoldWriter(_textWriter, Configuration as ChoManifoldRecordConfiguration).WithRecordSelector(0, 1, typeof(ChoNACHABatchHeaderRecord), typeof(ChoNACHABatchControlRecord),
                                                                                                                             typeof(ChoNACHAFileHeaderRecord), typeof(ChoNACHAFileControlRecord), typeof(ChoNACHAEntryDetailRecord), typeof(ChoNACHAAddendaRecord));
            _writer.Configuration.ObjectValidationMode = ChoObjectValidationMode.ObjectLevel;

            _headerInitializer = new Lazy <object>(() =>
            {
                WriteFileHeader();
                _fileControlRecord = ChoActivator.CreateInstanceAndInit <ChoNACHAFileControlRecord>();
                return(null);
            });
        }