Esempio n. 1
0
 /// <summary>
 /// 加载列表
 /// </summary>
 /// <returns></returns>
 public TableData Load()
 {
     return(new TableData()
     {
         statusText = "success",
         data = RoleManagerApp.Load()
     });
 }
Esempio n. 2
0
        public Response <Role> Update([FromBody] Role role)
        {
            var result = new Response <Role>();

            try
            {
                RoleManagerApp.Update(role);
            }
            catch (Exception e)
            {
                result.Code    = 500;
                result.Message = e.InnerException?.Message ?? e.Message;
            }
            return(result);
        }
Esempio n. 3
0
        public Response <string> Delete(string ids)
        {
            var result = new Response <string>();

            try
            {
                RoleManagerApp.Delete(ids);
                result.Result = ids;
            }
            catch (Exception e)
            {
                result.Code    = 500;
                result.Message = e.InnerException?.Message ?? e.Message;
            }
            return(result);
        }
Esempio n. 4
0
 public RolesController(RoleManagerApp roleManagerApp, IAuth auth)
 {
     RoleManagerApp = roleManagerApp;
     Auth           = auth;
 }
Esempio n. 5
0
 public RoleManagerController()
 {
     _app = AutofacExt.GetFromFac <RoleManagerApp>();
 }