Exemplo n.º 1
0
        public Response <IEnumerable <ModuleElement> > LoadMenusForRole(string moduleId, string firstId)
        {
            var result = new Response <IEnumerable <ModuleElement> > ();

            try {
                result.Result = _app.LoadMenusForRole(moduleId, firstId);
            } catch (Exception ex) {
                result.Code    = 500;
                result.Message = ex.InnerException?.Message ?? ex.Message;
            }

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 根据某角色ID获取可访问某模块的菜单项
        /// </summary>
        /// <returns></returns>
        public string LoadMenusForRole(string moduleId, string firstId)
        {
            var menus = _app.LoadMenusForRole(moduleId, firstId);

            return(JsonHelper.Instance.Serialize(menus));
        }
Exemplo n.º 3
0
 /// <summary>
 /// 根据某角色ID获取可访问某模块的菜单项
 /// </summary>
 /// <returns></returns>
 public string LoadMenusForRole(string moduleId, string firstId)
 {
     System.Collections.Generic.IEnumerable <ModuleElement> menus = _app.LoadMenusForRole(moduleId, firstId);
     return(JsonHelper.Instance.Serialize(menus));
 }