protected override async Task OnInitializedAsync() { Companies = await CommunityService.GetCommunityCompanies(CommunityId); }
public CommunityController() { service = new CommunityService(); }
protected override async Task OnInitializedAsync() { var community = await CommunityService.GetCommunity(CommunityId); Developers = community.Developers; }
private void NextPage_Click(object sender, RoutedEventArgs e) //下一页 { this.Page++; List <Question> qlist; bool isSuccess = true; switch (this.CurrentQList) { case 1: qlist = CommunityService.GetAllQuestions(Page); if (qlist == null) { isSuccess = false; break; } this.QuestionList = qlist; isSuccess = true; break; case 2: qlist = this.User.GetMyQuestions(this.Page); if (qlist == null) { isSuccess = false; break; } this.QuestionList = qlist; isSuccess = true; break; case 3: qlist = this.User.GetMyAnswers(this.Page); if (qlist == null) { isSuccess = false; break; } this.QuestionList = qlist; isSuccess = true; break; case 4: qlist = CommunityService.SearchQuestion(Keyword.Text, this.Page); if (qlist == null) { isSuccess = false; break; } this.QuestionList = qlist; isSuccess = true; break; } if (isSuccess == false) { this.Page--; tipWindow warning = new tipWindow("没有更多了"); warning.ShowDialog(); return; } PageLabel.Text = "当前页面:" + Page.ToString(); this.QuesItem.ItemsSource = null; this.QuesItem.ItemsSource = QuestionList; }
public LayoutController() { _courseService = new CourseService(); _communityService = new CommunityService(); }