/// <summary> /// Updae JobSeekerTypeOfJob AppService /// </summary> /// <returns>bool<bool></returns> public async Task <bool> UpdateJobSeekerTypeOfJob(JobSeekerTypeOfJobUpdateDTO jobSeekerTypeOfJobUpdateDTO) { #region Declare a return type with initial value. bool isUpdated = false; #endregion try { if (jobSeekerTypeOfJobUpdateDTO != null) { isUpdated = await JobSeekerTypeOfJobBusinessMapping.UpdateJobSeekerTypeOfJob(jobSeekerTypeOfJobUpdateDTO); } } catch (Exception exception) {} return(isUpdated); }
/// <summary> /// Update User Action Activity Log /// </summary> /// <param name=></param> /// <returns>bool</returns> public async Task <bool> UpdateJobSeekerTypeOfJob(JobSeekerTypeOfJobUpdateDTO JobSeekerTypeOfJobUpdateDTO) { #region Declare a return type with initial value. bool isJobSeekerTypeOfJobUpdated = default(bool); #endregion try { if (JobSeekerTypeOfJobUpdateDTO != null) { #region Vars JobSeekerTypeOfJob JobSeekerTypeOfJob = null; #endregion #region Get Activity By Id JobSeekerTypeOfJob = await UnitOfWork.JobSeekerTypeOfJobRepository.GetById(JobSeekerTypeOfJobUpdateDTO.JobSeekerTypeOfJobId); #endregion if (JobSeekerTypeOfJob != null) { #region Mapping JobSeekerTypeOfJob = JobSeekerTypeOfJobMapping.MappingJobSeekerTypeOfJobupdateDTOToJobSeekerTypeOfJob(JobSeekerTypeOfJob, JobSeekerTypeOfJobUpdateDTO); #endregion if (JobSeekerTypeOfJob != null) { #region Update Entity UnitOfWork.JobSeekerTypeOfJobRepository.Update(JobSeekerTypeOfJob); isJobSeekerTypeOfJobUpdated = await UnitOfWork.Commit() > default(int); #endregion } } } } catch (Exception exception) { } return(isJobSeekerTypeOfJobUpdated); }
/// <summary> /// Mapping User Activity Log DTO to Action /// </summary> /// <param name=></param> /// <param name=></param> /// <returns></returns> public JobSeekerTypeOfJob MappingJobSeekerTypeOfJobupdateDTOToJobSeekerTypeOfJob(JobSeekerTypeOfJob jobSeekerTypeOfJob, JobSeekerTypeOfJobUpdateDTO JobSeekerTypeOfJobUpdateDTO) { #region Declare Return Var with Intial Value JobSeekerTypeOfJob JobSeekerTypeOfJob = jobSeekerTypeOfJob; #endregion try { if (JobSeekerTypeOfJobUpdateDTO.JobSeekerTypeOfJobId > default(int)) { JobSeekerTypeOfJob.JobSeekerId = JobSeekerTypeOfJobUpdateDTO.JobSeekerId; JobSeekerTypeOfJob.TypeOfJobId = JobSeekerTypeOfJobUpdateDTO.TypeOfJobId; JobSeekerTypeOfJob.JobSeekerTypeOfJobId = JobSeekerTypeOfJobUpdateDTO.JobSeekerTypeOfJobId; } } catch (Exception exception) { } return(JobSeekerTypeOfJob); }
public async Task <ActionResult <CommonAPIResponse <bool> > > UpdateJobSeekerTypeOfJob(JobSeekerTypeOfJobUpdateDTO JobSeekerTypeOfJobUpdateDTO) { #region Declare return type with initial value. JsonResult jsonResult = GetDefaultJsonResult <bool>(); #endregion try { #region Validate userUpdateDTO for nullability before prepaing the response. if (await JobSeekerTypeOfJobAppService.UpdateJobSeekerTypeOfJob(JobSeekerTypeOfJobUpdateDTO)) { 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); }