Exemple #1
0
        public virtual async Task <PagedResultDto <OrganizationUnitDetailDto> > GetListDetailsAsync(GetOrganizationUnitInput input)
        {
            var count = await UnitRepository.GetCountAsync();

            var list = await UnitRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount);

            var listDto = ObjectMapper.Map <List <OrganizationUnit>, List <OrganizationUnitDetailDto> >(list);

            foreach (var ouDto in listDto)
            {
                await TraverseTreeAsync(ouDto, ouDto.Children);
            }
            return(new PagedResultDto <OrganizationUnitDetailDto>(
                       count,
                       listDto
                       ));
        }
Exemple #2
0
 public Task <PagedResultDto <OrganizationUnitDto> > GetListDetailsAsync(GetOrganizationUnitInput input)
 {
     return(UnitAppService.GetListDetailsAsync(input));
 }
Exemple #3
0
        public virtual async Task <PagedResultDto <OrganizationUnitDto> > GetListAsync(GetOrganizationUnitInput input)
        {
            var count = await UnitRepository.GetCountAsync();

            var list = await UnitRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount);

            return(new PagedResultDto <OrganizationUnitDto>(
                       count,
                       ObjectMapper.Map <List <OrganizationUnit>, List <OrganizationUnitDto> >(list)
                       ));
        }