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

                #region Validate userIdentityDTO for nullability before prepaing the response.
                if (JobSeekerProfessionalInformationReturnDTO != null)
                {
                    jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), JobSeekerProfessionalInformationReturnDTO, HttpStatusCode.OK);
                }
                else
                {
                    jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), new object(), HttpStatusCode.BadRequest);
                }
                #endregion
            }
            catch (Exception exception)
            {
            }
            return(jsonResult);
        }
示例#2
0
 public JobSeekerProfessionalInformationReturnDTO MappingJobSeekerProfessionalInformationToJobSeekerProfessionalInformationReturnDTO(JobSeekerProfessionalInformation JobSeekerProfessionalInformation)
 {
     #region Declare a return type with initial value.
     JobSeekerProfessionalInformationReturnDTO JobSeekerProfessionalInformationReturnDTO = null;
     #endregion
     try
     {
         if (JobSeekerProfessionalInformation != null)
         {
             JobSeekerProfessionalInformationReturnDTO = new JobSeekerProfessionalInformationReturnDTO
             {
                 JobSeekerId = JobSeekerProfessionalInformation.JobSeekerId,
                 GradeId     = JobSeekerProfessionalInformation.GradeId,
                 CurrentEducationalLevelId          = JobSeekerProfessionalInformation.CurrentEducationalLevelId,
                 GraduationYear                     = JobSeekerProfessionalInformation.GraduationYear,
                 JobSeekerProfessionalInformationId = JobSeekerProfessionalInformation.JobSeekerProfessionalInformationId,
                 UniversityOrIstitution             = JobSeekerProfessionalInformation.UniversityOrIstitution,
                 YearsOfExperience                  = JobSeekerProfessionalInformation.YearsOfExperience
             };
         }
     }
     catch (Exception exception)
     { }
     return(JobSeekerProfessionalInformationReturnDTO);
 }
 /// <summary>
 /// Get  JobSeekerProfessionalInformation By Id
 /// </summary>
 /// <returns>JobSeekerProfessionalInformationReturnDTO<JobSeekerProfessionalInformationReturnDTO></returns>
 public async Task <JobSeekerProfessionalInformationReturnDTO> GetJobSeekerProfessionalInformationById(int JobSeekerProfessionalInformationId)
 {
     #region Declare a return type with initial value.
     JobSeekerProfessionalInformationReturnDTO JobSeekerProfessionalInformation = null;
     #endregion
     try
     {
         if (JobSeekerProfessionalInformationId > default(int))
         {
             JobSeekerProfessionalInformation = await JobSeekerProfessionalInformationBusinessMapping.GetJobSeekerProfessionalInformationById(JobSeekerProfessionalInformationId);
         }
     }
     catch (Exception exception)  {}
     return(JobSeekerProfessionalInformation);
 }
        /// <summary>
        /// Get user Action Activity Log By Id
        /// </summary>
        /// <returns>List<JobSeekerProfessionalInformationReturnDTO></returns>
        public async Task <JobSeekerProfessionalInformationReturnDTO> GetJobSeekerProfessionalInformationById(int JobSeekerProfessionalInformationId)
        {
            #region Declare a return type with initial value.
            JobSeekerProfessionalInformationReturnDTO JobSeekerProfessionalInformation = new JobSeekerProfessionalInformationReturnDTO();
            #endregion
            try
            {
                JobSeekerProfessionalInformation jobSeekerProfessionalInformation = await UnitOfWork.JobSeekerProfessionalInformationRepository.GetById(JobSeekerProfessionalInformationId);

                if (jobSeekerProfessionalInformation != null)
                {
                    if (jobSeekerProfessionalInformation.IsDeleted != (byte)DeleteStatusEnum.Deleted)
                    {
                        JobSeekerProfessionalInformation = JobSeekerProfessionalInformationMapping.MappingJobSeekerProfessionalInformationToJobSeekerProfessionalInformationReturnDTO(jobSeekerProfessionalInformation);
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(JobSeekerProfessionalInformation);
        }