示例#1
0
 public AppointmentViewModel(INavigation navigation)
 {
     if ((GlobalVariables.GlobalAppointmentList == null) || (GlobalVariables.GlobalAppointmentList.Count == 0))
     {
         Initialize();
     }
     else
     {
         foreach (var c in GlobalVariables.GlobalAppointmentList)
         {
             AppointmentList.Add(c);
             _appointmentlist.Add(c);
         }
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        public async void Initialize()
        {
            try
            {
                IsBusy           = true;
                _appointmentlist = await GetAppointmentList();

                foreach (var c in _appointmentlist)
                {
                    AppointmentList.Add(c);
                    GlobalVariables.GlobalAppointmentList.Add(c);
                }
                IsBusy = false;
            }

            catch (Exception err)
            {
                IsBusy = false;
                Debug.WriteLine(err.Message);
            }
        }
示例#4
0
        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);
            }
        }