Exemplo n.º 1
0
        public ListQueryResult <CreditRequestDto> GetDepartmentCreditRequestDtos(DepartmentCreditRequestsQuery query)
        {
            var rightsRes = CheckEmployeeRights(query.EmployeeId, EmployeeRights.CreditDepartmentChief);

            if (rightsRes.IsFailed)
            {
                return(new ListQueryResult <CreditRequestDto>(query, null, false).From(rightsRes));
            }
            return(Filter(_creditRequestService.GetDepartmentRequestsDtos(new DepartmentRequestsQuery()), query));
        }