コード例 #1
0
        public ActionResult HomePermissao()
        {
            ViewBag.Titulo = "Manutenção de Permissões";
            var permissionAplication   = PermissaoAplicacaoConstrutor.PermissaoAp();
            var listaDeTodasPermissoes = permissionAplication.ListarTodos();

            return(View(listaDeTodasPermissoes));
        }
コード例 #2
0
        public ActionResult CadastrarPermissao(Permissao permissao)
        {
            if (ModelState.IsValid)
            {
                var permissionAplication = PermissaoAplicacaoConstrutor.PermissaoAp();
                permissionAplication.Salvar(permissao);

                return(RedirectToAction("HomePermissao"));
            }

            return(View());
        }