Example #1
0
        private void WriteBatchHeader()
        {
            _fileRunningStatObject.NewBatch();

            uint batchNumber = _configuration.BatchNumber;

            if (_configuration.BatchNumberGenerator != null)
            {
                batchNumber = _configuration.BatchNumberGenerator();
            }
            if (batchNumber == 0)
            {
                batchNumber = (uint)new Random().Next(1, Int32.MaxValue);
            }

            _NACHABatchHeaderRecord.BatchNumber              = batchNumber == 0 ? 1 : batchNumber;
            _NACHABatchHeaderRecord.ServiceClassCode         = ServiceClassCode;
            _NACHABatchHeaderRecord.CompanyName              = CompanyName;
            _NACHABatchHeaderRecord.CompanyDiscretionaryData = CompanyDiscretionaryData;
            _NACHABatchHeaderRecord.CompanyID = CompanyID;
            _NACHABatchHeaderRecord.StandardEntryClassCode  = StandardEntryClassCode;
            _NACHABatchHeaderRecord.CompanyEntryDescription = CompanyEntryDescription;
            _NACHABatchHeaderRecord.CompanyDescriptiveDate  = CompanyDescriptiveDate;
            _NACHABatchHeaderRecord.EffectiveEntryDate      = EffectiveEntryDate;
            _NACHABatchHeaderRecord.JulianSettlementDate    = JulianSettlementDate;
            _NACHABatchHeaderRecord.OriginatorStatusCode    = OriginatorStatusCode;
            _NACHABatchHeaderRecord.OriginatingDFIID        = OriginatingDFIID;

            _writer.Write(_NACHABatchHeaderRecord);
        }
Example #2
0
        private void WriteBatchHeader()
        {
            _NACHABatchHeaderRecord.BatchNumber              = _fileRunningStatObject.NewBatch();
            _NACHABatchHeaderRecord.ServiceClassCode         = ServiceClassCode;
            _NACHABatchHeaderRecord.CompanyName              = CompanyName;
            _NACHABatchHeaderRecord.CompanyDiscretionaryData = CompanyDiscretionaryData;
            _NACHABatchHeaderRecord.CompanyID = CompanyID;
            _NACHABatchHeaderRecord.StandardEntryClassCode  = StandardEntryClassCode;
            _NACHABatchHeaderRecord.CompanyEntryDescription = CompanyEntryDescription;
            _NACHABatchHeaderRecord.CompanyDescriptiveDate  = CompanyDescriptiveDate;
            _NACHABatchHeaderRecord.EffectiveEntryDate      = EffectiveEntryDate;
            _NACHABatchHeaderRecord.JulianSettlementDate    = JulianSettlementDate;
            _NACHABatchHeaderRecord.OriginatorStatusCode    = OriginatorStatusCode;
            _NACHABatchHeaderRecord.OriginatingDFIID        = OriginatingDFIID;

            _writer.Write(_NACHABatchHeaderRecord);
        }