public string GerarHeaderRemessa(TipoArquivo tipoArquivo, int numeroArquivoRemessa, ref int numeroRegistroGeral) { try { var header = Empty; switch (tipoArquivo) { case TipoArquivo.CNAB240: // Cabeçalho do Arquivo header += GerarHeaderRemessaCNAB240SIGCB(numeroArquivoRemessa, ref numeroRegistroGeral); // Cabeçalho do Lote header += Environment.NewLine; header += GerarHeaderLoteRemessaCNAB240SIGCB(numeroArquivoRemessa, ref numeroRegistroGeral); break; default: throw new Exception("Header - Tipo de arquivo inexistente."); } return(header); } catch (Exception ex) { throw Boleto2NetException.ErroAoGerarRegistroHeaderDoArquivoRemessa(ex); } }
public string GerarHeaderRemessa(TipoArquivo tipoArquivo, int numeroArquivoRemessa, ref int numeroRegistroGeral) { try { var header = string.Empty; switch (tipoArquivo) { case TipoArquivo.CNAB400: header += GerarHeaderRemessaCNAB400(numeroArquivoRemessa, ref numeroRegistroGeral); break; default: throw new Exception("Header - Tipo de arquivo inexistente."); } return header; } catch (Exception ex) { throw Boleto2NetException.ErroAoGerarRegistroHeaderDoArquivoRemessa(ex); } }