Пример #1
0
        /// <summary>
        /// 获取权限按钮
        /// </summary>
        /// <param name="controller"></param>
        /// <param name="menuId"></param>
        /// <returns></returns>
        public static List <Tapp_Button> LoadButton(this Controller controller, int menuId)
        {
            int        userId      = HttpContext.Current.AppUserId();
            RightHeper rightHelper = new RightHeper();

            return(rightHelper.LoadButton(userId, menuId));
        }
Пример #2
0
        /// <summary>
        /// 获取默认权限按钮
        /// </summary>
        /// <param name="controller"></param>
        /// <returns></returns>
        public static List <Tapp_Button> LoadButton(this Controller controller)
        {
            int        userId      = HttpContext.Current.AppUserId();
            RightHeper rightHelper = new RightHeper();

            return(rightHelper.LoadButton(userId, controller.RouteData.GetRequiredString("Controller"), controller.RouteData.GetRequiredString("Action")));
        }