public async Task <ActionResult <CommonAPIResponse <JobSeekerApplyReturnDTO> > > GetJobSeekerApplyById(int id)
        {
            #region Vars
            JobSeekerApplyReturnDTO JobSeekerApplyReturnDTO = null;
            #endregion
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <object>();
            #endregion
            try
            {
                if (id != default(int))
                {
                    JobSeekerApplyReturnDTO = await JobSeekerApplyAppService.GetJobSeekerApplyById(id);
                }

                #region Validate userIdentityDTO for nullability before prepaing the response.
                if (JobSeekerApplyReturnDTO != null)
                {
                    jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), JobSeekerApplyReturnDTO, HttpStatusCode.OK);
                }
                else
                {
                    jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), new object(), HttpStatusCode.BadRequest);
                }
                #endregion
            }
            catch (Exception exception)
            {
            }
            return(jsonResult);
        }
Пример #2
0
 /// <summary>
 /// Get  JobSeekerApply By Id
 /// </summary>
 /// <returns>JobSeekerApplyReturnDTO<JobSeekerApplyReturnDTO></returns>
 public async Task <JobSeekerApplyReturnDTO> GetJobSeekerApplyById(int JobSeekerApplyId)
 {
     #region Declare a return type with initial value.
     JobSeekerApplyReturnDTO JobSeekerApply = null;
     #endregion
     try
     {
         if (JobSeekerApplyId > default(int))
         {
             JobSeekerApply = await JobSeekerApplyBusinessMapping.GetJobSeekerApplyById(JobSeekerApplyId);
         }
     }
     catch (Exception exception)  {}
     return(JobSeekerApply);
 }
        /// <summary>
        /// Get user Action Activity Log By Id
        /// </summary>
        /// <returns>List<JobSeekerApplyReturnDTO></returns>
        public async Task <JobSeekerApplyReturnDTO> GetJobSeekerApplyById(int JobSeekerApplyId)
        {
            #region Declare a return type with initial value.
            JobSeekerApplyReturnDTO JobSeekerApply = new JobSeekerApplyReturnDTO();
            #endregion
            try
            {
                JobSeekerApply jobSeekerApply = await UnitOfWork.JobSeekerApplyRepository.GetById(JobSeekerApplyId);

                if (jobSeekerApply != null)
                {
                    if (jobSeekerApply.IsDeleted != (byte)DeleteStatusEnum.Deleted)
                    {
                        JobSeekerApply = JobSeekerApplyMapping.MappingJobSeekerApplyToJobSeekerApplyReturnDTO(jobSeekerApply);
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(JobSeekerApply);
        }
 public JobSeekerApplyReturnDTO MappingJobSeekerApplyToJobSeekerApplyReturnDTO(JobSeekerApply JobSeekerApply)
 {
     #region Declare a return type with initial value.
     JobSeekerApplyReturnDTO JobSeekerApplyReturnDTO = null;
     #endregion
     try
     {
         if (JobSeekerApply != null)
         {
             JobSeekerApplyReturnDTO = new JobSeekerApplyReturnDTO
             {
                 JobSeekerId            = JobSeekerApply.JobSeekerId,
                 ApplyDate              = JobSeekerApply.ApplyDate,
                 JobSeekerApplyId       = JobSeekerApply.JobSeekerApplyId,
                 JobSeekerApplyStatusId = JobSeekerApply.JobSeekerApplyStatusId,
                 PostId = JobSeekerApply.PostId
             };
         }
     }
     catch (Exception exception)
     { }
     return(JobSeekerApplyReturnDTO);
 }