Esempio n. 1
0
        private void dgProspect_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                LiberarFormulario();

                relatorioCTL CRelatorio = new relatorioCTL();
                DataTable    dataTable  = CRelatorio.RetornarDadosProspect(Convert.ToInt32(dgProspect.Rows[e.RowIndex].Cells[0].Value.ToString()));

                txtTelefone1.Text   = dataTable.Rows[0]["Telefone1"].ToString();
                txtTelefone2.Text   = dataTable.Rows[0]["Telefone2"].ToString();
                txtTelefone3.Text   = dataTable.Rows[0]["Telefone3"].ToString();
                txtCodProspect.Text = dataTable.Rows[0]["IDProspect"].ToString();
                txtNome.Text        = dataTable.Rows[0]["Nome"].ToString();
                txtLogradouro.Text  = dataTable.Rows[0]["Logradouro"].ToString();
                txtBairro.Text      = dataTable.Rows[0]["Bairro"].ToString();
                txtCidade.Text      = dataTable.Rows[0]["Cidade"].ToString();
                txtEstado.Text      = dataTable.Rows[0]["Estado"].ToString();
                txtEmail.Text       = dataTable.Rows[0]["Email"].ToString();
                txtCep.Text         = dataTable.Rows[0]["Cep"].ToString();//rr
                txtNumero.Text      = dataTable.Rows[0]["Numero"].ToString();
                txtCPF_CNPJ.Text    = dataTable.Rows[0]["CPF_CNPJ"].ToString();

                ListarHistoricoContato(Convert.ToDouble(txtTelefone1.Text));

                lblRegistrosHistorico.Text      = dgHistorico.RowCount.ToString() + " Registro de histórico(s)";
                lblRegistrosHistorico.ForeColor = Color.Blue;

                grbDadosProspect.Enabled = true;
                grbHistorico.Enabled     = true;
                grbScript.Enabled        = true;
            }
        }