コード例 #1
0
        /// <summary>
        /// formulário de exclusão
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        public ActionResult Excluir(int id)
        {
            var modelView = PermissoesFactory.BuildModelView(permissaoDAO.GetById(id));

            ViewBag.Role          = new SelectList(roleDAO.List(), "Id", "Description", modelView.Role);
            ViewBag.TipoDeCalculo = tipoDeCalculo.List();
            return(View());
        }
コード例 #2
0
        /// <summary>
        /// Formulário de Alteração
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        public ActionResult Alterar(int id)
        {
            var model     = permissaoDAO.GetById(id);
            var modelView = PermissoesFactory.BuildModelView(model);

            ViewBag.Role          = new SelectList(roleDAO.List(), "Id", "Description", modelView.Role.ToString());
            ViewBag.TipoDeCalculo = tipoDeCalculo.List();
            return(View(modelView));
        }