/// <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)); }
/// <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"))); }