public static JobDataModel ToDataModel(JobDTO jobDTO, JobApplicationDTO jobApplicationDTO, JobApplicationStateDTO jobApplicationStateDTO)
        {
            JobDataModel model = new JobDataModel();

            model.JobID = jobDTO.JobID;
            model.BusinessID = jobDTO.BusinessID;
            model.Title = jobDTO.Title;
            model.Description = jobDTO.Description;
            model.JobTypeID = jobDTO.JobTypeID;
            model.IsActive = jobDTO.IsActive;
            model.IsDeleted = jobDTO.IsDeleted;
            model.StartDate = jobDTO.StartDate;
            model.EndDate = jobDTO.EndDate;
            model.insuser = jobDTO.insuser;
            model.insdt = jobDTO.insdt;
            model.upduser = jobDTO.upduser;
            model.upddt = jobDTO.upddt;

            model.JobApplicationID = jobApplicationDTO.JobApplicationID;
            model.ApplicantUserID = jobApplicationDTO.ApplicantUserID;
            model.ApplicationDate = jobApplicationDTO.ApplicationDate;

            model.JobApplicationStateID = jobApplicationStateDTO.JobApplicationStateID;
            model.JobApplicationStatusID = jobApplicationStateDTO.JobApplicationStatusID;

            return model;
        }
 public JobDataModel GetJob(JobDTO oJobDTO)
 {
     JobDataModel oJobDataModel = null;
     if (oJobDTO != null)
     {
         oJobDataModel = JobDataModelAssembler.ToDataModel(oJobsBL.Get(oJobDTO.JobID), null, null);
     }
     return oJobDataModel;
 }
Exemple #3
0
        public JobDTO Create(JobDTO oJob)
        {
            if (oJob != null)
            {
                return JobAssembler.ToDTO(oJobRepos.CreateJob(JobAssembler.ToEntity(oJob)));
            }

            return null;
        }
        public JobApplicationDTO(Int32 jobApplicationID, Int32 jobID, Int32 applicantUserID, DateTime applicationDate, JobDTO job, UserDTO user, List<JobApplicationStateDTO> jobApplicationStates)
        {
			this.JobApplicationID = jobApplicationID;
			this.JobID = jobID;
			this.ApplicantUserID = applicantUserID;
			this.ApplicationDate = applicationDate;
			this.Job = job;
			this.User = user;
			this.JobApplicationStates = jobApplicationStates;
        }
Exemple #5
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;
        }
        public JobDataModel UpdateJob(JobDataModel oJobDataModel)
        {
            if (oJobDataModel != null)
            {
                JobDTO oJobDTO = new JobDTO();

                oJobDTO = JobDataModelAssembler.ToJobDTO(oJobDataModel);

                if (oJobDTO != null)
                {
                    oJobDTO = oJobsBL.Update(oJobDTO);
                }
            }

            return oJobDataModel;
        }
 public static JobDTO ToJobDTO(JobDataModel datamodel)
 {
     JobDTO dto = new JobDTO();
     if (datamodel != null)
     {
         dto.JobID = datamodel.JobID;
         dto.BusinessID = datamodel.BusinessID;
         dto.Title = datamodel.Title;
         dto.Description = datamodel.Description;
         dto.JobTypeID = datamodel.JobTypeID;
         dto.IsActive = datamodel.IsActive;
         dto.IsDeleted = datamodel.IsDeleted;
         dto.StartDate = datamodel.StartDate;
         dto.EndDate = datamodel.EndDate;
         dto.insuser = datamodel.insuser;
         dto.insdt = datamodel.insdt;
         dto.upduser = datamodel.upduser;
         dto.upddt = datamodel.upddt;
     }
     return dto;
 }
Exemple #8
0
        /// <summary>
        /// Converts this instance of <see cref="Job"/> to an instance of <see cref="JobDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="Job"/> to convert.</param>
        public static JobDTO ToDTO(this Job entity)
        {
            if (entity == null) return null;

            var dto = new JobDTO();

            dto.JobID = entity.JobID;
            dto.BusinessID = entity.BusinessID;
            dto.Title = entity.Title;
            dto.Description = entity.Description;
            dto.JobTypeID = entity.JobTypeID;
            dto.IsActive = entity.IsActive;
            dto.IsDeleted = entity.IsDeleted;
            dto.StartDate = entity.StartDate;
            dto.EndDate = entity.EndDate;
            dto.insuser = entity.insuser;
            dto.insdt = entity.insdt;
            dto.upduser = entity.upduser;
            dto.upddt = entity.upddt;

            entity.OnDTO(dto);

            return dto;
        }
Exemple #9
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="JobDTO"/> converted from <see cref="Job"/>.</param>
 static partial void OnDTO(this Job entity, JobDTO dto);
Exemple #10
0
 public JobApplicationDTO(Int32 jobApplicationID, Int32 jobID, Int32 applicantUserID, DateTime applicationDate, JobDTO job, UserDTO user, List <JobApplicationStateDTO> jobApplicationStates)
 {
     this.JobApplicationID = jobApplicationID;
     this.JobID            = jobID;
     this.ApplicantUserID  = applicantUserID;
     this.ApplicationDate  = applicationDate;
     this.Job  = job;
     this.User = user;
     this.JobApplicationStates = jobApplicationStates;
 }