private void btnSelecionar_Click(object sender, EventArgs e) { FrmPacientePesquisar frmPacientePesquisar = new FrmPacientePesquisar(Acao.Selecionar); if (frmPacientePesquisar.ShowDialog() == DialogResult.OK) { lblCodigoProntuario.Text = frmPacientePesquisar.prontuario.codigo.ToString(); txtNome.Text = frmPacientePesquisar.prontuario.nome; if (string.IsNullOrEmpty(frmPacientePesquisar.prontuario.telefoneCelular.Replace("-", "").Replace("(", "").Replace(")", "").Trim())) { txtTelefoneCelular.Mask = null; } else { txtTelefoneCelular.Text = frmPacientePesquisar.prontuario.telefoneCelular; } if (string.IsNullOrEmpty(frmPacientePesquisar.prontuario.telefoneFixo.Replace("-", "").Replace("(", "").Replace(")", "").Trim())) { txtTelefoneFixo.Mask = null; } else { txtTelefoneFixo.Text = frmPacientePesquisar.prontuario.telefoneFixo; } txtDataNascimento.Text = frmPacientePesquisar.prontuario.dataNascimento.ToShortDateString(); CalculaIdade(); } }
private void btnSelecionar_Click(object sender, EventArgs e) { FrmPacientePesquisar frmPacientePesquisar = new FrmPacientePesquisar(Acao.Selecionar); if (frmPacientePesquisar.ShowDialog() == DialogResult.OK) { lblcodigo.Text = frmPacientePesquisar.prontuario.codigo.ToString(); } }