Exemplo n.º 1
0
        public List <SysRole> QueryAll()
        {
            SysRoleService dal = new SysRoleService();

            return(dal.GetAll());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取系统所有角色
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult GetRoles()
        {
            var list = SysRoleService.GetAll().OrderBy(e => e.Sort).Select(e => new { code = e.Serialnum, name = e.Name });

            return(new ApiResult(ExceptionCode.Success, "", list));
        }