Ejemplo n.º 1
0
        public async void Send(object sender, RoutedEventArgs e)
        {
            if (Wishlistbox.SelectedItem == null)
            {
                ListErr.Text            = "You must select a wishlist!";
                Wishlistbox.BorderBrush = new SolidColorBrush(Colors.Red);
            }

            if (User.Text == null || User.Text == "")
            {
                UserErr.Text     = "Username cannot be empty";
                User.BorderBrush = new SolidColorBrush(Colors.Red);
            }

            if (Wishlistbox.SelectedItem != null && User.Text != null && User.Text != "")
            {
                int selectedWishlist = WishLists.First(wl => wl.Title == (String)Wishlistbox.SelectedItem).WishlistId;
                await wishListService.InvitePerson(selectedWishlist, User.Text);

                Frame.GoBack();
            }
        }