예제 #1
0
        public EditTemplateViewModel(RouterService router,
                                     IQuestionRepository questionRepository,
                                     IQuestionTypeRepository questionTypeRepository,
                                     IAnswerSetValueRepository answerSetValueRepository,
                                     IChecklistRepository checklistRepository,
                                     IChecklistQuestionRepository checklistQuestionRepository)
        {
            _questionRepository          = questionRepository;
            _answerSetValueRepository    = answerSetValueRepository;
            _checklistRepository         = checklistRepository;
            _checklistQuestionRepository = checklistQuestionRepository;
            _router = router;

            AddExistingQuestionCommand = new RelayCommand(AddExistingQuestion, () => SelectedExistingQuestion != null);
            AddNewQuestionCommand      = new RelayCommand(AddNewQuestion, () => SelectedQuestionType != null);
            SaveTemplateCommand        = new RelayCommand(SaveTemplate);
            CancelCommand = new RelayCommand(_router.GoBack);
            RemoveSelectedQuestionCommand = new RelayCommand(RemoveSelectedQuestion);

            ExistingQuestions = new ObservableCollection <Database.Question>();
            QuestionTypes     = new ObservableCollection <QuestionType>(questionTypeRepository.All());
            TemplateQuestions = new ObservableCollection <ChecklistQuestion>();
            ControlList       = new ObservableCollection <ITemplateWrapper>();

            SelectedQuestionType = QuestionTypes.Count > 0 ? QuestionTypes[0] : null;
        }
예제 #2
0
        public void MyTestInitialize()
        {
            this.scope = new TransactionScope(TransactionScopeOption.RequiresNew);

            var context = new FactWebContext();

            this.repository = new QuestionTypeRepository(context);
        }
예제 #3
0
 public QuizsController(IQuizRepository repo, ICategoryRepository repoCat, ISubCategoryRepository repoSubCat, ILevelRepository repoLevel, IQuestionTypeRepository repoQuestionType)
 {
     _repo = repo;
     _repoCat = repoCat;
     _repoLevel = repoLevel;
     _repoSubCat = repoSubCat;
     _repoQuestionType = repoQuestionType;
 }
예제 #4
0
 public UserService(
     IRoleRepository roleRepository,
     IQuestionTypeRepository questionTypeRepository,
     ITestingAreaRepository testingAreaRepository
     )
 {
     this.roleRepository = roleRepository;
     this.questionTypeRepository = questionTypeRepository;
     this.testingAreaRepository = testingAreaRepository;
 }
예제 #5
0
 public SurveyedService(ISurveyedRepository entityRepository, IPersonSurveyedRepository
                        personSurveyedRepository, IAnswerRepository answerRepository, IBranchOfficeRepository branchOfficeRepository,
                        IQuestionRepository questionRepository, IQuestionOptionRepository questionOptionRepository, IQuestionTypeRepository questionTypeRepository)
 {
     this.entityRepository         = entityRepository;
     this.personSurveyedRepository = personSurveyedRepository;
     this.answerRepository         = answerRepository;
     this.branchOfficeRepository   = branchOfficeRepository;
     this.questionRepository       = questionRepository;
     this.questionOptionRepository = questionOptionRepository;
     this.questionTypeRepository   = questionTypeRepository;
 }
 public QuestionTypesController(IQuestionTypeRepository repo)
 {
     _repo = repo;
 }
 public QuestionTypeService(IQuestionTypeRepository questionTypeRepository)
 {
     this.questionTypeRepository = questionTypeRepository;
 }
 public QuestionTypeController(QuestionTypeService questionTypeService, IQuestionTypeRepository questionTypeRepository)
 {
     QuestionTypeService    = questionTypeService;
     QuestionTypeRepository = questionTypeRepository;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="questionTypeRepository"></param>
 /// <param name="questionBankRepository"></param>
 /// <param name="mapper"></param>
 public QuestionBanksController(IQuestionTypeRepository questionTypeRepository, IQuestionBankRepository questionBankRepository, IMapper mapper)
 {
     _questionBankRepository = questionBankRepository;
     _questionTypeRepository = questionTypeRepository;
     _mapper = mapper;
 }
예제 #10
0
 public QuestionTypeService(IQuestionTypeRepository repository)
 {
     _repository = repository;
 }
예제 #11
0
 public QuestionTypeService(IQuestionTypeRepository entityRepository)
 {
     this.entityRepository = entityRepository;
 }
예제 #12
0
 public QuestionTypeService(IMapper mapper, IQuestionTypeRepository questionTypeRepository)
 {
     this.mapper = mapper;
     this.questionTypeRepository = questionTypeRepository;
 }
예제 #13
0
 public QuestionTypeManager(IQuestionTypeRepository questionTypeRepository)
 {
     _questionTypeRepository = questionTypeRepository;
 }
예제 #14
0
 public QuestionTypeService(IQuestionTypeRepository questionTypeRepository)
 {
     QuestionTypeRepository = questionTypeRepository;
 }
예제 #15
0
 public QuestionTypeService(IQuestionTypeRepository questionTypeRepo)
 {
     _questionTypeRepo = questionTypeRepo;
 }
예제 #16
0
 public QuestionTypeController(IQuestionTypeRepository questionTypeRepository)
 {
     _questionTypeRepository = questionTypeRepository;
 }
예제 #17
0
 public QuestionOptionService(IQuestionRepository repository, IQuestionTypeRepository qtrepository)
 {
     _repository   = repository;
     _qtrepository = qtrepository;
 }