private void btnConsulta_Click(object sender, EventArgs e) { frmEditPaci ep = new frmEditPaci(); ep.modConsulta = true; ep.idPaciente = Convert.ToInt32(gvDados.CurrentRow.Cells["ID"].Value); ep.ShowDialog(); }
private void btnEdita_Click(object sender, EventArgs e) { if (Convert.ToInt16(gvDados.CurrentRow.Cells["ID"].Value) > 0) { frmEditPaci ep = new frmEditPaci(); ep.modConsulta = false; ep.idPaciente = Convert.ToInt32(gvDados.CurrentRow.Cells["ID"].Value); ep.ShowDialog(); } else { MessageBox.Show("Selecione um registro!"); } }