コード例 #1
0
        public async Task AddParticipant(StudentViewModel student)
        {
            var p = await ProjectParticipantViewModel.Create();

            p.Student = student;
            p.Project = this;
            await p.Insert();

            participants.Add(p);
            OnPropertyChanged("Participants");
        }
コード例 #2
0
        protected override async Task RefreshFields()
        {
            Owner = await StudentViewModel.Get(model.OwnerId);

            Participants = new ObservableCollection <ProjectParticipantViewModel>(await ProjectParticipantViewModel.Where(p => p.ProjectId == model.Id));
            Contents     = new ObservableCollection <ProjectContentViewModel>(await ProjectContentViewModel.Where(c => c.ProjectId == model.Id));
            Assignment   = await AssignmentViewModel.Get(model.AssignmentId);
        }
コード例 #3
0
        public override async Task LoadProjects()
        {
            var tmp = ProjectParticipantViewModel.Where(x => x.StudentId == sId);

            Projects = (await tmp).Select(a => a.Project);
        }