private void bunifuCustomDataGrid1_CellContentClick(object sender, DataGridViewCellEventArgs e) { codigo = Convert.ToString(bunifuCustomDataGrid1.CurrentRow.Cells[0].Value); String caminhobd = "Server=127.0.0.1;DATABASE=tcc_consultorio;UID=root;PASSWORD="******"select id_paciente, nome_paciente, rg_paciente, cpf_paciente, nasc_paciente, cel_paciente,tel_paciente, endereco_paciente, email_paciente, estcivil_paciente, profissao_paciente, anotacoes_paciente from paciente where id_paciente = '" + codigo + "'", con); MySqlDataReader reader = null; reader = cmd2.ExecuteReader(); if (reader.Read()) { Id_Paciente.Text = reader.GetString(0); nome_paciente.Text = reader.GetString(1); rg_paciente.Text = reader.GetString(2); cpf_paciente.Text = reader.GetString(3); nasc_paciente.Text = reader.GetString(4); cel_paciente.Text = reader.GetString(5); tel_paciente.Text = reader.GetString(6); endereco_paciente.Text = reader.GetString(7); email_paciente.Text = reader.GetString(8); estcivil_paciente.Text = reader.GetString(9); profissao_paciente.Text = reader.GetString(10); } con.Close(); panel1.Hide(); Limpar.Show(); Limpar.BringToFront(); Alterar.Visible = true; Excluir.Visible = true; }