示例#1
0
 /// <summary>
 /// Mapping user Action Actitvity Log
 /// </summary>
 /// <param name=></ param >
 /// <returns>Task<JobSeeker></returns>
 public JobSeeker MappingJobSeekerAddDTOToJobSeeker(JobSeekerAddDTO JobSeekerAddDTO)
 {
     #region Declare a return type with initial value.
     JobSeeker JobSeeker = null;
     #endregion
     try
     {
         JobSeeker = new JobSeeker
         {
             FirstName                 = JobSeekerAddDTO.FirstName,
             CityId                    = JobSeekerAddDTO.CityId,
             Email                     = JobSeekerAddDTO.Email,
             GradeId                   = JobSeekerAddDTO.GradeId,
             Birthdate                 = JobSeekerAddDTO.Birthdate,
             CurrentCareerLevelId      = JobSeekerAddDTO.CurrentCareerLevelId,
             CurrentEducationalLevelId = JobSeekerAddDTO.CurrentEducationalLevelId,
             CurrentJobSearchStatusId  = JobSeekerAddDTO.CurrentJobSearchStatusId,
             Gender                    = JobSeekerAddDTO.Gender,
             GraduationYear            = JobSeekerAddDTO.GraduationYear,
             HideMySalary              = JobSeekerAddDTO.HideMySalary,
             Lastname                  = JobSeekerAddDTO.Lastname,
             MinimumSalary             = JobSeekerAddDTO.MinimumSalary,
             PhoneNumber               = JobSeekerAddDTO.PhoneNumber,
             PhoneNumber2              = JobSeekerAddDTO.PhoneNumber2,
             PublicProfile             = JobSeekerAddDTO.PublicProfile,
             University                = JobSeekerAddDTO.University,
             CreationDate              = DateTime.Now,
             IsDeleted                 = (byte)DeleteStatusEnum.NotDeleted
         };
     }
     catch (Exception exception) { }
     return(JobSeeker);
 }
        public async Task <ActionResult <CommonAPIResponse <bool> > > AddJobSeeker(JobSeekerAddDTO JobSeekerAddDTO)
        {
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <bool>();
            #endregion

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

                if (await JobSeekerAppService.AddJobSeeker(JobSeekerAddDTO))
                {
                    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>
 /// Add JobSeeker AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> AddJobSeeker(JobSeekerAddDTO jobSeekerAddDTO)
 {
     #region Declare a return type with initial value.
     bool isCreated = false;
     #endregion
     try
     {
         if (jobSeekerAddDTO != null)
         {
             isCreated = await JobSeekerBusinessMapping.AddJobSeeker(jobSeekerAddDTO);
         }
     }
     catch (Exception exception) {}
     return(isCreated);
 }
示例#4
0
        /// <summary>
        /// Create User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> AddJobSeeker(JobSeekerAddDTO JobSeekerAddDTO)
        {
            #region Declare a return type with initial value.
            bool isJobSeekerCreated = default(bool);
            #endregion
            try
            {
                #region Vars
                JobSeeker JobSeeker = null;
                #endregion
                JobSeeker = JobSeekerMapping.MappingJobSeekerAddDTOToJobSeeker(JobSeekerAddDTO);
                if (JobSeeker != null)
                {
                    await UnitOfWork.JobSeekerRepository.Insert(JobSeeker);

                    isJobSeekerCreated = await UnitOfWork.Commit() > default(int);
                }
            }
            catch (Exception exception)
            {
            }
            return(isJobSeekerCreated);
        }