示例#1
0
        private async void ButtonRemove(object s, EventArgs args)
        {
            if (clicked)
            {
                return;
            }
            if (admin != null)
            {
                clicked = true;
                var b = await App.Send("Meddelande",
                                       "Vill du också radera alla tillhörande produkter?", "Ja", "Nej", ManagePage.page);

                await DBActions.FullyRemoveAdmin(admin);

                if (b)
                {
                    var a = DBActions._a(admin);
                    foreach (Products p in a)
                    {
                        await DBActions.FullyRemoveProduct(p);
                    }
                }
                search.Text = null;
                App.Send("Info", "Kontot med ID: " + admin.ID + " har raderats!", "Ok", ManagePage.page);
                stack.IsVisible = false;
                clicked         = false;
            }
        }