Exemplo n.º 1
0
 public TransporteRelatorio_005(ClientesExportadosSinacorInfo pInfo)
 {
     this.Id                 = pInfo.IdCliente;
     this.Nome               = pInfo.DsNomeCliente;
     this.CpfCnpj            = pInfo.DsCpfCnpj.ToCpfCnpjString();
     this.TipoDePessoa       = pInfo.TipoPessoa == "F"?"Física":"Jurídica";
     this.DataDeCadastro     = pInfo.DtCadastro.ToString("dd/MM/yyyy");
     this.CodigoDeBolsa      = pInfo.CodigoBovespa.DBToString();
     this.Assessor           = pInfo.CodigoAssessor.DBToString();
     this.UltimaExportacao   = pInfo.DtUltimaExportacao.ToString("dd/MM/yyyy");
     this.PrimeiraExportacao = pInfo.DtPrimeiraExportacao.ToString("dd/MM/yyyy");
     this.Telefones          = string.IsNullOrWhiteSpace(pInfo.DsTelefone) ? "-" : string.Format("({0}) {1}", pInfo.DsDDD, pInfo.DsTelefone);
 }
Exemplo n.º 2
0
        private void ResponderBuscarItensParaListagemSimples()
        {
            var lRequest = new ConsultarEntidadeCadastroRequest <ClientesExportadosSinacorInfo>()
            {
                IdUsuarioLogado = base.UsuarioLogado.Id, DescricaoUsuarioLogado = base.UsuarioLogado.Nome
            };
            var lResponse = new ConsultarEntidadeCadastroResponse <ClientesExportadosSinacorInfo>();

            try
            {
                string lDataInicial = Request.Form["DataInicial"], lDataFinal = Request.Form["DataFinal"],
                       lAssessor = Request.Form["Assessor"], lBolsa = Request.Form["Bolsa"], lCpfCnpj = Request.Form["CpfCnpj"];

                ClientesExportadosSinacorInfo lInfo = new ClientesExportadosSinacorInfo()
                {
                    DtDe           = this.GetDataInicial,
                    DtAte          = this.GetDataFinal,
                    CodigoAssessor = this.GetAssessor,
                    DsCpfCnpj      = this.GetCpfCnpj,
                    CdBolsa        = this.GetBolsa,
                    TipoPessoa     = this.GetTipoPessoa
                };

                lRequest.EntidadeCadastro = lInfo;

                lResponse = this.ServicoPersistenciaCadastro.ConsultarEntidadeCadastro <ClientesExportadosSinacorInfo>(lRequest);

                if (lResponse.StatusResposta == MensagemResponseStatusEnum.OK)
                {
                    if (lResponse.Resultado.Count > 0)
                    {
                        IEnumerable <TransporteRelatorio_005> lLista = from ClientesExportadosSinacorInfo i in lResponse.Resultado select new TransporteRelatorio_005(i);

                        if (lLista.Count() >= gTamanhoDaParte)
                        {
                            this.ListaDeResultados = lLista;

                            this.rptRelatorio.DataSource = BuscarParte(1);

                            rowLinhaCarregandoMais.Visible = true;
                        }
                        else
                        {
                            this.rptRelatorio.DataSource = lLista;
                        }

                        this.rptRelatorio.DataBind();

                        rowLinhaDeNenhumItem.Visible = false;
                    }
                    else
                    {
                        rowLinhaDeNenhumItem.Visible = true;
                    }
                }
            }
            catch (Exception exBusca)
            {
                throw exBusca;
            }
        }