Esempio n. 1
0
        public async Task InitializeAsync()
        {
            Classes = await Database.GetCoursesAsync();

            foreach (var course in Classes)
            {
                AttendanceCards.Add(new AttendanceCard
                {
                    CourseName = course.CourseName,
                    CourseId   = course.Id
                });
            }

            Violations = await Database.GetAttendanceViolationsAsync();

            GetViolations();
        }
Esempio n. 2
0
        public async Task InitializeAsync()
        {
            var offenses = await Database.GetStudentCourtOffensesAsync();

            var categories = await Database.GetStudentCourtCategoriesAsync();

            var classes = await Database.GetAttendanceViolationsAsync();

            int unexcusedAbsences = 0;

            foreach (var item in classes)
            {
                if (item.ViolationType == App.ViolationTypes.Absence)
                {
                    unexcusedAbsences++;
                }
            }

            StudentOffenseCard = new OffenseCard(offenses, categories,
                                                 unexcusedAbsences.ToString());
        }