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

                #region Validate userIdentityDTO for nullability before prepaing the response.
                if (JobSeekerApplyStatusReturnDTO != null)
                {
                    jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), JobSeekerApplyStatusReturnDTO, HttpStatusCode.OK);
                }
                else
                {
                    jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), new object(), HttpStatusCode.BadRequest);
                }
                #endregion
            }
            catch (Exception exception)
            {
            }
            return(jsonResult);
        }
Beispiel #2
0
 /// <summary>
 /// Get  JobSeekerApplyStatus By Id
 /// </summary>
 /// <returns>JobSeekerApplyStatusReturnDTO<JobSeekerApplyStatusReturnDTO></returns>
 public async Task <JobSeekerApplyStatusReturnDTO> GetJobSeekerApplyStatusById(int JobSeekerApplyStatusId)
 {
     #region Declare a return type with initial value.
     JobSeekerApplyStatusReturnDTO JobSeekerApplyStatus = null;
     #endregion
     try
     {
         if (JobSeekerApplyStatusId > default(int))
         {
             JobSeekerApplyStatus = await JobSeekerApplyStatusBusinessMapping.GetJobSeekerApplyStatusById(JobSeekerApplyStatusId);
         }
     }
     catch (Exception exception)  {}
     return(JobSeekerApplyStatus);
 }
 public JobSeekerApplyStatusReturnDTO MappingJobSeekerApplyStatusToJobSeekerApplyStatusReturnDTO(JobSeekerApplyStatus JobSeekerApplyStatus)
 {
     #region Declare a return type with initial value.
     JobSeekerApplyStatusReturnDTO JobSeekerApplyStatusReturnDTO = null;
     #endregion
     try
     {
         if (JobSeekerApplyStatus != null)
         {
             JobSeekerApplyStatusReturnDTO = new JobSeekerApplyStatusReturnDTO
             {
                 JobSeekerApplyStatusId   = JobSeekerApplyStatus.JobSeekerApplyStatusId,
                 JobSeekerApplyStatusName = JobSeekerApplyStatus.JobSeekerApplyStatusName
             };
         }
     }
     catch (Exception exception)
     { }
     return(JobSeekerApplyStatusReturnDTO);
 }
        /// <summary>
        /// Get user Action Activity Log By Id
        /// </summary>
        /// <returns>List<JobSeekerApplyStatusReturnDTO></returns>
        public async Task <JobSeekerApplyStatusReturnDTO> GetJobSeekerApplyStatusById(int JobSeekerApplyStatusId)
        {
            #region Declare a return type with initial value.
            JobSeekerApplyStatusReturnDTO JobSeekerApplyStatus = new JobSeekerApplyStatusReturnDTO();
            #endregion
            try
            {
                JobSeekerApplyStatus jobSeekerApplyStatus = await UnitOfWork.JobSeekerApplyStatusRepository.GetById(JobSeekerApplyStatusId);

                if (jobSeekerApplyStatus != null)
                {
                    if (jobSeekerApplyStatus.IsDeleted != (byte)DeleteStatusEnum.Deleted)
                    {
                        JobSeekerApplyStatus = JobSeekerApplyStatusMapping.MappingJobSeekerApplyStatusToJobSeekerApplyStatusReturnDTO(jobSeekerApplyStatus);
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(JobSeekerApplyStatus);
        }