public void OnGet() { Keywords = _keyword.GetKeywords(); int pageId = Convert.ToInt32(Request.RouteValues["id"]); Problems = ProblemRepository.GetId(pageId); }
public void OnGet() { Keywords = _keyword.GetKeywords(); }
/// <summary> /// The actual Work to be done. /// </summary> protected override void Execute() { MainFormModel mainFormModel = null; List <RepositoryModel> repositoryList = new List <RepositoryModel>(); List <CollectionModel> newlist = new List <CollectionModel>(); List <SubseryModel> newSubseriesList = new List <SubseryModel>(); List <SubjectModel> subjectList = new List <SubjectModel>(); List <KeywordModel> keywordList = new List <KeywordModel>(); List <UserTypeModel> userTypes = new List <UserTypeModel>(); //if (Request.IsStartup) //{ mainFormModel = new MainFormModel() { BrowseRecordCount = TranscriptionRepository.GetAll().Count(), TranscrptionQueueRecordCount = TranscriptionRepository.FindBy(t => t.TranscriptStatus == false).Count(), }; // collect repository details. List <repository> repositories = RepositoryRepository.GetRepositoriess(); foreach (repository item in repositories) { repositoryList.Add(Util.ConvertToRepositoryModel(item)); } // collect collection details. List <collection> collections = CollectionRepository.GetCollections().OrderBy(c => c.CollectionName).ToList(); foreach (collection item in collections) { newlist.Add(Util.ConvertToCollectionModel(item, repositories.First(c => c.Id == item.RepositoryId).RepositoryName)); } // collect subseries details. foreach (subsery item in SubseryRepository.GetSubseries().OrderBy(s => s.SubseriesName)) { newSubseriesList.Add(Util.ConvertToSubseryModel(item, collections.FirstOrDefault(s => s.Id == item.CollectionId).CollectionName)); } // collect subject details. foreach (subject item in SubjectRepository.GetSubjects()) { subjectList.Add(Util.ConvertToSubjectModel(item)); } // collect keywords details. foreach (keyword item in KeywordRepository.GetKeywords()) { keywordList.Add(Util.ConvertToKeywordModel(item)); } // collect user types details. foreach (usertype item in UserTypeRepository.GetAll()) { userTypes.Add(Util.ConvertToUsertypeModel(item)); } //} List <PredefinedUserModel> predefineUserList = Util.ConvertToPredefinedUserModel(PredefineUserRepository.GetPredefinedUsers()); List <string> audioEquipmentsUsed = AudioEquipmentUsedRepository.List(); List <string> videoEquipmentsUsed = VideoEquipmentUsedRepository.List(); Response = new ResponseModel() { Repositories = repositoryList, Subseries = newSubseriesList, Collections = newlist, Subjects = subjectList, Keywords = keywordList, PredefinedUsers = predefineUserList, AudioEquipmentsUsed = audioEquipmentsUsed, VideoEquipmentsUsed = videoEquipmentsUsed, UserTypes = userTypes, MainFormModel = mainFormModel, IsOperationSuccess = true }; }