/// <summary>
 /// Updae JobSeekerProfessionalInformation AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> UpdateJobSeekerProfessionalInformation(JobSeekerProfessionalInformationUpdateDTO jobSeekerProfessionalInformationUpdateDTO)
 {
     #region Declare a return type with initial value.
     bool isUpdated = false;
     #endregion
     try
     {
         if (jobSeekerProfessionalInformationUpdateDTO != null)
         {
             isUpdated = await JobSeekerProfessionalInformationBusinessMapping.UpdateJobSeekerProfessionalInformation(jobSeekerProfessionalInformationUpdateDTO);
         }
     }
     catch (Exception exception) {}
     return(isUpdated);
 }
        /// <summary>
        /// Update User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> UpdateJobSeekerProfessionalInformation(JobSeekerProfessionalInformationUpdateDTO JobSeekerProfessionalInformationUpdateDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerProfessionalInformationUpdated = default(bool);
            #endregion
            try
            {
                if (JobSeekerProfessionalInformationUpdateDTO != null)
                {
                    #region Vars
                    JobSeekerProfessionalInformation JobSeekerProfessionalInformation = null;
                    #endregion
                    #region Get Activity By Id
                    JobSeekerProfessionalInformation = await UnitOfWork.JobSeekerProfessionalInformationRepository.GetById((int)JobSeekerProfessionalInformationUpdateDTO.JobSeekerProfessionalInformationId);

                    #endregion
                    if (JobSeekerProfessionalInformation != null)
                    {
                        #region  Mapping
                        JobSeekerProfessionalInformation = JobSeekerProfessionalInformationMapping.MappingJobSeekerProfessionalInformationupdateDTOToJobSeekerProfessionalInformation(JobSeekerProfessionalInformation, JobSeekerProfessionalInformationUpdateDTO);
                        #endregion
                        if (JobSeekerProfessionalInformation != null)
                        {
                            #region  Update Entity
                            UnitOfWork.JobSeekerProfessionalInformationRepository.Update(JobSeekerProfessionalInformation);
                            isJobSeekerProfessionalInformationUpdated = await UnitOfWork.Commit() > default(int);

                            #endregion
                        }
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerProfessionalInformationUpdated);
        }
        public async Task <ActionResult <CommonAPIResponse <bool> > > UpdateJobSeekerProfessionalInformation(JobSeekerProfessionalInformationUpdateDTO JobSeekerProfessionalInformationUpdateDTO)
        {
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <bool>();
            #endregion

            try
            {
                #region Validate userUpdateDTO for nullability before prepaing the response.
                if (await JobSeekerProfessionalInformationAppService.UpdateJobSeekerProfessionalInformation(JobSeekerProfessionalInformationUpdateDTO))
                {
                    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);
        }
Example #4
0
 /// <summary>
 /// Mapping User Activity Log DTO to Action
 /// </summary>
 /// <param name=></param>
 /// <param name=></param>
 /// <returns></returns>
 public JobSeekerProfessionalInformation MappingJobSeekerProfessionalInformationupdateDTOToJobSeekerProfessionalInformation(JobSeekerProfessionalInformation jobSeekerProfessionalInformation, JobSeekerProfessionalInformationUpdateDTO JobSeekerProfessionalInformationUpdateDTO)
 {
     #region Declare Return Var with Intial Value
     JobSeekerProfessionalInformation JobSeekerProfessionalInformation = jobSeekerProfessionalInformation;
     #endregion
     try
     {
         if (JobSeekerProfessionalInformationUpdateDTO.JobSeekerProfessionalInformationId > default(int))
         {
             JobSeekerProfessionalInformation.JobSeekerId =
                 JobSeekerProfessionalInformationUpdateDTO.JobSeekerId;
             JobSeekerProfessionalInformation.GradeId = JobSeekerProfessionalInformationUpdateDTO.GradeId;
             JobSeekerProfessionalInformation.CurrentEducationalLevelId =
                 JobSeekerProfessionalInformationUpdateDTO.CurrentEducationalLevelId;
             JobSeekerProfessionalInformation.GraduationYear =
                 JobSeekerProfessionalInformationUpdateDTO.GraduationYear;
             JobSeekerProfessionalInformation.UniversityOrIstitution =
                 JobSeekerProfessionalInformationUpdateDTO.UniversityOrIstitution;
             JobSeekerProfessionalInformation.YearsOfExperience =
                 JobSeekerProfessionalInformationUpdateDTO.YearsOfExperience;
         }
     }
     catch (Exception exception) { }
     return(JobSeekerProfessionalInformation);
 }