Пример #1
0
        private static void displayGrades()
        {
            Console.WriteLine("Grades:");
            if (grades == null)
            {
                grades = client.GetGrades();
            }
            Dictionary <string, GradeCategory> gradeCategoriesDictionary = client.GetGradeCategoriesIDDictionary();
            Dictionary <string, GradeComment>  gradeCommentsDictionary   = client.GetGradeCommentsIDDictionary();

            for (int i = 0; i < grades.Count; i++)
            {
                string grade    = grades[i].Value.ToString();
                string category = gradeCategoriesDictionary[grades[i].CategoryID].Name;
                string comment  = gradeCommentsDictionary[grades[i].GradeCommentID].Text;
                string date     = grades[i].Date.ToString();
                string id       = grades[i].ID;
                Console.WriteLine($"Grade: {grade} (id: {id})");
                Console.WriteLine($"Category: {category}");
                Console.WriteLine($"Comment: {comment}");
                Console.WriteLine($"Date: {date}" + Environment.NewLine);
            }
        }