示例#1
0
        public async Task Delete([FromBody] UserRole input)
        {
            await CheckPermission();

            var sqlR = new UserRoleRepository();
            await sqlR.Delete(input.Id);

            sqlR.Dispose();
        }
示例#2
0
        public async Task <JsonResult> GetAuthorityArray()
        {
            await CheckPermission();

            var sqlR   = new UserRoleRepository();
            var result = sqlR.GetAuthorityArray();

            sqlR.Dispose();
            return(Json(result));
        }
示例#3
0
        public async Task AddOrUpdate([FromBody] UserRoleRepository.UserRoleUi input)
        {
            await CheckPermission();

            var sqlr = new UserRoleRepository();
            await sqlr.AddUpdateUserRole(input);

            sqlr.Dispose();
            //return Json(new { message = "addOrUpdate OK" });
        }
示例#4
0
        public async Task <JsonResult> GetAll(int skip, int limit, string filter)
        {
            await CheckPermission();

            var er     = new UserRoleRepository();
            var result = await er.GetAll(skip, limit);

            er.Dispose();
            return(Json(result));
        }