Esempio n. 1
0
        public JobDTO Create(JobDTO modelDTO)
        {
            if (modelDTO != null)
            {
                return(JobAssembler.ToDTO(jobRepos.CreateJob(JobAssembler.ToEntity(modelDTO))));
            }

            return(null);
        }
Esempio n. 2
0
        public JobDTO Create(JobDTO oJob)
        {
            if (oJob != null)
            {
                return(JobAssembler.ToDTO(oJobRepos.CreateJob(JobAssembler.ToEntity(oJob))));
            }

            return(null);
        }
Esempio n. 3
0
        public JobDTO Get(int id)
        {
            JobDTO oJobDTO = null;

            if (id > 0)
            {
                oJobDTO = JobAssembler.ToDTO(jobRepos.GetJob(id));
            }

            return(oJobDTO);
        }
Esempio n. 4
0
        public JobDTO Update(JobDTO oJobDTO)
        {
            JobDTO returnUserMap = null;

            if (oJobDTO != null && oJobDTO.JobID > 0)
            {
                oJobRepos.UpdateJob(0, JobAssembler.ToEntity(oJobDTO));
                returnUserMap = oJobDTO;
            }

            return(returnUserMap);
        }
Esempio n. 5
0
        public JobDTO Update(JobDTO modelDTO)
        {
            JobDTO returnUserMap = null;

            if (modelDTO != null && modelDTO.JobID > 0)
            {
                jobRepos.UpdateJob(0, JobAssembler.ToEntity(modelDTO));
                returnUserMap = modelDTO;
            }

            return(returnUserMap);
        }
Esempio n. 6
0
        public IEnumerable <JobDTO> Get()
        {
            IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(jobRepos.GetJobs());

            if (oJob != null)
            {
                foreach (var item in oJob)
                {
                    item.Count = oJob.Count();
                }
            }
            return(oJob);
        }
Esempio n. 7
0
        public IEnumerable <JobDTO> GetJobsBySearch(string companyName, string jobTitle, string location, int?from, int?to)
        {
            int count = 0;
            var jobs  = jobRepos.GetJobsBySearch(companyName, jobTitle, location, from, to, out count);
            IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(jobs);

            if (oJob != null)
            {
                foreach (var item in oJob)
                {
                    var businessUsers = new BusinessUserMapBL().GetBusinessOwner(item.BusinessID).FirstOrDefault();
                    if (businessUsers != null)
                    {
                        item.Business.User = new UsersBL().Get(businessUsers.UserID);
                    }
                    item.Count = count;
                }
            }
            return(oJob);
        }
Esempio n. 8
0
        public IEnumerable <JobDTO> Get()
        {
            IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(oJobRepos.GetJobs());

            return(oJob);
        }