/// <summary> /// Delete User Action Activity Log /// </summary> /// <param name=></param> /// <returns>bool</returns> public async Task <bool> DeleteJobSeekerSkills(int JobSeekerSkillsId) { #region Declare a return type with initial value. bool isJobSeekerSkillsDeleted = default(bool); #endregion try { if (JobSeekerSkillsId > default(int)) { #region Vars JobSeekerSkills JobSeekerSkills = null; #endregion #region Get JobSeekerSkills by id JobSeekerSkills = await UnitOfWork.JobSeekerSkillsRepository.GetById(JobSeekerSkillsId); #endregion #region check if object is not null if (JobSeekerSkills != null) { JobSeekerSkills.IsDeleted = (byte)DeleteStatusEnum.Deleted; #region Apply the changes to the database UnitOfWork.JobSeekerSkillsRepository.Update(JobSeekerSkills); isJobSeekerSkillsDeleted = await UnitOfWork.Commit() > default(int); #endregion } #endregion } } catch (Exception exception) { } return(isJobSeekerSkillsDeleted); }
/// <summary> /// Mapping User Activity Log DTO to Action /// </summary> /// <param name=></param> /// <param name=></param> /// <returns></returns> public JobSeekerSkills MappingJobSeekerSkillsupdateDTOToJobSeekerSkills(JobSeekerSkills jobSeekerSkills, JobSeekerSkillsUpdateDTO JobSeekerSkillsUpdateDTO) { #region Declare Return Var with Intial Value JobSeekerSkills JobSeekerSkills = jobSeekerSkills; #endregion try { if (JobSeekerSkillsUpdateDTO.JobSeekerSkillsId > default(int)) { JobSeekerSkills.JobSeekerId = JobSeekerSkillsUpdateDTO.JobSeekerId; JobSeekerSkills.JobSeekerSkillsId = JobSeekerSkillsUpdateDTO.JobSeekerSkillsId; JobSeekerSkills.Skilles = JobSeekerSkillsUpdateDTO.Skilles; } } catch (Exception exception) { } return(JobSeekerSkills); }
/// <summary> /// Mapping user Action Actitvity Log /// </summary> /// <param name=></ param > /// <returns>Task<JobSeekerSkills></returns> public JobSeekerSkills MappingJobSeekerSkillsAddDTOToJobSeekerSkills(JobSeekerSkillsAddDTO JobSeekerSkillsAddDTO) { #region Declare a return type with initial value. JobSeekerSkills JobSeekerSkills = null; #endregion try { JobSeekerSkills = new JobSeekerSkills { JobSeekerId = JobSeekerSkillsAddDTO.JobSeekerId, Skilles = JobSeekerSkillsAddDTO.Skilles, CreationDate = DateTime.Now, IsDeleted = (byte)DeleteStatusEnum.NotDeleted }; } catch (Exception exception) { } return(JobSeekerSkills); }
/// <summary> /// Get user Action Activity Log By Id /// </summary> /// <returns>List<JobSeekerSkillsReturnDTO></returns> public async Task <JobSeekerSkillsReturnDTO> GetJobSeekerSkillsById(int JobSeekerSkillsId) { #region Declare a return type with initial value. JobSeekerSkillsReturnDTO JobSeekerSkills = new JobSeekerSkillsReturnDTO(); #endregion try { JobSeekerSkills jobSeekerSkills = await UnitOfWork.JobSeekerSkillsRepository.GetById(JobSeekerSkillsId); if (jobSeekerSkills != null) { if (jobSeekerSkills.IsDeleted != (byte)DeleteStatusEnum.Deleted) { JobSeekerSkills = JobSeekerSkillsMapping.MappingJobSeekerSkillsToJobSeekerSkillsReturnDTO(jobSeekerSkills); } } } catch (Exception exception) { } return(JobSeekerSkills); }
/// <summary> /// Create User Action Activity Log /// </summary> /// <param name=></param> /// <returns>bool</returns> public async Task <bool> AddJobSeekerSkills(JobSeekerSkillsAddDTO JobSeekerSkillsAddDTO) { #region Declare a return type with initial value. bool isJobSeekerSkillsCreated = default(bool); #endregion try { #region Vars JobSeekerSkills JobSeekerSkills = null; #endregion JobSeekerSkills = JobSeekerSkillsMapping.MappingJobSeekerSkillsAddDTOToJobSeekerSkills(JobSeekerSkillsAddDTO); if (JobSeekerSkills != null) { await UnitOfWork.JobSeekerSkillsRepository.Insert(JobSeekerSkills); isJobSeekerSkillsCreated = await UnitOfWork.Commit() > default(int); } } catch (Exception exception) { } return(isJobSeekerSkillsCreated); }
/// <summary> /// Update User Action Activity Log /// </summary> /// <param name=></param> /// <returns>bool</returns> public async Task <bool> UpdateJobSeekerSkills(JobSeekerSkillsUpdateDTO JobSeekerSkillsUpdateDTO) { #region Declare a return type with initial value. bool isJobSeekerSkillsUpdated = default(bool); #endregion try { if (JobSeekerSkillsUpdateDTO != null) { #region Vars JobSeekerSkills JobSeekerSkills = null; #endregion #region Get Activity By Id JobSeekerSkills = await UnitOfWork.JobSeekerSkillsRepository.GetById(JobSeekerSkillsUpdateDTO.JobSeekerSkillsId); #endregion if (JobSeekerSkills != null) { #region Mapping JobSeekerSkills = JobSeekerSkillsMapping.MappingJobSeekerSkillsupdateDTOToJobSeekerSkills(JobSeekerSkills, JobSeekerSkillsUpdateDTO); #endregion if (JobSeekerSkills != null) { #region Update Entity UnitOfWork.JobSeekerSkillsRepository.Update(JobSeekerSkills); isJobSeekerSkillsUpdated = await UnitOfWork.Commit() > default(int); #endregion } } } } catch (Exception exception) { } return(isJobSeekerSkillsUpdated); }
public JobSeekerSkillsReturnDTO MappingJobSeekerSkillsToJobSeekerSkillsReturnDTO(JobSeekerSkills JobSeekerSkills) { #region Declare a return type with initial value. JobSeekerSkillsReturnDTO JobSeekerSkillsReturnDTO = null; #endregion try { if (JobSeekerSkills != null) { JobSeekerSkillsReturnDTO = new JobSeekerSkillsReturnDTO { JobSeekerId = JobSeekerSkills.JobSeekerId, JobSeekerSkillsId = JobSeekerSkills.JobSeekerSkillsId, Skilles = JobSeekerSkills.Skilles }; } } catch (Exception exception) { } return(JobSeekerSkillsReturnDTO); }