Exemplo n.º 1
0
        public ActionResult GetFunction(Guid Id)
        {
            var function = _roleFunctionService.GetById(Id);
            var rs       = JsonFormaterUtils.Serialize(function);

            return(Content(rs));
        }
Exemplo n.º 2
0
        //TODO 权限部分
        // [AllowAnonymous]
        public ActionResult List(Guid roleId)
        {
            var functions = _roleFunctionService.GetShortMenu(roleId, true);

            var rs = JsonFormaterUtils.Serialize(functions);

            return(Content(rs));
        }
Exemplo n.º 3
0
 public static BASE_FUNCTIONS ToEntity(this MenuItemContract source)
 {
     if (source == null)
     {
         throw new InvalidOperationException("source is null");
     }
     return(new BASE_FUNCTIONS
     {
         FUNCTIONS_NAME = source.Name,
         FUNCTIONS_ACTION = source.Action,
         FUNCTIONS_ID = source.MenuId,
         FUNCTIONS_PARENTID = source.ParentMenuId,
         FUNCTIONS_ORDERBY = source.OrderBy,
         FUNCTIONS_CATEGORY = source.Category,
         FUNCTIONS_ATTRIBUTES = JsonFormaterUtils.Serialize(source.Attributes)
     });
 }