Exemplo n.º 1
0
        //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));
        }
Exemplo n.º 2
0
        //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));
        }
Exemplo n.º 3
0
        //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));
        }
Exemplo n.º 4
0
        //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));
        }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 7
0
        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)
            }));
        }
Exemplo n.º 8
0
        // 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));
        }
Exemplo n.º 9
0
        //lista de tarefas
        public IActionResult Index()
        {
            var tarefas = _tarefaService.GetItemAsync();

            return(View());
        }