Ejemplo n.º 1
0
        private async void LoadDataAsync(string time = "daily")
        {
            if (time == "weekly")
            {
                schedules = await scheduleManager.GetWeeklySchedule(Constants.userId);
            }
            else if (time == "monthly")
            {
                schedules = await scheduleManager.GetMonthlySchedule(Constants.userId);
            }
            else if (time == "all")
            {
                schedules = await scheduleManager.GetAllScheduleByUser(Constants.userId);
            }
            else if (time == "daily")
            {
                schedules = await scheduleManager.GetDailySchedule(Constants.userId);
            }
            else
            {
                schedules = await scheduleManager.GetDailySchedule(Constants.userId);
            }

            if (schedules.Count() < 1)
            {
                emptyMessage.IsVisible  = true;
                emptyMessage.Text       = "Plan not found.";
                listIndicator.IsVisible = false;
                listIndicator.IsRunning = false;
            }
            else
            {
                emptyMessage.IsVisible  = false;
                listIndicator.IsVisible = false;
                listIndicator.IsRunning = false;
            }
            lstTasks.ItemsSource = schedules;
        }