Example #1
0
        private async void ButtonClickFunction2()
        {
            var eve_data = Select_event;
            var result   = await App.Current.MainPage.DisplayAlert("取消參加活動確認", $"是否確認取消參加活動:{eve_data.title}?", "是", "否");

            if (result)
            {
                var response = await service.CancelEventRequest(eve_data.slug);

                switch (response.Item1)
                {
                case 1:
                    Select_event.Participate = false;
                    Par_show = !Par_show;
                    Cal_show = !Cal_show;
                    break;

                case 2:
                case 3:
                    await App.Current.MainPage.DisplayAlert("錯誤", response.Item2, "確定");

                    break;

                default:
                    break;
                }
            }
        }