Exemplo n.º 1
0
        public IActionResult List()
        {
            try
            {
                if (!IsPermission(FunctionID))
                {
                    return(ToPermission(FunctionID));
                }

                string keyword  = GetQueryString("keyword");
                string parentId = string.IsNullOrWhiteSpace(keyword) ? "" : keyword;
                var    lists    = FunctionService.GetFunctionByParentIdPro(parentId);
                int    totalNum = lists.Count();
                ViewBag.keyword = keyword;
                ViewBag.Count   = totalNum;
                return(View(lists));
            }
            catch (Exception ex)
            {
                return(ToError(ex.Message));
            }
        }
Exemplo n.º 2
0
        public IActionResult Add()
        {
            try
            {
                string funcId = PermissionEnum.CodeFormat((int)PermissionEnum.管理员管理.角色管理.新增);
                if (!IsPermission(funcId))
                {
                    return(ToPermission(funcId));
                }

                string parentId = "";
                var    lists    = FunctionService.GetFunctionByParentIdPro(parentId);
                return(View(lists));
            }
            catch (Exception ex)
            {
                return(ToError(ex.Message));
            }
        }