예제 #1
0
        public void BuildNavigation(IRequestQuery request)
        {
            var queryParams = new Dictionary <string, string>
            {
                { "SearchInput", request.SearchInput },
                { "OrderBy", request.OrderBy },
                { "OrderDirection", request.OrderDirection },
                { "Limit", request.Limit.ToString() },
            };

            string urlParams = QueryHelpers.AddQueryString("", queryParams);

            foreach (var item in request.SearchColumns)
            {
                urlParams = $"{urlParams}&SearchColumns={item}";
            }
            urlParams += "&Page={0}";

            Navigation = new Navigation
            {
                FirstPage                              = string.Format(urlParams, 1),
                PreviousPage                           = Page > 1 ? string.Format(urlParams, Page - 1): "",
                NextPage                               = Page < TotalPages?string.Format(urlParams, Page + 1) : "",
                                              LastPage = string.Format(urlParams, TotalPages)
            };
        }
예제 #2
0
        public RequestFound(IRequestQuery query)
        {
            Query = query;

            StatusRequest = new StatusRequest();
            StartRequest();
        }
예제 #3
0
 public RequestAppService(IRequestQuery requestQuery, IRequestRepository requestRepository,
     IPlanAircraftRepository planAircraftRepository)
 {
     _requestQuery = requestQuery;
     _requestRepository = requestRepository;
     _planAircraftRepository = planAircraftRepository;
 }
예제 #4
0
        private RequestFound GetRequestFound(IRequestQuery query)
        {
            var req = new RequestFound(query);

            CollectionRequest.Add(req);

            return(req);
        }
예제 #5
0
        public RequestService(IQueryHandler queryHandler,

                              IQuery <DescriptionProblemQueryParam, IEnumerable <SimpleDTO> > descriptionProblemQuery,
                              IQuery <RequestLastEventQueryParam, IEnumerable <RequestEventDTO> > requestLastEventQuery,
                              IQuery <ArchiveYearQueryParam, IEnumerable <Year> > archiveYearQuery,
                              IQuery <EmployeeArchiveYearQueryParam, IEnumerable <Year> > employeeArchiveYearQuery,
                              IQuery <RequestStateCountQueryParam, IEnumerable <RequestStateCountDTO> > requestStateCountQuery,
                              IEmployeeRequestQuery <Request> employeeRequestQuery,
                              IEmployeeRequestQuery <RequestArch> employeeRequestArchQuery,
                              IRequestQuery <Request> requestQuery,
                              IRequestQuery <RequestArch> requestArchQuery,

                              IBaseRepository <RequestObject> objectRepository,
                              IBaseRepository <DescriptionProblem> descriptionProblemRepository,
                              ISettingsService settingsService,
                              IBaseRepository <OrganizationObjectTypeWorker> organizationObjectTypeWorkerRepository,
                              IBaseRepository <Employee> employeeRepository,
                              IBaseRepository <StatusRequest> statusRepository,
                              IBaseRepository <Request> requestRepository,
                              IBaseRepository <RequestArch> requestArchRepository,
                              IBaseRepository <RequestEvent> requestEventRepository,
                              IBaseRepository <RequestEventArch> requestEventArchRepository,
                              IBaseRepository <RequestFile> requestFileRepository,
                              IBaseRepository <Worker> workerRepository,
                              IBaseRepository <WorkerUser> workerUserRepository,
                              IRepository repository,
                              IDateTimeService dateTimeService,
                              IRequestConstraintsService requestConstraintsService,
                              IStatusRequestMapService statusRequestMapService,
                              IBaseRepository <AccessWorkerUser> accessWorkerUserRepository,
                              IAccessWorkerUserExpressionService accessWorkerUserExpressionService,
                              IQueue <IRequestAppEvent> queue,
                              ICache memoryCache)
        {
            this.queryHandler = queryHandler;

            _descriptionProblemQuery  = descriptionProblemQuery;
            _requestLastEventQuery    = requestLastEventQuery;
            _archiveYearQuery         = archiveYearQuery;
            _employeeArchiveYearQuery = employeeArchiveYearQuery;
            _requestStateCountQuery   = requestStateCountQuery;
            _employeeRequestQuery     = employeeRequestQuery;
            _employeeRequestArchQuery = employeeRequestArchQuery;
            _requestQuery             = requestQuery;
            _requestArchQuery         = requestArchQuery;

            this.objectRepository             = objectRepository;
            this.descriptionProblemRepository = descriptionProblemRepository;
            this.settingsService = settingsService;
            this.organizationObjectTypeWorkerRepository = organizationObjectTypeWorkerRepository;
            this.employeeRepository         = employeeRepository;
            this.statusRepository           = statusRepository;
            this.requestRepository          = requestRepository;
            this.requestArchRepository      = requestArchRepository;
            this.requestEventRepository     = requestEventRepository;
            this.requestEventArchRepository = requestEventArchRepository;
            this.requestFileRepository      = requestFileRepository;
            this.workerRepository           = workerRepository;
            this.workerUserRepository       = workerUserRepository;
            this.repository                        = repository;
            this.dateTimeService                   = dateTimeService;
            this.requestConstraintsService         = requestConstraintsService;
            this.statusRequestMapService           = statusRequestMapService;
            this.accessWorkerUserRepository        = accessWorkerUserRepository;
            this.accessWorkerUserExpressionService = accessWorkerUserExpressionService;
            this.queue = queue;
        }