Exemplo n.º 1
0
        public OcorrenciasHeadereTrailer(string linha, int numeroLinha, int quebra, int tamanhoTotal, SolidColorBrush cor)
        {
            try
            {
                Text                = linha;
                NUMERO_LINHA        = numeroLinha;
                QUEBRA              = quebra;
                TAMANHO_TOTAL_LINHA = tamanhoTotal;

                Foreground = cor;

                TIPO          = 7;
                NOME_REGISTRO = "Detalhe Tipo 5 - Ocorrências de Header e Trailer";
                CAMPOS        = new List <CampoArquivoCompe>();

                CAMPOS.Add(new CampoArquivoCompe(1, 1, 1, 1, "Tipo de registro", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(2, 2, 3, 1, "Banco apresentante", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(3, 5, 1, 1, "Indicador de remessa", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(4, 6, 7, 1, "Número da versão", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(5, 13, 2, 1, "Número da prévia de processamento", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(6, 15, 8, 1, "Data do movimento", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(7, 23, 10, 1, "Quantidade de registros", ref linha));

                for (int i = 1; i <= 20; i++)
                {
                    int indice = 32 + 3 * (i - 1);

                    if (linha.Substring(indice, 3) != "   ")
                    {
                        CAMPOS.Add(new CampoArquivoCompe(i + 7, indice + 1
                                                         , 3, 1, "Ocorrência", Ocorrencias.Descricao(Convert.ToInt16(linha.Substring(indice, 3)))));
                    }
                }

                CAMPOS.Add(new CampoArquivoCompe(10, 93, 42, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(11, 135, 6, 1, "Sequencial de arquivo", ref linha));
            }
            catch (Exception erro)
            {
                throw new ApplicationException("Ocorrências de Header e Trailer: " + erro.Message);
            }
        }
Exemplo n.º 2
0
        public DetalheAReceberRecusado(string linha, int numeroLinha, int quebra, int tamanhoTotal, SolidColorBrush cor)
        {
            try
            {
                Text                = linha;
                NUMERO_LINHA        = numeroLinha;
                QUEBRA              = quebra;
                TAMANHO_TOTAL_LINHA = tamanhoTotal;

                Foreground = cor;

                TIPO          = 6;
                NOME_REGISTRO = "Detalhe Tipo 4 - Detalhe a Receber Recusado";
                CAMPOS        = new List <CampoArquivoCompe>();

                CAMPOS.Add(new CampoArquivoCompe(1, 1, 1, 1, "Tipo de registro", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(2, 2, 3, 1, "Banco destinatário", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(3, 5, 2, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(4, 7, 3, 1, "Banco apresentante", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(5, 10, 3, 1, "Local destino", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(6, 13, 2, 1, "Tipo de ocorrência", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(7, 15, 3, 1, "Local destino do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(8, 18, 3, 1, "Banco do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(9, 21, 4, 1, "Agência do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(10, 25, 1, 1, "DV1", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(11, 26, 12, 1, "Conta do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(12, 38, 1, 1, "DV2", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(13, 39, 6, 1, "Número do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(14, 45, 1, 1, "DV3", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(15, 46, 2, 0, "UF", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(16, 48, 17, 1, "Valor do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(17, 65, 2, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(18, 67, 1, 0, "Tipificação do cheque", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(19, 68, 3, 1, "Banco apresentante da troca", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(20, 71, 4, 1, "Agência apresentante", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(21, 75, 7, 1, "Número do lote", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(22, 82, 3, 1, "Número sequencial do lote", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(23, 85, 8, 1, "Data da apresentação", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(24, 93, 6, 0, "Centro processador do lote", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(25, 99, 12, 1, "Conta de depósito", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(26, 111, 4, 1, "Agência de depósito", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(27, 115, 3, 1, "Ocorrência de erro", Ocorrencias.Descricao(Convert.ToInt16(linha.Substring(114, 3)))));
                CAMPOS.Add(new CampoArquivoCompe(28, 118, 10, 1, "Sequencial do erro", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(29, 128, 3, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(30, 131, 3, 1, "Tipo de documento", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(31, 134, 1, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(32, 135, 6, 1, "Sequencial de arquivo", ref linha));
            }
            catch (Exception erro)
            {
                throw new ApplicationException("Detalhes a Receber Recusados: " + erro.Message);
            }
        }
Exemplo n.º 3
0
        public LoteRecebidoComOcorrencia(string linha, int numeroLinha, int quebra, int tamanhoTotal, SolidColorBrush cor)
        {
            try
            {
                Text                = linha;
                NUMERO_LINHA        = numeroLinha;
                QUEBRA              = quebra;
                TAMANHO_TOTAL_LINHA = tamanhoTotal;

                Foreground = cor;

                TIPO          = 5;
                NOME_REGISTRO = "Detalhe Tipo 4 - Lote Recebido com Ocorrência";
                CAMPOS        = new List <CampoArquivoCompe>();

                CAMPOS.Add(new CampoArquivoCompe(1, 1, 1, 1, "Tipo de registro", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(2, 2, 3, 1, "Banco destinatário", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(3, 5, 2, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(4, 7, 3, 1, "Banco apresentante", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(5, 10, 3, 1, "Local destino", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(6, 13, 2, 1, "Tipo de ocorrência", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(7, 15, 6, 1, "Quantidade apurada", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(8, 21, 3, 1, "Quantidade informada", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(9, 24, 17, 1, "Valor apurado", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(10, 41, 17, 1, "Valor informado", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(11, 58, 24, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(12, 82, 7, 1, "Número do lote", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(13, 89, 26, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(14, 115, 3, 1, "Ocorrência de erro", Ocorrencias.Descricao(Convert.ToInt16(linha.Substring(114, 3)))));
                CAMPOS.Add(new CampoArquivoCompe(15, 118, 10, 1, "Sequencial do erro", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(16, 128, 3, 1, "Tipo de documento", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(17, 131, 3, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(18, 134, 1, 2, "Filler", ref linha));
                CAMPOS.Add(new CampoArquivoCompe(19, 135, 6, 1, "Sequencial de arquivo", ref linha));
            }
            catch (Exception erro)
            {
                throw new ApplicationException("Lotes Recebidos com Ocorrência: " + erro.Message);
            }
        }