Exemplo n.º 1
0
        public async Task <IActionResult> Post(EmployeeForAddDTO model)
        {
            var vesting  = _vestingRulesService.GetVestingRules();
            var maxvalue = _appSettingService.GetPensionMaxPercent();

            Employee employee = mapper.Map <Employee>(model);

            employeeService.CreateEmployee(employee);
            EmployeeForViewDTO empResult = mapper.Map <EmployeeForViewDTO>(employee);

            await unitOfWork.Commit();

            empResult.Id = employee.Id;
            return(Ok(empResult));
        }
        public PensionRequestService(IPensionRequestRepository pensionRequestRepository,
                                     IMetlifeDataRepository metlifeDataRepository,
                                     IVestingRulesService vestingRulesService, IPensionEnrollmentRulesService pensionEnrollmentRulesService,
                                     IAppSettingService appSettingService, IEmployeeRepository employeeRepository, IRoundDatesService roundDatesService)

        {
            this.pensionRequestRepository = pensionRequestRepository;
            this.metlifeDataRepository    = metlifeDataRepository;
            this.employeeRepository       = employeeRepository;

            this.vestingRulesService           = vestingRulesService;
            this.pensionEnrollmentRulesService = pensionEnrollmentRulesService;
            this.appSettingService             = appSettingService;
            _roundDatesService = roundDatesService;

            vestingRulesList    = vestingRulesService.GetVestingRules();
            enrollmentRulesList = pensionEnrollmentRulesService.GetEnrollmentRules();
            appSettingService.GetPensionMaxPercent();
        }