コード例 #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;
            }
        }
コード例 #2
0
        private async void XFDDFilter_SelectedIndexChanged(object sender, EventArgs e)
        {
            await Navigation.PushPopupAsync(new LoadingPopPage());

            var picker        = (Picker)sender;
            int selectedIndex = picker.SelectedIndex;

            if (selectedIndex != -1)
            {
                var data           = picker.Items[picker.SelectedIndex];
                var FilterTypedata = picker.SelectedItem as FilterUser;
                _objScheduleListingRequest.Search = FilterTypedata.ListName;
                _objScheduleListingRequest.UserId = Settings.UserID;
                _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;
                        await Navigation.PopAllPopupAsync();
                    }
                    else
                    {
                        DependencyService.Get <IToast>().Show("No Data!!");
                        await Navigation.PopAllPopupAsync();
                    }
                }
                else
                {
                    await Navigation.PopAllPopupAsync();
                    await DisplayAlert("Message", "No record found", "OK");
                }
            }
        }