예제 #1
0
 protected override async Task OnInitializedAsync()
 {
     Companies = await CommunityService.GetCommunityCompanies(CommunityId);
 }
 public CommunityController()
 {
     service = new CommunityService();
 }
예제 #3
0
        protected override async Task OnInitializedAsync()
        {
            var community = await CommunityService.GetCommunity(CommunityId);

            Developers = community.Developers;
        }
예제 #4
0
        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;
        }
예제 #5
0
 public LayoutController()
 {
     _courseService    = new CourseService();
     _communityService = new CommunityService();
 }