private async void ShowSchedule() { if (Application.Current.Properties.ContainsKey("groupId")) { var groupId = (int)Application.Current.Properties["groupId"]; var groupName = Application.Current.Properties["groupName"].ToString(); GroupName.Text = groupName + " сыныбына арналған сабақ кестесі"; try { var schedule = new List <Day>(); ScheduleTable.IsRefreshing = true; var days = await GetDaysAsync(groupId); ScheduleTable.IsRefreshing = false; if (days != null) { foreach (var item in days) { var day = new Day { DayOfWeek = DictionaryHelper.GetDayOfWeekName((int)item.DayOfWeek) }; var lessons = new List <Lesson>(); foreach (var itemLesson in item.Lessons) { var lesson = new Lesson { Order = itemLesson.Order, TeacherName = itemLesson.TeacherName, SubjectName = itemLesson.SubjectName }; lessons.Add(lesson); } day.Lessons = lessons; schedule.Add(day); } } Days = new ObservableCollection <Day>(schedule); ScheduleTable.ItemsSource = Days; } catch (Exception e) { await DisplayAlert("Серверге қосылу мүмкін емес", "Интернет қосылуын тексеріңіз", "OK"); return; } } }