private async Task GetLessonsAsync() { ResponseResult lessonResult = await _bmsService.GetLessons(false, LessonType.Discussion); if (HasErrorMsg(lessonResult.Status, lessonResult.Message)) { return; } List <LessonInfo> lessonList = lessonResult.Data as List <LessonInfo>; Lessons.Clear(); lessonList?.ForEach((lesson) => { Lessons.Add(lesson); }); }
private async Task GetLessonsAsync() { ResponseResult allLessonsResult = await _bmsService.GetLessons(false, null); if (!HasErrorMsg(allLessonsResult.Status, allLessonsResult.Message)) { List <LessonInfo> lessonList = allLessonsResult.Data as List <LessonInfo>; Lessons.Clear(); lessonList?.ForEach((lesson) => { lesson.GotoLessonTypeCommand = GotoLessonTypeCommand; Lessons.Add(lesson); }); } }