private void Btncadastrarpaciente_Click(object sender, EventArgs e) { panelcadastropaciente.Controls.Clear(); DashPacienteCadastro novo = new DashPacienteCadastro(); panelcadastropaciente.Controls.Add(novo); novo.Show(); }
private void btnatt_Click(object sender, EventArgs e) { panelcadastropaciente.Controls.Clear(); DashPacienteCadastro novo = new DashPacienteCadastro(); panelcadastropaciente.Controls.Add(novo); novo.Show(); int id = int.Parse(DtvPacientes.SelectedRows[0].Cells[0].Value.ToString()); PacienteCtrl controle = new PacienteCtrl(); this.paciente = controle.BuscarPacienteID(id); }