Ejemplo n.º 1
0
        private async Task ExecuteCancelCommand()
        {
            var res = await donationRep.CancelDonationAsync(Item.Id);

            if (!res)
            {
                ShowFailureDialog("Unable to Cancel Pickup");
            }
            else
            {
                MessagingCenter.Send(this, "PickupCancelled", Item);
                await Page.Navigation.PopAsync();
            }
        }
        private async Task ExecuteCancelCommand()
        {
            var res = await donationRep.CancelDonationAsync(Item.Id);

            if (!res)
            {
                var alertConfig = new AlertConfig();
                alertConfig.Title   = "Unable to Cancel Donation";
                alertConfig.Message = "Please try again later.";
                await UserDialogs.Instance.AlertAsync(alertConfig);
            }
            else
            {
                await Page.Navigation.PopAsync();
            }
        }