public AutoAddExaminationPaperViewModel(IWindowManager windowManager) { _windowManager = windowManager; SubjectItems.AddRange(_quetionBankBusiness.GetAllSubject().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.SubjectName }).ToList()); SubjectValue = Convert.ToInt32(SubjectItems.FirstOrDefault().Value); }
public AddExaminationPaperViewModel(IWindowManager windowManager) { _windowManager = windowManager; AddQuestionBackToPaper = new AddQuestionBackToPaper(this); DeleteQuestionBackToPaper = new DeleteQuestionBackToPaper(this); SubjectItems.AddRange(_quetionBankBusiness.GetAllSubject().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.SubjectName }).ToList()); SubjectValue = Convert.ToInt32(SubjectItems.FirstOrDefault().Value); TotalPage = _quetionBankBusiness.GetExaminationQuestionTotalPage(SearchText, QuestionTypesValue, TestPaper.SubjectId); CurrentPage = 1; }
public QuestionBankManagerViewModel(IWindowManager windowManager) { _windowManager = windowManager; SubjectItems.AddRange(_quetionBankBusiness.GetAllSubject().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.SubjectName }).ToList()); QuestionTypesItems.AddRange(_quetionBankBusiness.GetAllQuestionType().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.QuestionTypeName }).ToList()); KnowledgePointItems.AddRange(_quetionBankBusiness.GetAllKnowledgePoint().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.KnowledgePointName }).ToList()); TotalPage = _quetionBankBusiness.GetExaminationQuestionTotalPage(SearchText, SeachQuestionTypeItem, SeachSubjectItem); CurrentPage = 1; }
public AddQuestionBankViewModel(IWindowManager windowManager) { _windowManager = windowManager; questionTypes = _quetionBankBusiness.GetAllQuestionType(); SubjectItems.AddRange(_quetionBankBusiness.GetAllSubject().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.SubjectName }).ToList()); QuestionTypesItems.AddRange(questionTypes.Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.QuestionTypeName }).ToList()); KnowledgePointItems.AddRange(_quetionBankBusiness.GetAllKnowledgePoint().Select((subject) => new PUComboBoxItemModel { Value = subject.Id, Header = subject.KnowledgePointName }).ToList()); GradeDifficulty = 2; }