示例#1
0
 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);
 }
示例#2
0
 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;
 }
示例#3
0
 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;
 }
示例#4
0
 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;
 }