public arquivoCNAB240(List <pagamentoInfo> pagamentos)
        {
            this.header = new headerArquivo(this);

            this.lotes = new List <lote>();
            foreach (var pagamento in pagamentos)
            {
                lote lote = new lote(this);
                lote.header        = new headerLote(lote);
                lote.pagamentos    = new List <detalhe>();
                lote.trailer       = new trailerLote(lote);
                lote.tipoPagamento = pagamento.tipoPagamento;

                for (var i = 0; i < pagamento.quantidade; i++)
                {
                    detalhe detalhe = new detalhe(lote);
                    detalhe.segmentoA = new segmentoA(detalhe);
                    detalhe.segmentoB = new segmentoB(detalhe);
                    detalhe.segmentoC = new segmentoC(detalhe);
                    detalhe.id        = i;
                    lote.pagamentos.Add(detalhe);
                }

                this.lotes.Add(lote);
            }

            this.trailer = new trailerArquivo(this);

            this.caminho = Environment.CurrentDirectory + "\\ArquivosCNABGerados\\CNAB240_" + gerador.Helpers.Utils.timeStamp() + ".txt";
        }
示例#2
0
 public segmentoC(detalhe detalhe)
 {
     this.objetoPai = detalhe;
 }