Example #1
0
        public ActionResult Deletar(int id)
        {
            var tarefaDomainService = new TarefaDominioService();

            tarefaDomainService.Deletar(id);

            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult Alterar(TarefaModel viewModel)
        {
            var entidade = viewModel.ToEntidade();

            var tarefaDomainService = new TarefaDominioService();

            tarefaDomainService.Alterar(entidade);

            return(RedirectToAction("Index"));
        }
Example #3
0
        public ActionResult Inserir(TarefaModel tarefa)
        {
            var usuario = this.UsuarioLogado;

            if (usuario == null)
            {
                return(View());
            }

            tarefa.IdUsuario = usuario.Id;

            var tarefaDomainService = new TarefaDominioService();

            tarefaDomainService.Incluir(tarefa.ToEntidade());

            return(RedirectToAction("Index"));
        }