private void GridAtendimento_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (gridAtendimento.SelectedItems.Count == 1) { ConsultaViewModel value = (ConsultaViewModel)gridAtendimento.SelectedItem; DetalhePaciente formDetalhePaciente = new DetalhePaciente(value) { Owner = this }; formDetalhePaciente.Show(); } }
private void GridPacientes_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (gridPacientes.SelectedItems.Count == 1) { Paciente pFiltro = new Paciente(); PacientesViewModel value = (PacientesViewModel)gridPacientes.SelectedItem; String retorno = SiteUtil.RemoverCaracteresEspecial(value.Cpf); if (!string.Empty.Equals(retorno)) { pFiltro.Cpf = Convert.ToInt64(retorno); } Paciente resultado = new Service1Client().ConsultarPaciente(pFiltro).ToList()[0]; DetalhePaciente formDetalhePaciente = new DetalhePaciente(resultado) { Owner = this }; formDetalhePaciente.Show(); } }