Exemplo n.º 1
0
        public static RetornoCNAB240 Return(String Path)
        {
            RetornoCNAB240 Return = new RetornoCNAB240();
            Int32          Count  = -1;
            Object         Identity;

            String[] Lines;
            try {
                Lines = (!String.IsNullOrEmpty(Path)
                    ? System.IO.File.ReadAllLines(Path)
                    : throw new Exception("O caminho do arquivo não foi informado ou está incorreto!"));

                foreach (String FoundLine in Lines)
                {
                    Identity = Convert.ToInt32(FoundLine.RetriveOnLine(8, 8));
                    if ((IsFile)Identity == IsFile.HeaderAllotment)
                    {
                        Count++;
                    }
                    ;
                    Return = RetriveLine(FoundLine, Return, Count);
                }
            } catch {
                throw;
            }
            return(Return);
        }
Exemplo n.º 2
0
        private static RetornoCNAB240 RetriveLine(String Line, RetornoCNAB240 Return, Int32 Count)
        {
            Object         Identity;
            RetornoCNAB240 Result = (Return != null
                ? Return
                : throw new Exception("O retorno não pode ser nulo!"));

            Identity = Convert.ToInt32(Line.RetriveOnLine(8, 8));
            switch ((IsFile)Identity)
            {
            case IsFile.HeaderFile: {
                Result.HeaderFile.Banco            = new Itau(false);
                Result.HeaderFile.Banco.Codigo     = Line.RetriveOnLine(1, 3);                                                                                 // CODIGO BANCARIO
                Result.HeaderFile.TipoInscricaoEmp = String.IsNullOrEmpty(Line.RetriveOnLine(18, 18).Trim())? 0 : Convert.ToInt32(Line.RetriveOnLine(18, 18)); // TIPO DE INSCRIÇÃO DA EMPRESA | CPF = '1' | CNPJ =  '2'
                Result.HeaderFile.Empresa.CNPJ     = Line.RetriveOnLine(19, 32);                                                                               // NÚMERO DO CNPJ/CPF DA EMPRESA
                Result.HeaderFile.Empresa.Convenio = Line.RetriveOnLine(33, 45).Trim();                                                                        // CÓDIGO DO CONVÊNIO NO BANCO
                Result.HeaderFile.Empresa.ContaBancaria.AgenciaBancaria.Agencia = Line.RetriveOnLine(54, 57);                                                  // AGENCIA REFERENTE CONVÊNIO ASSINADO
                Result.HeaderFile.Empresa.ContaBancaria.Conta  = Line.RetriveOnLine(66, 70);                                                                   // NÚMERO DA C/C DO CLIENTE
                Result.HeaderFile.Empresa.ContaBancaria.Digito = Line.RetriveOnLine(72, 72);                                                                   // DAC (Dígito de Auto Conferência) DA AGÊNCIA/ CONTA.
                Result.HeaderFile.Empresa.Nome      = Line.RetriveOnLine(73, 102);                                                                             // NOME DA EMPRESA
                Result.HeaderFile.Banco.Nome        = Line.RetriveOnLine(103, 132).Trim();                                                                     // NOME DO BANCO
                Result.HeaderFile.CodigoRR          = Line.RetriveOnLine(143, 143);                                                                            //  CÓDIGO REMESSA = 1/RETORNO = 2
                Result.HeaderFile.DataGeracao       = Line.RetriveOnLine(144, 151).FormatDate();                                                               //  DATA DE GERAÇÃO DO ARQUIVO
                Result.HeaderFile.HoraGeracao       = Line.RetriveOnLine(152, 157).FormatHour();                                                               // HORA DE GERAÇÃO DO ARQUIVO
                Result.HeaderFile.SequencialArquivo = Line.RetriveOnLine(158, 163);                                                                            // NR. SEQUENCIAL DO ARQUIVO
                Result.HeaderFile.VLayout           = Line.RetriveOnLine(164, 166);                                                                            // NR. DA VERSÃO DO LAYOUT

                break;
            }

            case IsFile.HeaderAllotment: {
                HeaderAllotment HeaderAllotment = new HeaderAllotment();
                HeaderAllotment.Banco = new Itau(false);
                Ocorrencias Ocorrencia = new Ocorrencias();

                HeaderAllotment.Banco.Codigo     = Line.RetriveOnLine(1, 3);                                                                                                  // CODIGO BANCARIO
                HeaderAllotment.TipoInscricaoEmp = String.IsNullOrEmpty(Line.RetriveOnLine(18, 18).Trim()) ? 0 : Convert.ToInt32(Line.RetriveOnLine(18, 18));                 // TIPO DE INSCRIÇÃO DA EMPRESA | CPF = '1' | CNPJ =  '2'
                HeaderAllotment.Empresa.CNPJ     = Line.RetriveOnLine(19, 32);                                                                                                // NÚMERO DO CNPJ/CPF DA EMPRESA
                HeaderAllotment.Empresa.Convenio = Line.RetriveOnLine(33, 45).Trim();                                                                                         // CÓDIGO DO CONVÊNIO NO BANCO
                HeaderAllotment.Empresa.ContaBancaria.AgenciaBancaria.Agencia = Line.RetriveOnLine(54, 57);                                                                   // AGENCIA REFERENTE CONVÊNIO ASSINADO
                HeaderAllotment.Empresa.ContaBancaria.Conta  = Line.RetriveOnLine(66, 70);                                                                                    // NÚMERO DA C/C DO CLIENTE
                HeaderAllotment.Empresa.ContaBancaria.Digito = Line.RetriveOnLine(72, 72);                                                                                    // DAC (Dígito de Auto Conferência) DA AGÊNCIA/ CONTA.
                HeaderAllotment.Empresa.Nome                 = Line.RetriveOnLine(73, 102);                                                                                   // NOME DA EMPRESA
                HeaderAllotment.Empresa.Endereco.Nome        = Line.RetriveOnLine(143, 172).Trim();                                                                           // ENDEREÇO EMPRESA NOME DA RUA, AV, PÇA, ETC...
                HeaderAllotment.Empresa.Endereco.Numero      = String.IsNullOrEmpty(Line.RetriveOnLine(173, 177).Trim()) ? 0 : Convert.ToInt32(Line.RetriveOnLine(173, 177)); //  NÚMERO DO LOCAL
                HeaderAllotment.Empresa.Endereco.Tipo        = Line.RetriveOnLine(178, 192).Trim();                                                                           //  CASA, APTO, SALA, ETC...
                HeaderAllotment.Empresa.Endereco.Cidade      = Line.RetriveOnLine(193, 212).Trim();                                                                           // NOME DA CIDADE
                HeaderAllotment.Empresa.Endereco.CEP         = Line.RetriveOnLine(213, 220).Trim();                                                                           // CEP
                HeaderAllotment.Empresa.Endereco.EstadoSigla = Line.RetriveOnLine(221, 222).Trim();                                                                           // SIGLA DO ESTADO
                HeaderAllotment.Ocorrencias = Ocorrencia.ReturnOccurrence(Line.RetriveOnLine(231, 240));                                                                      // CÓDIGO OCORRÊNCIAS
                Result.Allotment.Add(new Allotment()
                    {
                        HeaderAllotment = HeaderAllotment
                    });

                break;
            }

            case IsFile.DetailsAllotment: {
                DetailsAllotment DetailsAllotment = new DetailsAllotment();
                DetailsAllotment.Banco = new Itau(false);

                Ocorrencias Ocorrencia = new Ocorrencias();

                DetailsAllotment.Banco.Codigo      = Line.RetriveOnLine(1, 3);                                              // CODIGO BANCARIO
                DetailsAllotment.SequencialDetalhe = Line.RetriveOnLine(9, 13);                                             // Nº SEQUENCIAL REGISTRO NO LOTE
                DetailsAllotment.CodigoIM          = Line.RetriveOnLine(15, 17);                                            // 000 = inclusão de debito | 999 = exlusão de debito
                DetailsAllotment.Cliente.ContaBancaria.AgenciaBancaria.Agencia = Line.RetriveOnLine(25, 28);                // Nº. AGÊNCIA DEBITADA
                DetailsAllotment.Cliente.ContaBancaria.Conta  = Line.RetriveOnLine(37, 41);                                 // NR. DA CONTA DEBITADA
                DetailsAllotment.Cliente.ContaBancaria.Digito = Line.RetriveOnLine(43, 43);                                 // DIGITO VERIFICADOR DA AG/CONTA
                DetailsAllotment.Cliente.Nome                 = Line.RetriveOnLine(44, 73).Trim();                          // NOME DO DEBITADO
                DetailsAllotment.Cliente.DataCobranca         = Line.RetriveOnLine(94, 101).FormatDate();                   // DATA PARA O LANÇAMENTO DO DÉBITO
                DetailsAllotment.Banco.Moeda                  = Line.RetriveOnLine(102, 104);                               // TIPO DA MOEDA
                DetailsAllotment.Cliente.ValorMoeda           = Line.RetriveOnLine(105, 119).FormatToMoney(5);              // QUANTIDADE DA MOEDA OU IOF
                DetailsAllotment.Cliente.ValorAgendado        = Line.RetriveOnLine(120, 134).FormatToMoney(2);              // VALOR DO LANÇAMENTO PARA DÉBITO
                DetailsAllotment.DocumentoBanco               = Line.RetriveOnLine(135, 154).Trim();                        // NR. DO DOCUM. ATRIBUÍDO PELO BANCO
                DetailsAllotment.DataLancto                   = Line.RetriveOnLine(155, 162).FormatDate();                  // DATA REAL DA EFETIVAÇÃO DO LANÇTO.
                DetailsAllotment.Empresa.Mora                 = (MoraTipo)Convert.ToInt32(Line.RetriveOnLine(178, 179));    //TIPO DO ENCARGO POR DIA DE ATRASO
                DetailsAllotment.Empresa.Juros                = Convert.ToSingle(Line.RetriveOnLine(180, 196));             // VALOR DO ENCARGO P/ DIA DE ATRASO
                DetailsAllotment.Empresa.IdentificadorExtrato = Line.RetriveOnLine(197, 212).Trim();                        // INFORMAÇÃO COMPL. P/ HISTÓRICO C/C
                DetailsAllotment.Cliente.CPF                  = Line.RetriveOnLine(217, 230).RemoveZeroLeftLine(11).Trim(); // Nº DE INSCRIÇÃO DO DEBITADO (CPF/CNPJ)
                DetailsAllotment.Ocorrencias                  = Ocorrencia.ReturnOccurrence(Line.RetriveOnLine(231, 240));  // CÓDIGO OCORRÊNCIAS
                Result.Allotment[Count].DetailsAllotment.Add(DetailsAllotment);

                break;
            }

            case IsFile.TrailerAllotment: {
                TrailerAllotment TrailerAllotment = new TrailerAllotment();
                TrailerAllotment.Banco = new Itau(false);
                Ocorrencias Ocorrencia = new Ocorrencias();

                TrailerAllotment.Banco.Codigo            = Line.RetriveOnLine(1, 3);                                  // CODIGO BANCARIO
                TrailerAllotment.SequencialLote          = Line.RetriveOnLine(4, 7);                                  // LOTE IDENTIFICAÇÃO DE SERVIÇO
                TrailerAllotment.Registro.TotalQtdLotes  = Convert.ToInt32(Line.RetriveOnLine(18, 23));               //QTDE REGISTROS DO LOTE
                TrailerAllotment.ValorDebitoTotal        = Line.RetriveOnLine(24, 41).FormatToMoney(2);               //SOMA VALOR DOS DÉBITOS DO LOTE
                TrailerAllotment.ValorMoedaTotal         = Line.RetriveOnLine(42, 59).FormatToMoney(5);               //SOMATÓRIA DA QTDE DE MOEDAS DO LOTE
                TrailerAllotment.Ocorrencias             = Ocorrencia.ReturnOccurrence(Line.RetriveOnLine(231, 240)); // CÓDIGO OCORRÊNCIAS
                Result.Allotment[Count].TrailerAllotment = TrailerAllotment;

                break;
            }

            case IsFile.TrailerFile: {
                Result.TrailerFile.Banco                  = new Itau(false);
                Result.TrailerFile.Banco.Codigo           = Line.RetriveOnLine(1, 3);                    // CÓDIGO BANCO NA COMPENSAÇÃO
                Result.TrailerFile.SequencialLote         = Line.RetriveOnLine(4, 7);                    // LOTE IDENTIFICAÇÃO DE SERVIÇO
                Result.TrailerFile.Registro.TotalQtdLotes = Convert.ToInt32(Line.RetriveOnLine(18, 23)); // QTDE LOTES DO ARQUIVO
                Result.TrailerFile.Registro.TotalQtdRegs  = Convert.ToInt32(Line.RetriveOnLine(24, 29)); // QTDE REGISTROS DO ARQUIVO

                break;
            }
            }

            return(Result);
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Itau Banco = new Itau();

            var Empresa1 = new Empresa()
            {
                CNPJ                 = "27035977000109",
                Nome                 = "ACADEMIA BRILHANTE EIREKI",
                Convenio             = "4997308312118",
                Juros                = 0.02f,
                IdentificadorExtrato = "HI10",
                Mora                 = MoraTipo.Isento,
                ContaBancaria        = new ContaBancaria()
                {
                    Conta           = "32789",
                    Digito          = "3",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "9248"
                    }
                },
                Endereco = new Endereco()
                {
                    Nome        = "Rua Pinhal, Boa Viagem",
                    CEP         = "51021470",
                    Cidade      = "Recife",
                    Numero      = 181,
                    EstadoSigla = "PE",
                    Tipo        = "Academia"
                }
            };

            var Empresa2 = new Empresa()
            {
                CNPJ          = "3189289000206",
                Nome          = "CENTRO DE ATIV E C F S LTDA",
                Convenio      = "4998108312126",
                Juros         = 0.02f,
                Mora          = MoraTipo.Isento,
                ContaBancaria = new ContaBancaria()
                {
                    Conta           = "32789",
                    Digito          = "3",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "9248"
                    }
                },
                Endereco = new Endereco()
                {
                    Nome        = "Rua Barão de Itamaraca, Espinheiro",
                    CEP         = "52020070",
                    Cidade      = "Recife",
                    Numero      = 54,
                    EstadoSigla = "PE",
                    Tipo        = "Academia"
                }
            };

            var Empresa3 = new Empresa()
            {
                CNPJ          = "3189289000206",
                Nome          = "CENTRO DE ATIV E C F S LTDA",
                Convenio      = "4998108312126",
                Juros         = 0.02f,
                Mora          = MoraTipo.Isento,
                ContaBancaria = new ContaBancaria()
                {
                    Conta           = "32789",
                    Digito          = "3",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "9248"
                    }
                },
                Endereco = new Endereco()
                {
                    Nome        = "Rua Barão de Itamaraca, Espinheiro",
                    CEP         = "52020070",
                    Cidade      = "Recife",
                    Numero      = 54,
                    EstadoSigla = "PE",
                    Tipo        = "Academia"
                }
            };

            var Empresa4 = new Empresa()
            {
                CNPJ          = "3189289000206",
                Nome          = "CENTRO DE ATIV E C F S LTDA",
                Convenio      = "4998108312126",
                Juros         = 0.02f,
                Mora          = MoraTipo.Isento,
                ContaBancaria = new ContaBancaria()
                {
                    Conta           = "32789",
                    Digito          = "3",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "9248"
                    }
                },
                Endereco = new Endereco()
                {
                    Nome        = "Rua Barão de Itamaraca, Espinheiro",
                    CEP         = "52020070",
                    Cidade      = "Recife",
                    Numero      = 54,
                    EstadoSigla = "PE",
                    Tipo        = "Academia"
                }
            };

            var Empresa5 = new Empresa()
            {
                CNPJ          = "3189289000206",
                Nome          = "CENTRO DE ATIV E C F S LTDA",
                Convenio      = "4998108312126",
                Juros         = 0.02f,
                Mora          = MoraTipo.Isento,
                ContaBancaria = new ContaBancaria()
                {
                    Conta           = "32789",
                    Digito          = "3",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "9248"
                    }
                },
                Endereco = new Endereco()
                {
                    Nome        = "Rua Barão de Itamaraca, Espinheiro",
                    CEP         = "52020070",
                    Cidade      = "Recife",
                    Numero      = 54,
                    EstadoSigla = "PE",
                    Tipo        = "Academia"
                }
            };

            var Cliente = new Cliente()
            {
                CPF              = "09665664580",
                Nome             = "Arthur Polegadas",
                CobrancaAgendada = new List <Cobranca>()
                {
                    new Cobranca {
                        Descricao = "Parcela", Valor = 1014f, Data = Convert.ToDateTime("25/01/2020")
                    }
                },
                ContaBancaria = new ContaBancaria()
                {
                    Conta           = "28170",
                    Digito          = "7",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "6942",
                        Digito  = "2"
                    },
                },
            };

            var Cliente2 = new Cliente()
            {
                CPF              = "09177350480",
                Nome             = "Marlon Lira",
                CobrancaAgendada = new List <Cobranca>()
                {
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/01/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/02/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/03/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/04/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/05/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/06/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/07/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/08/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/09/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/10/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/11/2020"), PctIOF = 0.04f
                    },
                    new Cobranca {
                        Descricao = "Parcela", Valor = 59.9f, Data = Convert.ToDateTime("25/12/2020"), PctIOF = 0.04f
                    }
                },
                ContaBancaria = new ContaBancaria()
                {
                    Conta           = "58765",
                    Digito          = "9",
                    AgenciaBancaria = new AgenciaBancaria()
                    {
                        Agencia = "6985",
                        Digito  = "3"
                    },
                },
            };

            /* List<Cliente> Clientes = new List<Cliente>() {
             *   new Cliente() {
             *       CPF = "09266777450",
             *       Nome = "Maria Benta",
             *       CobrancaAgendada = new List<Cobranca>() {
             *           new Cobranca { Descricao = "Taxa" , Valor = 19.99f, Data = Convert.ToDateTime("25/09/2019"), PctIOF = 0.1f },
             *           new Cobranca { Descricao = "Parcela" , Valor = 114f, Data = Convert.ToDateTime("25/10/2019"), PctIOF = 0.1f }
             *       },
             *       Endereco = new Endereco() {
             *           CEP = "541253680",
             *           Cidade = "Recife",
             *           Nome = "Dinopolis Arruda",
             *           EstadoSigla = "PE",
             *           Numero = 1025,
             *           Tipo = "Rua"
             *       },
             *       ContaBancaria = new ContaBancaria() {
             *           Conta = "78586",
             *           Digito = "7",
             *           AgenciaBancaria = new AgenciaBancaria() {
             *               Agencia = "9633",
             *               Digito = "3"
             *           }
             *       }
             *   },
             *   new Cliente() {
             *       CPF = "09266544450",
             *       Nome = "Bernadino Pessoa",
             *       CobrancaAgendada = new List<Cobranca>() {
             *           new Cobranca { Descricao = "Taxa" , Valor = 29.99f, Data = Convert.ToDateTime("25/07/2019")},
             *           new Cobranca { Descricao = "Parcela" , Valor = 99f, Data = Convert.ToDateTime("25/08/2020") }
             *       },
             *       Endereco = new Endereco() {
             *           CEP = "548553680",
             *           Cidade = "Recife",
             *           Nome = "Aleixinho",
             *           EstadoSigla = "PE",
             *           Numero = 105,
             *           Tipo = "Rua"
             *       },
             *       ContaBancaria = new ContaBancaria() {
             *           Conta = "98582",
             *           Digito = "7",
             *           AgenciaBancaria = new AgenciaBancaria() {
             *               Agencia = "9699",
             *               Digito = "3"
             *           }
             *       }
             *   },
             *   new Cliente() {
             *       CPF = "09266511450",
             *       Nome = "Zumira Bernardo",
             *       CobrancaAgendada = new List<Cobranca>() {
             *       new Cobranca { Descricao = "Taxa" , Valor = 19.90f, Data = Convert.ToDateTime("07/05/2020")},
             *       new Cobranca { Descricao = "Parcela" , Valor = 69f, Data = Convert.ToDateTime("07/04/2020")}
             *       },
             *       Endereco = new Endereco() {
             *           CEP = "547253880",
             *           Cidade = "Recife",
             *           Nome = "Arrudandalia",
             *           EstadoSigla = "PE",
             *           Numero = 102,
             *           Tipo = "Rua"
             *       },
             *       ContaBancaria = new ContaBancaria() {
             *           Conta = "78886",
             *           Digito = "7",
             *           AgenciaBancaria = new AgenciaBancaria() {
             *               Agencia = "8733",
             *               Digito = "3"
             *           }
             *       }
             *   },
             *   new Cliente() {
             *       CPF = "09266511450",
             *       Nome = "Carlos Eduardo",
             *       CobrancaAgendada = new List<Cobranca>() {
             *       new Cobranca { Descricao = "Taxa" , Valor = 19.90f, Data = Convert.ToDateTime("12/12/2020")},
             *       new Cobranca { Descricao = "Parcela" , Valor = 79f, Data = Convert.ToDateTime("01/11/2019")}
             *       },
             *       Endereco = new Endereco() {
             *           CEP = "547253880",
             *           Cidade = "Recife",
             *           Nome = "Varzea",
             *           EstadoSigla = "PE",
             *           Numero = 850,
             *           Tipo = "Rua"
             *       },
             *       ContaBancaria = new ContaBancaria() {
             *           Conta = "65286",
             *           Digito = "8",
             *           AgenciaBancaria = new AgenciaBancaria() {
             *               Agencia = "8223",
             *               Digito = "9"
             *           }
             *       }
             *   }
             * };
             * Clientes.Add(Cliente);
             * Clientes.Add(Cliente2);*/

            List <Cliente> Clientes = new List <Cliente>()
            {
                new Cliente()
                {
                    CPF              = "02826059408",
                    Nome             = "ALEXSANDRA V C S MEDEIROS",
                    CobrancaAgendada = new List <Cobranca>()
                    {
                        new Cobranca {
                            Descricao = "CB - Teste", Valor = 15f, Data = Convert.ToDateTime("18/10/2019"), NDocto = "080440000019900"
                        },
                    },
                    ContaBancaria = new ContaBancaria()
                    {
                        Conta           = "09740",
                        Digito          = "6",
                        AgenciaBancaria = new AgenciaBancaria()
                        {
                            Agencia = "5633"
                        }
                    }
                }
            };


            //StringBuilder StringB = Create.Shipping(Empresa, Clientes, (Bank)341, 2);
            //Create.TxtFile(StringB, Banco);

            //StringBuilder StringB2 = Create.Return(Empresa, Clientes, (Bank)341, 1);
            //String FileName = Create.TxtFile(StringB2, Banco, false);

            RetornoCNAB240 Result = Read.Return(@"C:\Users\suporte\Desktop\Repo\DS11109A.txt");

            Console.ReadKey();
        }