/// <summary>
 /// Add JobSeekerProfessionalInformation AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> AddJobSeekerProfessionalInformation(JobSeekerProfessionalInformationAddDTO jobSeekerProfessionalInformationAddDTO)
 {
     #region Declare a return type with initial value.
     bool isCreated = false;
     #endregion
     try
     {
         if (jobSeekerProfessionalInformationAddDTO != null)
         {
             isCreated = await JobSeekerProfessionalInformationBusinessMapping.AddJobSeekerProfessionalInformation(jobSeekerProfessionalInformationAddDTO);
         }
     }
     catch (Exception exception) {}
     return(isCreated);
 }
        /// <summary>
        /// Create User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> AddJobSeekerProfessionalInformation(JobSeekerProfessionalInformationAddDTO JobSeekerProfessionalInformationAddDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerProfessionalInformationCreated = default(bool);
            #endregion
            try
            {
                #region Vars
                JobSeekerProfessionalInformation JobSeekerProfessionalInformation = null;
                #endregion
                JobSeekerProfessionalInformation = JobSeekerProfessionalInformationMapping.MappingJobSeekerProfessionalInformationAddDTOToJobSeekerProfessionalInformation(JobSeekerProfessionalInformationAddDTO);
                if (JobSeekerProfessionalInformation != null)
                {
                    await UnitOfWork.JobSeekerProfessionalInformationRepository.Insert(JobSeekerProfessionalInformation);

                    isJobSeekerProfessionalInformationCreated = await UnitOfWork.Commit() > default(int);
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerProfessionalInformationCreated);
        }
        public async Task <ActionResult <CommonAPIResponse <bool> > > AddJobSeekerProfessionalInformation(JobSeekerProfessionalInformationAddDTO JobSeekerProfessionalInformationAddDTO)
        {
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <bool>();
            #endregion

            try
            {
                #region Validate AddJobSeekerProfessionalInformation for nullability before prepaing the response.

                if (await JobSeekerProfessionalInformationAppService.AddJobSeekerProfessionalInformation(JobSeekerProfessionalInformationAddDTO))
                {
                    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);
        }
コード例 #4
0
 /// <summary>
 /// Mapping user Action Actitvity Log
 /// </summary>
 /// <param name=></ param >
 /// <returns>Task<JobSeekerProfessionalInformation></returns>
 public JobSeekerProfessionalInformation MappingJobSeekerProfessionalInformationAddDTOToJobSeekerProfessionalInformation(JobSeekerProfessionalInformationAddDTO JobSeekerProfessionalInformationAddDTO)
 {
     #region Declare a return type with initial value.
     JobSeekerProfessionalInformation JobSeekerProfessionalInformation = null;
     #endregion
     try
     {
         JobSeekerProfessionalInformation = new JobSeekerProfessionalInformation
         {
             JobSeekerId = JobSeekerProfessionalInformationAddDTO.JobSeekerId,
             GradeId     = JobSeekerProfessionalInformationAddDTO.GradeId,
             CurrentEducationalLevelId = JobSeekerProfessionalInformationAddDTO.CurrentEducationalLevelId,
             GraduationYear            = JobSeekerProfessionalInformationAddDTO.GraduationYear,
             UniversityOrIstitution    = JobSeekerProfessionalInformationAddDTO.UniversityOrIstitution,
             YearsOfExperience         = JobSeekerProfessionalInformationAddDTO.YearsOfExperience,
             CreationDate = DateTime.Now,
             IsDeleted    = (byte)DeleteStatusEnum.NotDeleted
         };
     }
     catch (Exception exception) { }
     return(JobSeekerProfessionalInformation);
 }