Exemplo n.º 1
0
        public JobsOutput GetAllActiveJobsByTemplateId(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobService.GetAllActiveJobsByTemplateId(input);
            return(output);
        }
Exemplo n.º 2
0
        public JobsOutput GetAllActiveJobsQueryId(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobsRepository.GetAllActiveJobsQueryId(input);
            return(output);
        }
Exemplo n.º 3
0
        public JobsOutput GetJobByTemplateId(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobsRepository.GetJobByTemplateId(input);
            return(output);
        }
Exemplo n.º 4
0
        private JobsOutput FilteredJobs(JobsInput input)
        {
            var output = new JobsOutput();
            var jobs   = _jobsRepository.GetAllJobs();

            if (input.Id > 0)
            {
                jobs = GetJobById(input);
            }
            else
            {
                if (input.TemplateId != null && input.TemplateId > 0)
                {
                    jobs.JobsListModel = jobs.JobsListModel.Where(x => x.TemplateId == input.TemplateId).ToList();
                }
                if (input.QueryId != null && input.QueryId > 0)
                {
                    jobs.JobsListModel = jobs.JobsListModel.Where(x => x.QueryId == input.QueryId).ToList();
                }
                if (input.TypeId != null && input.TypeId > 0)
                {
                    jobs.JobsListModel = jobs.JobsListModel.Where(x => x.TypeId == input.TypeId).ToList();
                }
            }
            output = jobs;

            return(output);
        }
Exemplo n.º 5
0
        public JobsOutput GetAllJobsByTypeId(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobsRepository.GetAllJobsByTypeId(input);
            return(output);
        }
Exemplo n.º 6
0
        public JobsOutput GetJobByTemplateId(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobService.GetJobByTypeId(input);
            return(output);
        }
Exemplo n.º 7
0
        public JobsOutput UpdateJob(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobService.UpdateJob(input);
            return(output);
        }
Exemplo n.º 8
0
        public JobsOutput GetJobsWithFilters(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobService.GetJobsWithFilters(input);
            return(output);
        }
Exemplo n.º 9
0
        public JobsOutput UpdateJob(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobsRepository.UpdateJob(input);
            return(output);
        }
Exemplo n.º 10
0
        public JobsOutput GetAllJobsQueryId(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobService.GetAllJobsQueryId(input);
            return(output);
        }
Exemplo n.º 11
0
        public JobsOutput GetJobsWithFilters(JobsInput input)
        {
            var output = new JobsOutput();

            output = FilteredJobs(input);
            output = Navigator(output);
            return(output);
        }
Exemplo n.º 12
0
        public JobsOutput GetJobById(JobsInput input)
        {
            var output = new JobsOutput();

            output = _jobsRepository.GetJobById(input);
            output = Navigator(output);
            return(output);
        }
Exemplo n.º 13
0
        public JobsOutput CreateJob(JobsInput input)
        {
            var output = new JobsOutput();
            var job    = Create(_mapper.Map <Jobs>(input));

            if (job != null)
            {
                output.JobsModel = _mapper.Map <JobsDto>(job);
            }
            return(output);
        }
Exemplo n.º 14
0
        public JobsOutput GetAllJobsQueryId(JobsInput input)
        {
            var output = new JobsOutput();
            var jobs   = GetAllWithFilter(x => x.QueryId == input.QueryId);

            if (jobs.Count > 0)
            {
                output.JobsListModel = _mapper.Map <List <JobsDto> >(jobs);
            }
            return(output);
        }
Exemplo n.º 15
0
        public JobsOutput GetAllActiveJobsByTypeId(JobsInput input)
        {
            var output = new JobsOutput();
            var jobs   = GetAllWithFilter(x => x.TypeId == input.TypeId && !x.IsDeleted);

            if (jobs.Count > 0)
            {
                output.JobsListModel = _mapper.Map <List <JobsDto> >(jobs);
            }
            return(output);
        }
Exemplo n.º 16
0
        public JobsOutput GetJobQueryId(JobsInput input)
        {
            var output = new JobsOutput();
            var job    = GetWithFilter(x => x.QueryId == input.QueryId);

            if (job != null)
            {
                output.JobsModel = _mapper.Map <JobsDto>(job);
            }
            return(output);
        }
Exemplo n.º 17
0
        public JobsOutput UpdateJob(JobsInput input)
        {
            var output = new JobsOutput();

            Update(_mapper.Map <Jobs>(input));
            var job = GetWithFilter(x => x.Id == input.Id);

            if (job != null)
            {
                output.JobsModel = _mapper.Map <JobsDto>(job);
            }
            return(output);
        }
Exemplo n.º 18
0
 public bool DeleteJob(JobsInput input)
 {
     return(Delete(_mapper.Map <Jobs>(input)));
 }
Exemplo n.º 19
0
 public bool DeleteJob(JobsInput input)
 {
     return(_jobService.DeleteJob(input));
 }
Exemplo n.º 20
0
 public bool DeleteJob(JobsInput input)
 {
     return(_jobsRepository.DeleteJob(input));
 }