/// <summary>
 /// Add EmployerJobRole AppService
 /// </summary>
 /// <returns>bool<bool></returns>
 public async Task <bool> AddEmployerJobRole(EmployerJobRoleAddDTO employerJobRoleAddDTO)
 {
     #region Declare a return type with initial value.
     bool isCreated = false;
     #endregion
     try
     {
         if (employerJobRoleAddDTO != null)
         {
             isCreated = await EmployerJobRoleBusinessMapping.AddEmployerJobRole(employerJobRoleAddDTO);
         }
     }
     catch (Exception exception) {}
     return(isCreated);
 }
Exemple #2
0
 /// <summary>
 /// Mapping user Action Actitvity Log
 /// </summary>
 /// <param name=></ param >
 /// <returns>Task<EmployerJobRole></returns>
 public EmployerJobRole MappingEmployerJobRoleAddDTOToEmployerJobRole(EmployerJobRoleAddDTO EmployerJobRoleAddDTO)
 {
     #region Declare a return type with initial value.
     EmployerJobRole EmployerJobRole = null;
     #endregion
     try
     {
         EmployerJobRole = new EmployerJobRole
         {
             EmployerId   = EmployerJobRoleAddDTO.EmployerId,
             JobRoleId    = EmployerJobRoleAddDTO.JobRoleId,
             CreationDate = DateTime.Now,
             IsDeleted    = (byte)DeleteStatusEnum.NotDeleted
         };
     }
     catch (Exception exception) { }
     return(EmployerJobRole);
 }
Exemple #3
0
        /// <summary>
        /// Create User Action Activity Log
        /// </summary>
        /// <param name=></param>
        /// <returns>bool</returns>
        public async Task <bool> AddEmployerJobRole(EmployerJobRoleAddDTO EmployerJobRoleAddDTO)
        {
            #region Declare a return type with initial value.
            bool isEmployerJobRoleCreated = default(bool);
            #endregion
            try
            {
                #region Vars
                EmployerJobRole EmployerJobRole = null;
                #endregion
                EmployerJobRole = EmployerJobRoleMapping.MappingEmployerJobRoleAddDTOToEmployerJobRole(EmployerJobRoleAddDTO);
                if (EmployerJobRole != null)
                {
                    await UnitOfWork.EmployerJobRoleRepository.Insert(EmployerJobRole);

                    isEmployerJobRoleCreated = await UnitOfWork.Commit() > default(int);
                }
            }
            catch (Exception exception)
            {
            }
            return(isEmployerJobRoleCreated);
        }
Exemple #4
0
        public async Task <ActionResult <CommonAPIResponse <bool> > > AddEmployerJobRole(EmployerJobRoleAddDTO EmployerJobRoleAddDTO)
        {
            #region Declare return type with initial value.
            JsonResult jsonResult = GetDefaultJsonResult <bool>();
            #endregion

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

                if (await EmployerJobRoleAppService.AddEmployerJobRole(EmployerJobRoleAddDTO))
                {
                    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);
        }