Beispiel #1
0
 /// <summary>
 /// 获取菜单,无级别
 /// </summary>
 /// <param name="queryMenuReq"></param>
 /// <returns></returns>
 public TableData LoadNoCascade([FromQuery] QueryMenuReq queryMenuReq)
 {
     return(new TableData()
     {
         statusText = "success",
         data = MenuManagerApp.LoadNoCascade(queryMenuReq)
     });
 }
Beispiel #2
0
 public TableData LoadMenuAuthority()
 {
     return(new TableData()
     {
         statusText = "success",
         data = MenuManagerApp.LoadMenuAndButton()
     });
 }
Beispiel #3
0
        public Response <Menu> Update([FromBody] Menu menu)
        {
            var result = new Response <Menu>();

            try
            {
                MenuManagerApp.Update(menu);
            }
            catch (Exception e)
            {
                result.Code    = 500;
                result.Message = e.InnerException?.Message ?? e.Message;
            }
            return(result);
        }
Beispiel #4
0
        public Response <string> Delete(string ids)
        {
            var result = new Response <string>();

            try
            {
                MenuManagerApp.Delete(ids);
            }
            catch (Exception e)
            {
                result.Code    = 500;
                result.Message = e.InnerException?.Message ?? e.Message;
            }
            return(result);
        }
Beispiel #5
0
        public Response <string> SetMenuButton([FromBody] QueryMenuButton menuButtons)
        {
            var result = new Response <string>();

            try
            {
                MenuManagerApp.SetMenuButton(menuButtons);
            }
            catch (Exception ex)
            {
                result.Code    = 500;
                result.Message = ex.InnerException?.Message ?? ex.Message;
            }
            return(result);
        }
Beispiel #6
0
 public MenusController(MenuManagerApp menuManagerApp, IAuth iaAuth)
 {
     MenuManagerApp = menuManagerApp;
     IaAuth         = iaAuth;
 }