Esempio n. 1
0
        public ActionResult R2010(decimal oidContribuinte, string tipoOperacao, string tipoAmbiente, string dtaInicial, string dtaFinal)
        {
            var dtaIni = DateTime.ParseExact(dtaInicial, "dd.MM.yyyy", new CultureInfo("pt-BR"));
            var dtaFim = DateTime.ParseExact(dtaFinal, "dd.MM.yyyy", new CultureInfo("pt-BR"));

            try
            {
                var parametros = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("OID_CONTRIBUINTE", oidContribuinte),
                    new KeyValuePair <string, object>("IND_RETIFICACAO", tipoOperacao),
                    new KeyValuePair <string, object>("IND_AMBIENTE_ENVIO", tipoAmbiente),
                    new KeyValuePair <string, object>("DTA_APURACAO_INI", dtaInicial),
                    new KeyValuePair <string, object>("DTA_APURACAO_FIM", dtaFinal)
                };

                var relatorio = GeradorRelatorio.Gerar("RelatorioR2010", HostingEnvironment.ContentRootPath, parametros);

                return(File(relatorio, "application/pdf"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Esempio n. 2
0
        public ActionResult R2099(decimal oidContribuinte, string tipoAmbiente, string periodo, string contratacaoServicos, string prestacaoServicos, string associacaoDesportiva, string repasseAssociacaoDesportiva, string producaoRural, string aquisicaoRural, string pagamentosDiversos, string competencia)
        {
            var dtaPeriodo     = DateTime.ParseExact(periodo, "dd.MM.yyyy", new CultureInfo("pt-BR"));
            var dtaCompetencia = DateTime.ParseExact(competencia, "dd.MM.yyyy", new CultureInfo("pt-BR"));

            try
            {
                var parametros = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("OID_CONTRIBUINTE", oidContribuinte),
                    new KeyValuePair <string, object>("IND_AMBIENTE_ENVIO", tipoAmbiente),
                    new KeyValuePair <string, object>("DTA_PERIODO_APURACAO", dtaPeriodo),
                    new KeyValuePair <string, object>("IND_CONTRATACAO_SERV", contratacaoServicos),
                    new KeyValuePair <string, object>("IND_PRESTACAO_SERV", prestacaoServicos),
                    new KeyValuePair <string, object>("IND_ASSOCIACAO_DESPORTIVA", associacaoDesportiva),
                    new KeyValuePair <string, object>("IND_REPASSE_ASSOC_DESPORT", repasseAssociacaoDesportiva),
                    new KeyValuePair <string, object>("IND_PRODUCAO_RURAL", producaoRural),
                    new KeyValuePair <string, object>("IND_AQUISICAO_RURAL", aquisicaoRural),
                    new KeyValuePair <string, object>("IND_PAGAMENTOS_DIVERSOS", pagamentosDiversos),
                    new KeyValuePair <string, object>("DTA_COMPETENCIA_SEM_MOV", dtaCompetencia),
                };

                var relatorio = GeradorRelatorio.Gerar("RelatorioR2099", HostingEnvironment.ContentRootPath, parametros);

                return(File(relatorio, "application/pdf"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
        public IActionResult Relatorio(decimal oidArquivoUpload)
        {
            try
            {
                var parametros = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("OID_ARQUIVO_UPLOAD", oidArquivoUpload)
                };

                var relatorio = GeradorRelatorio.Gerar("RelatorioCriticasImportacao", HostingEnvironment.ContentRootPath, parametros);

                return(File(relatorio, "application/pdf"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Esempio n. 4
0
        public ActionResult R1070(decimal oidContribuinte, string tipoAmbiente)
        {
            try
            {
                var parametros = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("OID_CONTRIBUINTE", oidContribuinte),
                    new KeyValuePair <string, object>("IND_TIPO_AMBIENTE", tipoAmbiente)
                };

                var relatorio = GeradorRelatorio.Gerar("RelatorioR1070", HostingEnvironment.ContentRootPath, parametros);

                return(File(relatorio, "application/pdf"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Esempio n. 5
0
        public ActionResult R2098(decimal oidContribuinte, string tipoAmbiente, string periodo)
        {
            var dtaPeriodo = DateTime.ParseExact(periodo, "dd.MM.yyyy", new CultureInfo("pt-BR"));

            try
            {
                var parametros = new List <KeyValuePair <string, object> >
                {
                    new KeyValuePair <string, object>("OID_CONTRIBUINTE", oidContribuinte),
                    new KeyValuePair <string, object>("IND_AMBIENTE_ENVIO", tipoAmbiente),
                    new KeyValuePair <string, object>("DTA_PERIODO_APURACAO", dtaPeriodo)
                };

                var relatorio = GeradorRelatorio.Gerar("RelatorioR2098", HostingEnvironment.ContentRootPath, parametros);

                return(File(relatorio, "application/pdf"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }