Пример #1
0
        private async void ProcessRequest(object sender, EventArgs e)
        {
            if (!ValidateForm())
            {
                await DisplayAlert("ERROR!", "The highlighted fields are required!", "Close");
            }
            else
            {
                ActivityView av = new ActivityView();
                await this.Navigation.PushModalAsync(av);

                bool success = await SendRequest();

                await this.Navigation.PopModalAsync();

                if (success)
                {
                    await DisplayAlert("Success!", "Your request was sent! The flight department will contact you to finalize your trip.", "OK");

                    await this.Navigation.PopModalAsync();
                }
                else
                {
                    await DisplayAlert("Uh oh....", "There was an error processing your request! Please try again.", "OK");
                }
            }
        }
Пример #2
0
        async void Send(object sender, EventArgs e)
        {
            ActivityView av = new ActivityView();

            await this.Navigation.PushModalAsync(av);

            bool success = await SendRequest();

            await this.Navigation.PopModalAsync();

            if (success)
            {
                await DisplayAlert("Success!", "Your push notification was sent.", "OK");

                await this.Navigation.PopModalAsync();
            }
            else
            {
                await DisplayAlert("Uh oh....", "There was an error processing your request! Please try again.", "OK");
            }
        }