//Lista de tarefas public async Task <IActionResult> Index() { //Obter itens da tarefa var tarefas = await _tarefaService.GetItemAsync(); var model = new TarefaViewModel(); { model.TarefaItens = tarefas; } return(View(model)); }
//Tasks list public async Task <IActionResult> Index() { //Get data and return to view var Tarefas = await _TarefaService.GetItemAsync(); var Model = new TarefaViewModel(); { Model.TarefaItens = Tarefas; } return(View(Model)); }
//LISTA DE TAREFAS public async Task <IActionResult> Index() { //baixo acomplamento //TempTarefaItemService servico = new TempTarefaItemService(); var tarefas = await _tarefaService.GetItemAsync(); var model = new TarefaViewModel(); { model.TarefaItens = tarefas; } return(View(model)); }
//Lista de tarefas public async Task <IActionResult> Index() { //obter intens da tarefa //TempTarefaItemService servico = new TempTarefaItemService(); //var tarefas = servico.GetItemAsync(); var tarefas = await _tarefaService.GetItemAsync(); var model = new TarefaViewModel(); { model.TarefaItens = tarefas; } return(View(model)); }
public async Task <IActionResult> Edit(Guid?id) { if (id == null) { return(NotFound()); } var tarefa = await _tarefaService.GetItemAsync(id); if (tarefa == null) { return(NotFound()); } return(View(tarefa)); }
//Lista de tarefas public async Task <IActionResult> Index(bool?criterio, TarefaViewModel tarefaViewModel) { _tarefaViewModel = tarefaViewModel; //TempTarefaItemService servico = new TempTarefaItemService(); //var tarefas = servico.GetItemAsync(); var tarefas = await _tarefaService.GetItemAsync(criterio); //var model = new TarefaViewModel(); var TarefaViewModel = _tarefaViewModel; { TarefaViewModel.TarefaItens = tarefas; } return(View(TarefaViewModel)); }
public async Task <IActionResult> Index(bool?criterio) { ViewData["Title"] = "Gerenciar lista de tarefas"; //Pegando os dados do usuário logado atual var currentUser = await _userManager.GetUserAsync(User); //Challenge redireciona para a página de login novamente if (currentUser == null) { return(Challenge()); } //obter itens da tarefa return(View(new TarefaViewModel { TarefaItens = await _tarefaItemService.GetItemAsync(criterio, currentUser) })); }
// lista de tarefas public async Task <IActionResult> Index(bool?criterio) { // Obter os dados da tarefa //TempTarefaItemService servico = new TempTarefaItemService(); //var tarefas = servico.GetItemAsync(); var currentUser = await _userManager.GetUserAsync(User); if (currentUser == null) { return(Challenge()); } var tarefas = await _tarefaService.GetItemAsync(criterio, currentUser); var model = new TarefaViewModel(); { model.TarefaItens = tarefas; } return(View(model)); }
//lista de tarefas public IActionResult Index() { var tarefas = _tarefaService.GetItemAsync(); return(View()); }