public FindingsTableDto <FindingsTableRowDto> GetDefectsForGroupAction(FindingsActionsDataTableFilterModelDto findingsDataTableFilter)
        {
            Defect defect = _defectService.FindById(findingsDataTableFilter.Id);
            FindingsActionsQuery findingsQuery = _mapper.Map <FindingsActionsQuery>(findingsDataTableFilter);

            findingsQuery.RootDefect = defect;

            IPagedList <DefectRowDto>  findings             = _defectService.GetDefectsForNodePaged(NodeType.Blade, defect.Sequence.BladeId, findingsQuery);
            List <FindingsTableRowDto> findingsTableRowDtos = _mapper.Map <IEnumerable <DefectRowDto>, IEnumerable <FindingsTableRowDto> >(findings).ToList();

            return(new FindingsTableDto <FindingsTableRowDto>
            {
                FindingsTableRows = findingsTableRowDtos,
                TotalRecords = findings.TotalCount
            });
        }
Ejemplo n.º 2
0
        public FindingsTableDto <FindingsTableRowDto> GetDefects(FindingsDataTableFilterModelDto findingsDataTableFilter)
        {
            FindingsQuery findingsQuery = _mapper.Map <FindingsQuery>(findingsDataTableFilter);

            if (findingsDataTableFilter.CustomFilterId != Guid.Empty)
            {
                findingsQuery.CustomFilterValues =
                    _customFilterService.GetById(findingsDataTableFilter.CustomFilterId).Values;
            }
            IPagedList <DefectRowDto>  findings             = _defectService.GetDefectsForNodePaged(findingsQuery.Type, findingsQuery.Id, findingsQuery);
            List <FindingsTableRowDto> findingsTableRowDtos = _mapper.Map <IEnumerable <DefectRowDto>, IEnumerable <FindingsTableRowDto> >(findings).ToList();

            return(new FindingsTableDto <FindingsTableRowDto>
            {
                FindingsTableRows = findingsTableRowDtos,
                TotalRecords = findings.TotalCount
            });
        }