private void AbrirProspect()
    {
        string sChave = ConfigurationManager.AppSettings["Chave"].ToString();
        string sVetorInicializacao = ConfigurationManager.AppSettings["VetorInicializacao"].ToString();

        PontoBr.Seguranca.Criptografia Criptografia = new PontoBr.Seguranca.Criptografia();
        string sIDProspect = Criptografia.Descriptografar(Request.QueryString["idprospect"].ToString(), sChave, sVetorInicializacao);

        prospect    Prospect  = new prospect();
        prospectCTL CProspect = new prospectCTL();

        Prospect = CProspect.RetornarProspect(Convert.ToInt32(sIDProspect));

        txtTelefone1.Text  = Prospect.Telefone1.ToString();
        txtTelefone2.Text  = Prospect.Telefone2.ToString();
        txtTelefone3.Text  = Prospect.Telefone3.ToString();
        txtNome.Text       = Prospect.Nome.ToString();
        txtLogradouro.Text = Prospect.Logradouro.ToString();
        txtBairro.Text     = Prospect.Bairro.ToString();
        txtCidade.Text     = Prospect.Cidade.ToString();
        txtEstado.Text     = Prospect.Estado.ToString();
        txtEmail.Text      = Prospect.Email.ToString();
        txtCep.Text        = Prospect.Cep.ToString();//rr
        txtNumero.Text     = Prospect.Numero.ToString();
        txtCPF_CNPJ.Text   = Prospect.CPF_CNPJ.ToString();

        ListarHistoricoContato(Convert.ToDouble(txtTelefone1.Text));
    }
    protected void grdDados_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
        {
            if (e.Row.RowState == DataControlRowState.Alternate)
            {
                e.Row.Attributes.Add("onmouseover", "this.className='grid_row_selecionado'");
                e.Row.Attributes.Add("onmouseout", "this.className='grid_alternative_row'");
            }
            else
            {
                e.Row.Attributes.Add("onmouseover", "this.className='grid_row_selecionado'");
                e.Row.Attributes.Add("onmouseout", "this.className='grid'");
            }

            int iIDProspect = Convert.ToInt32(grdDados.DataKeys[e.Row.RowIndex].Values[0].ToString());

            string sChave = ConfigurationManager.AppSettings["Chave"].ToString();
            string sVetorInicializacao = ConfigurationManager.AppSettings["VetorInicializacao"].ToString();
            PontoBr.Seguranca.Criptografia Criptografia = new PontoBr.Seguranca.Criptografia();
            string sIDProspect = Criptografia.Criptografar(iIDProspect.ToString(), sChave, sVetorInicializacao);

            string sLink = "window.location.href='cliente.aspx?idprospect=" + sIDProspect + "';";
            e.Row.Attributes.Add("onclick", sLink);
        }
    }
Example #3
0
    protected void dgProspects_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
    {
        if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
        {
            try
            {
                DateTime dDataAgendamento;
                DateTime dDataAtual = DateTime.Now;

                dDataAgendamento = PontoBr.Conversoes.Data.ConverterDataDDMMAAAAComBarraeHoraComSegundosParaDateTime(e.Row.Cells[3].Text);

                if (dDataAgendamento < dDataAtual)
                {
                    e.Row.Cells[3].ForeColor = System.Drawing.Color.Red;
                }
                else
                {
                    e.Row.Cells[3].ForeColor = System.Drawing.Color.Black;
                }

                if (e.Row.RowState == DataControlRowState.Alternate)
                {
                    e.Row.Attributes.Add("onmouseover", "this.className='grid_row_selecionado'");
                    e.Row.Attributes.Add("onmouseout", "this.className='grid_alternative_row'");
                }
                else
                {
                    e.Row.Attributes.Add("onmouseover", "this.className='grid_row_selecionado'");
                    e.Row.Attributes.Add("onmouseout", "this.className='grid'");
                }

                int iIDProspect = Convert.ToInt32(dgProspects.DataKeys[e.Row.RowIndex].Values[0].ToString());

                string sChave = ConfigurationManager.AppSettings["Chave"].ToString();
                string sVetorInicializacao = ConfigurationManager.AppSettings["VetorInicializacao"].ToString();
                PontoBr.Seguranca.Criptografia Criptografia = new PontoBr.Seguranca.Criptografia();
                string sIDProspect = Criptografia.Criptografar(iIDProspect.ToString(), sChave, sVetorInicializacao);

                e.Row.Attributes.Add("onclick", "parent.AbrirAgendamento('" + sIDProspect + "');");
            }
            catch (Exception ex)
            {
                PontoBr.Utilidades.Diversos.ExibirAlertaScriptManager(ex.Message, this.Page);
            }
        }
    }
Example #4
0
    protected void grdDados_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == System.Web.UI.WebControls.DataControlRowType.DataRow)
        {
            if (e.Row.RowState == DataControlRowState.Alternate)
            {
                e.Row.Attributes.Add("onmouseover", "this.className='grid_row_selecionado'");
                e.Row.Attributes.Add("onmouseout", "this.className='grid_alternative_row'");
            }
            else
            {
                e.Row.Attributes.Add("onmouseover", "this.className='grid_row_selecionado'");
                e.Row.Attributes.Add("onmouseout", "this.className='grid'");
            }

            int iIDHistorico = Convert.ToInt32(e.Row.Cells[0].Text);

            string sChave = ConfigurationManager.AppSettings["Chave"].ToString();
            string sVetorInicializacao = ConfigurationManager.AppSettings["VetorInicializacao"].ToString();
            PontoBr.Seguranca.Criptografia Criptografia = new PontoBr.Seguranca.Criptografia();
            string sIDHistorico = Criptografia.Criptografar(iIDHistorico.ToString(), sChave, sVetorInicializacao);

            string sLink = "window.location.href='venda.aspx?idhistorico=" + sIDHistorico;
            sLink += "&IDCampanha=" + dropCampanha.SelectedValue;
            sLink += "&DataInicial=" + txtdatDataInicial.Text;
            sLink += "&DataFinal=" + txtdatDataFinal.Text;
            sLink += "&Telefone1=" + txtTelefone1_filtro.Text;
            sLink += "&Nome=" + txtNome_filtro.Text;
            sLink += "&CPF_CNPJ=" + txtCPFCNPJ_filtro.Text;
            sLink += "&IDOperador=" + DropOperador.SelectedValue;
            sLink += "&IDStatusAuditoria=" + dropStatusAuditoria.SelectedValue;
            sLink += "&IDDadosVenda=" + dropDadosVenda.SelectedValue;
            sLink += "&TextoDadosVenda=" + txtTextoDadosVenda.Text;
            sLink += "';";
            e.Row.Attributes.Add("onclick", sLink);
        }
        else if (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.Header)
        {
            //e.Row.Cells[0].Visible = false;
        }
    }