Exemplo n.º 1
0
        public string ResponderCarregarFundosItauFinancial()
        {
            string lRetorno = string.Empty;

            List <Transporte_PosicaoCotista> ListaPosicao = base.PosicaoFundosSumarizado(this.GetIdCliente, this.GetCpfCnpj);

            var lRequestRendaFixa = new ConsultarEntidadeCadastroRequest <RendaFixaInfo>();

            lRequestRendaFixa.EntidadeCadastro = new RendaFixaInfo();

            lRequestRendaFixa.EntidadeCadastro.CodigoCliente = this.GetIdCliente;

            var lPosicaoRendaFixa = this.ServicoPersistenciaCadastro.ConsultarEntidadeCadastro <RendaFixaInfo>(lRequestRendaFixa);

            var lRendaFixaLista = lPosicaoRendaFixa.Resultado;

            var lClubesEFundos = new TransporteRelatorioClubesEFundos();

            lClubesEFundos.ListaFundos = new TransporteRelatorioFundos().TraduzirListaParaTransporteRelatorioFundos(ListaPosicao);

            lClubesEFundos.ListaRendaFixa = new TransporteRelatorioRendaFixa().TraduzirLista(lRendaFixaLista, null);

            lRetorno = base.RetornarSucessoAjax(lClubesEFundos, "Dados carregados com sucesso.");

            return(lRetorno);
        }
Exemplo n.º 2
0
        public string ResponderCarregarClubesEFundos()
        {
            string lRetorno = string.Empty;

            try
            {
                if (this.GetIdCliente != 0)
                {
                    var lConsultaClubes = this.ServicoPersistenciaCadastro.ConsultarEntidadeCadastro <ClienteClubesInfo>(
                        new ConsultarEntidadeCadastroRequest <ClienteClubesInfo>()
                    {
                        EntidadeCadastro = new ClienteClubesInfo()
                        {
                            IdCliente = this.GetIdCliente,
                        }
                        ,
                        IdUsuarioLogado = base.UsuarioLogado.Id
                        ,
                        DescricaoUsuarioLogado = base.UsuarioLogado.Nome
                    });

                    var lConsultaFundos = this.ServicoPersistenciaCadastro.ConsultarEntidadeCadastro <ClienteFundosInfo>(
                        new ConsultarEntidadeCadastroRequest <ClienteFundosInfo>()
                    {
                        EntidadeCadastro = new ClienteFundosInfo()
                        {
                            IdCliente = this.GetIdCliente,
                        }
                        ,
                        IdUsuarioLogado = base.UsuarioLogado.Id
                        ,
                        DescricaoUsuarioLogado = base.UsuarioLogado.Nome
                    });

                    if (MensagemResponseStatusEnum.OK.Equals(lConsultaClubes.StatusResposta))
                    {
                        var lClubesEFundos = new TransporteRelatorioClubesEFundos();

                        lClubesEFundos.ListaClubes = new TransporteRelatorioClubes().TraduzirListaParaTransporteRelatorioClubes(lConsultaClubes.Resultado);
                        lClubesEFundos.ListaFundos = new TransporteRelatorioFundos().TraduzirListaParaTransporteRelatorioFundos(lConsultaFundos.Resultado);

                        lRetorno = base.RetornarSucessoAjax(lClubesEFundos, "Dados carregados com sucesso.");
                    }
                    else
                    {
                        lRetorno = base.RetornarErroAjax("Erro ao selecionar Clubes e Fundos: {0} {1}", lConsultaClubes.StatusResposta, lConsultaClubes.DescricaoResposta);
                    }
                }
            }
            catch (Exception ex)
            {
                lRetorno = base.RetornarErroAjax("Erro ao selecionar Clubes e Fundos", ex);
            }

            return(lRetorno);
        }