/// <summary> /// Add JobSeekerApply AppService /// </summary> /// <returns>bool<bool></returns> public async Task <bool> AddJobSeekerApply(JobSeekerApplyAddDTO jobSeekerApplyAddDTO) { #region Declare a return type with initial value. bool isCreated = false; #endregion try { if (jobSeekerApplyAddDTO != null) { isCreated = await JobSeekerApplyBusinessMapping.AddJobSeekerApply(jobSeekerApplyAddDTO); } } catch (Exception exception) {} return(isCreated); }
/// <summary> /// Mapping user Action Actitvity Log /// </summary> /// <param name=></ param > /// <returns>Task<JobSeekerApply></returns> public JobSeekerApply MappingJobSeekerApplyAddDTOToJobSeekerApply(JobSeekerApplyAddDTO JobSeekerApplyAddDTO) { #region Declare a return type with initial value. JobSeekerApply JobSeekerApply = null; #endregion try { JobSeekerApply = new JobSeekerApply { JobSeekerId = JobSeekerApplyAddDTO.JobSeekerId, ApplyDate = DateTime.Now, JobSeekerApplyStatusId = JobSeekerApplyAddDTO.JobSeekerApplyStatusId, PostId = JobSeekerApplyAddDTO.PostId, CreationDate = DateTime.Now, IsDeleted = (byte)DeleteStatusEnum.NotDeleted }; } catch (Exception exception) { } return(JobSeekerApply); }
/// <summary> /// Create User Action Activity Log /// </summary> /// <param name=></param> /// <returns>bool</returns> public async Task <bool> AddJobSeekerApply(JobSeekerApplyAddDTO JobSeekerApplyAddDTO) { #region Declare a return type with initial value. bool isJobSeekerApplyCreated = default(bool); #endregion try { #region Vars JobSeekerApply JobSeekerApply = null; #endregion JobSeekerApply = JobSeekerApplyMapping.MappingJobSeekerApplyAddDTOToJobSeekerApply(JobSeekerApplyAddDTO); if (JobSeekerApply != null) { await UnitOfWork.JobSeekerApplyRepository.Insert(JobSeekerApply); isJobSeekerApplyCreated = await UnitOfWork.Commit() > default(int); } } catch (Exception exception) { } return(isJobSeekerApplyCreated); }
public async Task <ActionResult <CommonAPIResponse <bool> > > AddJobSeekerApply(JobSeekerApplyAddDTO JobSeekerApplyAddDTO) { #region Declare return type with initial value. JsonResult jsonResult = GetDefaultJsonResult <bool>(); #endregion try { #region Validate AddJobSeekerApply for nullability before prepaing the response. if (await JobSeekerApplyAppService.AddJobSeekerApply(JobSeekerApplyAddDTO)) { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.Success, CurrentLanguagId), true, HttpStatusCode.OK); } else { jsonResult = JsonResultResponse(CommonHelper.GetResponseMessage(APIResponseMessage.InvalidCredentials, CurrentLanguagId), false, HttpStatusCode.BadRequest); } #endregion } catch (Exception exception) { } return(jsonResult); }