public void FilterContactList(string text) { try { AppointmentList.Clear(); foreach (var c in _appointmentlist) { if (c.description.ToLower().Contains(text.ToLower())) { AppointmentList.Add(c); } } } catch (Exception err) { Debug.WriteLine(err.Message); } }
public async void Refresh() { try { IsRefreshing = true; _appointmentlist.Clear(); AppointmentList.Clear(); GlobalVariables.GlobalAppointmentList.Clear(); _appointmentlist = await GetAppointmentList(); foreach (var c in _appointmentlist) { AppointmentList.Add(c); GlobalVariables.GlobalAppointmentList.Add(c); } IsRefreshing = false; } catch (Exception err) { IsRefreshing = false; Debug.WriteLine(err.Message); } }