public IActionResult VerTarefa(int id) { ViewBag.Assinatura = new SelectList (_funcionarioDAO.ListarTodos(), "PessoaId", "Nome"); return(View(_tarefaDAO.BuscarTarefaPorId(id))); }
private void BtnPesquisar_Click(object sender, RoutedEventArgs e) { if (!txtIdTarefa.Text.Equals("")) { t = TarefaDAO.BuscarTarefaPorId(Convert.ToInt32(txtIdTarefa.Text)); if (t != null) { txtIdTarefa.Text = t.TarefaId.ToString(); txtNomeTarefa.Text = t.Titulo; txtTipo.Text = t.Tipo; txtStatus.Text = t.Status; txtPrioridade.Text = t.Prioridade.ToString(); txtResolucao.Text = t.Resolucao; txtDesc.Text = t.Descricao; //cbAssinatura.SelectedItem = t.Assinatura.Nickname.ToString(); //cbCliente.SelectedValue = t.Cliente.Nome; //cbRequisitante.SelectedValue = t.Requisitante.Nickname; dtCriadoEm.Text = t.CriadoEm.ToString(); } else { lbMensagem.Foreground = new SolidColorBrush(Colors.DarkRed); MensagemDeConfirmacaoOuErro("Tarefa não encontrada !"); } } else { lbMensagem.Foreground = new SolidColorBrush(Colors.DarkRed); MensagemDeConfirmacaoOuErro("Informe o nome da tarefa antes de pesquisar !"); } }