Exemplo n.º 1
0
        private async void search()
        {
            var list = await studentDao.GetByNameAsync(nameEntry.Text.Trim().ToLower());

            List <StudentAbsenceRelated> finalList = new List <StudentAbsenceRelated>();

            if (list.Count > 0)
            {
                foreach (Student s in list)
                {
                    var absenceList = await absenceDAO.getStudentAbsence(s.ID, currentLesson.ID);

                    finalList.Add(new StudentAbsenceRelated(absenceList, s));
                }
                var screen = new SearchResultsScreen(finalList);
                Navigation.PushAsync(screen);
            }
            else
            {
                DisplayAlert("Warning", "No results found for " + nameEntry.Text, "Close");
            }
        }