Ejemplo n.º 1
0
        public void OnGet()
        {
            //https://docs.microsoft.com/cs-cz/aspnet/core/data/ef-rp/sort-filter-page?view=aspnetcore-3.0

            Grades = new List <GradeViewModel>();

            if (SearchString?.Length > 0)
            {
                foreach (var grade in _gradebook.GetGrades(SearchString))
                {
                    Grades.Add(new GradeViewModel()
                    {
                        Id = grade.Id, Subject = grade.Subject.Name, Acronym = grade.Subject.Acronym, Value = grade.Value, Weight = grade.Weight
                    });
                }
            }
            else
            {
                foreach (var grade in _gradebook.GetAllGrades())
                {
                    Grades.Add(new GradeViewModel()
                    {
                        Id = grade.Id, Subject = grade.Subject.Name, Acronym = grade.Subject.Acronym, Value = grade.Value, Weight = grade.Weight
                    });
                }
            }
        }
Ejemplo n.º 2
0
        public void OnGet()
        {
            foreach (var item in _gradebook.GetAllGrades())
            {
                _certificate.AddGrade(item);
            }

            CertificateData = _certificate.GetCertificateTable();
        }
Ejemplo n.º 3
0
        public void OnGet()
        {
            Grades = new List <GradeViewModel>();

            foreach (var grade in _gradebook.GetAllGrades())
            {
                Grades.Add(new GradeViewModel()
                {
                    Id = grade.Id, Subject = grade.Subject.Name, Acronym = grade.Subject.Acronym, Value = grade.Value, Weight = grade.Weight
                });
            }
        }