public ArquivoRetornoElo(Arquivo arquivo) { transacoesEloDAO = new TransacoesEloDAO(arquivo.IdEmissor); infRegDAO = new InformacaoRegistroDAO(); this.arquivo = arquivo; totalRegistros = infRegDAO.TransacoesAceitas(arquivo.IdArquivo).Count; numRemessa = new ImportadorElo().NumeroRemessaRecebida(arquivo.IdArquivo); }
private string ValidarRemessaRecebidaAdquirencia(string header) { ImportadorElo importador = new ImportadorElo(); int numRec = importador.NumeroRemessaRecebida(arquivo.IdArquivo); int numEnv = importador.NumeroRemessaEnviada(arquivo.IdArquivo); //if ((numEnv > 0) && (numEnv - numRec) != 1) // return "02";//NUMERO DE REMESSA FORA DE SEQUENCIA if (LAB5Utils.ArquivoUtils.ExtrairInformacao(header, 3, 4) != "10") { return("11");//CODIGO DE SERVICO NAO PREVISTO } if (LAB5Utils.ArquivoUtils.ExtrairInformacao(header, 49, 52) != "0063") { return("13");//CODIGO DO EMISSOR INVALIDO } if (LAB5Utils.ArquivoUtils.ExtrairInformacao(header, 165, 167) != "007") { return("13");//CODIGO DE BANDEIRA INVALIDO } return(""); }