Ejemplo n.º 1
0
 /// <summary>
 /// Updae JobSeekerApplyStatus AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> UpdateJobSeekerApplyStatus(JobSeekerApplyStatusUpdateDTO jobSeekerApplyStatusUpdateDTO)
 {
     #region Declare a return type with initial value.
     bool isUpdated = false;
     #endregion
     try
     {
         if (jobSeekerApplyStatusUpdateDTO != null)
         {
             isUpdated = await JobSeekerApplyStatusBusinessMapping.UpdateJobSeekerApplyStatus(jobSeekerApplyStatusUpdateDTO);
         }
     }
     catch (Exception exception) {}
     return(isUpdated);
 }
        /// <summary>
        /// Update User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> UpdateJobSeekerApplyStatus(JobSeekerApplyStatusUpdateDTO JobSeekerApplyStatusUpdateDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerApplyStatusUpdated = default(bool);
            #endregion
            try
            {
                if (JobSeekerApplyStatusUpdateDTO != null)
                {
                    #region Vars
                    JobSeekerApplyStatus JobSeekerApplyStatus = null;
                    #endregion
                    #region Get Activity By Id
                    JobSeekerApplyStatus = await UnitOfWork.JobSeekerApplyStatusRepository.GetById(JobSeekerApplyStatusUpdateDTO.JobSeekerApplyStatusId);

                    #endregion
                    if (JobSeekerApplyStatus != null)
                    {
                        #region  Mapping
                        JobSeekerApplyStatus = JobSeekerApplyStatusMapping.MappingJobSeekerApplyStatusupdateDTOToJobSeekerApplyStatus(JobSeekerApplyStatus, JobSeekerApplyStatusUpdateDTO);
                        #endregion
                        if (JobSeekerApplyStatus != null)
                        {
                            #region  Update Entity
                            UnitOfWork.JobSeekerApplyStatusRepository.Update(JobSeekerApplyStatus);
                            isJobSeekerApplyStatusUpdated = await UnitOfWork.Commit() > default(int);

                            #endregion
                        }
                    }
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerApplyStatusUpdated);
        }
 /// <summary>
 /// Mapping User Activity Log DTO to Action
 /// </summary>
 /// <param name=></param>
 /// <param name=></param>
 /// <returns></returns>
 public JobSeekerApplyStatus MappingJobSeekerApplyStatusupdateDTOToJobSeekerApplyStatus(JobSeekerApplyStatus jobSeekerApplyStatus, JobSeekerApplyStatusUpdateDTO JobSeekerApplyStatusUpdateDTO)
 {
     #region Declare Return Var with Intial Value
     JobSeekerApplyStatus JobSeekerApplyStatus = jobSeekerApplyStatus;
     #endregion
     try
     {
         if (JobSeekerApplyStatusUpdateDTO.JobSeekerApplyStatusId > default(int))
         {
             JobSeekerApplyStatus.JobSeekerApplyStatusId   = JobSeekerApplyStatusUpdateDTO.JobSeekerApplyStatusId;
             JobSeekerApplyStatus.JobSeekerApplyStatusName = JobSeekerApplyStatusUpdateDTO.JobSeekerApplyStatusName;
         }
     }
     catch (Exception exception) { }
     return(JobSeekerApplyStatus);
 }
Ejemplo n.º 4
0
        public async Task <ActionResult <CommonAPIResponse <bool> > > UpdateJobSeekerApplyStatus(JobSeekerApplyStatusUpdateDTO JobSeekerApplyStatusUpdateDTO)
        {
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <bool>();
            #endregion

            try
            {
                #region Validate userUpdateDTO for nullability before prepaing the response.
                if (await JobSeekerApplyStatusAppService.UpdateJobSeekerApplyStatus(JobSeekerApplyStatusUpdateDTO))
                {
                    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);
        }