Esempio n. 1
0
        private async void LoadSchdeuleListing()
        {
            try
            {
                _objScheduleListingRequest = new ScheduleListingRequest
                {
                    UserId = Settings.UserID,
                    Search = "All items"
                };
                _objHeaderModel.TokenCode   = Settings.TokenCode;
                _objScheduleListingResponse = await _apiService.GetScheduleListingAsync(new Get_API_Url().GetScheduleListApi(_baseUrl, _objScheduleListingRequest.Search), true, _objHeaderModel, _objScheduleListingRequest);

                result = _objScheduleListingResponse.Response;
                if (result.StatusCode == 200)
                {
                    if (result.scheduleLists.Count > 0)
                    {
                        WorkoutList.ItemsSource = result.scheduleLists;
                    }
                    else
                    {
                        DependencyService.Get <IToast>().Show("No Data!!");
                    }
                }
            }
            catch (Exception ex)
            {
                var msg = ex.Message;
            }
        }
Esempio n. 2
0
        public ScheduleListingPage()
        {
            InitializeComponent();
            filtersList = new ObservableCollection <FilterUser>();
            filtersList.Add(new FilterUser {
                ListId = 1, ListName = "All items"
            });
            filtersList.Add(new FilterUser {
                ListId = 2, ListName = "Currently scheduled items"
            });
            filtersList.Add(new FilterUser {
                ListId = 3, ListName = "Ended schedules only"
            });
            filtersList.Add(new FilterUser {
                ListId = 4, ListName = "Future schedules only"
            });
            _objScheduleListingResponse = new ScheduleListingResponse();
            _apiService                = new RestApi();
            _objHeaderModel            = new HeaderModel();
            _baseUrl                   = Settings.Url + Domain.GetScheduleListApiConstant;
            _objScheduleListingRequest = new ScheduleListingRequest();
            XFDDFilter.ItemsSource     = filtersList;
            XFDDFilter.SelectedIndex   = 0;
            //LoadSchdeuleListing();
            //for (int i = 0; i <= 10; i++)
            //{
            //    objList.Add("a");
            //}

            //WorkoutList.ItemsSource = objList;
        }