public PartialViewResult AddSelectedEmployees(long riskAssessmentId, Guid[] employeeIds)
        {
            var request = new AddEmployeesToChecklistGeneratorRequest()
                              {
                                  CompanyId = CurrentUser.CompanyId,
                                  CurrentUserId = CurrentUser.UserId,
                                  EmployeeIds = employeeIds.ToList(),
                                  PersonalRiskAssessmentId = riskAssessmentId
                              };
           
            _personalRiskAssessmentService.AddEmployeesToChecklistGenerator(request);

            var model = _selectedEmployeeViewModelFactory.WithCompanyId(CurrentUser.CompanyId).WithRiskAssessmentId(riskAssessmentId).WithUserId(CurrentUser.UserId)
                .GetViewModel();

            return PartialView("_EmployeeSelected", model);

        }
        public void AddEmployeesToChecklistGenerator(AddEmployeesToChecklistGeneratorRequest request)
        {
            var personalRiskAssessment = _personalRiskAssessmentRepository
                .GetByIdAndCompanyId(request.PersonalRiskAssessmentId, request.CompanyId, request.CurrentUserId);

            if (!personalRiskAssessment.CanUserAccess(request.CurrentUserId))
            {
                throw new Exception("Invalid attempt to access Personal Risk Assessment with Id " + request.PersonalRiskAssessmentId);
            }

            var employees = _employeeRepository.GetByIds(request.EmployeeIds);
            var currentUser = _userForAuditingRepository.GetById(request.CurrentUserId);
            personalRiskAssessment.AddEmployeesToChecklistGenerator(employees.ToList(), currentUser);
            _personalRiskAssessmentRepository.Update(personalRiskAssessment);
        }