示例#1
0
 /// <summary>
 /// Updae JobSeekerApply AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> UpdateJobSeekerApply(JobSeekerApplyUpdateDTO jobSeekerApplyUpdateDTO)
 {
     #region Declare a return type with initial value.
     bool isUpdated = false;
     #endregion
     try
     {
         if (jobSeekerApplyUpdateDTO != null)
         {
             isUpdated = await JobSeekerApplyBusinessMapping.UpdateJobSeekerApply(jobSeekerApplyUpdateDTO);
         }
     }
     catch (Exception exception) {}
     return(isUpdated);
 }
        /// <summary>
        /// Update User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> UpdateJobSeekerApply(JobSeekerApplyUpdateDTO JobSeekerApplyUpdateDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerApplyUpdated = default(bool);
            #endregion
            try
            {
                if (JobSeekerApplyUpdateDTO != null)
                {
                    #region Vars
                    JobSeekerApply JobSeekerApply = null;
                    #endregion
                    #region Get Activity By Id
                    JobSeekerApply = await UnitOfWork.JobSeekerApplyRepository.GetById(JobSeekerApplyUpdateDTO.JobSeekerApplyId);

                    #endregion
                    if (JobSeekerApply != null)
                    {
                        #region  Mapping
                        JobSeekerApply = JobSeekerApplyMapping.MappingJobSeekerApplyupdateDTOToJobSeekerApply(JobSeekerApply, JobSeekerApplyUpdateDTO);
                        #endregion
                        if (JobSeekerApply != null)
                        {
                            #region  Update Entity
                            UnitOfWork.JobSeekerApplyRepository.Update(JobSeekerApply);
                            isJobSeekerApplyUpdated = await UnitOfWork.Commit() > default(int);

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

            try
            {
                #region Validate userUpdateDTO for nullability before prepaing the response.
                if (await JobSeekerApplyAppService.UpdateJobSeekerApply(JobSeekerApplyUpdateDTO))
                {
                    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);
        }
 /// <summary>
 /// Mapping User Activity Log DTO to Action
 /// </summary>
 /// <param name=></param>
 /// <param name=></param>
 /// <returns></returns>
 public JobSeekerApply MappingJobSeekerApplyupdateDTOToJobSeekerApply(JobSeekerApply jobSeekerApply, JobSeekerApplyUpdateDTO JobSeekerApplyUpdateDTO)
 {
     #region Declare Return Var with Intial Value
     JobSeekerApply JobSeekerApply = jobSeekerApply;
     #endregion
     try
     {
         if (JobSeekerApplyUpdateDTO.JobSeekerApplyId > default(int))
         {
             JobSeekerApply.JobSeekerId            = JobSeekerApplyUpdateDTO.JobSeekerId;
             JobSeekerApply.ApplyDate              = JobSeekerApplyUpdateDTO.ApplyDate;
             JobSeekerApply.JobSeekerApplyId       = JobSeekerApplyUpdateDTO.JobSeekerApplyId;
             JobSeekerApply.JobSeekerApplyStatusId = JobSeekerApplyUpdateDTO.JobSeekerApplyStatusId;
             JobSeekerApply.PostId = JobSeekerApplyUpdateDTO.PostId;
         }
     }
     catch (Exception exception) { }
     return(JobSeekerApply);
 }