Пример #1
0
        private async Task AddStudentOverviews()
        {
            var viewModel = new StudentOverviewDetailViewModel(new StudentOverviewTableViewModel(), _studentOverviewStore, _pageService);

            viewModel.StudentOverviewAdded += (source, studentOverview) =>
            {
                StudentOverviews.Add(new StudentOverviewTableViewModel(studentOverview));
            };

            await _pageService.PushModalAsync(new StudentOverviewDetailPage(viewModel));
        }
Пример #2
0
        private async Task SelectStudentOverviews(StudentOverviewTableViewModel studentOverview)
        {
            if (studentOverview == null)
            {
                return;
            }

            SelectedStudentOverview = null;

            var viewModel = new StudentOverviewDetailViewModel(studentOverview, _studentOverviewStore, _pageService);

            viewModel.StudentOverviewUpdated += (source, updateStudentOverview) =>
            {
                studentOverview.Id         = updateStudentOverview.id;
                studentOverview.StudentID  = updateStudentOverview.studentID;
                studentOverview.Semester   = updateStudentOverview.semester;
                studentOverview.Attendance = updateStudentOverview.attendance;
                studentOverview.Grade      = updateStudentOverview.grade;
                studentOverview.ModuleID   = updateStudentOverview.moduleID;
                studentOverview.Year       = updateStudentOverview.year;
            };

            await _pageService.PushModalAsync(new StudentOverviewDetailPage(viewModel));
        }