Пример #1
0
        /// <summary>
        /// Returns the justification objectives for the office with the given id.
        /// </summary>
        /// <param name="officeId">The office by id.</param>
        /// <param name="queryOperator">The query operator.</param>
        /// <returns>The justification objectives.</returns>
        public PagedQueryResults <JustificationObjectiveDTO> GetJustificationObjectivesByOfficeId(int officeId, QueryableOperator <JustificationObjectiveDTO> queryOperator)
        {
            var results = JustificationObjectiveQueries.CreateGetJustificationObjectiveDTByOfficeIdOQuery(this.Context, officeId, queryOperator).ToPagedQueryResults(queryOperator.Start, queryOperator.Limit);

            logger.Trace("Retrieved justification objectives for office with id [{0}].", officeId);
            return(results);
        }
Пример #2
0
        /// <summary>
        /// Returns the justification objectives for the program with the given id.
        /// </summary>
        /// <param name="programId">The program by id.</param>
        /// <param name="queryOperator">The query operator.</param>
        /// <returns>The justification objectives.</returns>
        public async Task <PagedQueryResults <JustificationObjectiveDTO> > GetJustificationObjectivesByProgramIdAsync(int programId, QueryableOperator <JustificationObjectiveDTO> queryOperator)
        {
            var results = await JustificationObjectiveQueries.CreateGetJustificationObjectiveDTOByProgramIdQuery(this.Context, programId, queryOperator).ToPagedQueryResultsAsync(queryOperator.Start, queryOperator.Limit);

            logger.Trace("Retrieved justification objectives for program with id [{0}].", programId);
            return(results);
        }
Пример #3
0
 private IQueryable <int> CreateGetAllowedObjectiveIdsQuery(int officeId)
 {
     return(JustificationObjectiveQueries.CreateGetJustificationObjectiveDTByOfficeIdOQuery(this.Context, officeId).Select(x => x.Id));
 }