private async void SelectDealer_Click(object sender, RoutedEventArgs e) { var dialog = new UserDialog(); ContentDialogResult button; do { button = await dialog.EnqueueAndShowIfAsync(); } while (button == ContentDialogResult.Primary && dialog.User.Role != RoleEnum.Dealer); if (button == ContentDialogResult.Primary) { User dealer = dialog.User; DealerGUID.Text = dealer.Id.ToString(); SelectedDealer.Text = $"Selected Dealer: {dealer.FirstName} {dealer.LastName}"; if (keyValuePairs.ContainsKey("Dealer")) { keyValuePairs.Remove("Dealer"); } keyValuePairs.Add("Dealer", x => x.DealerId == dealer.Id); UpdateSearchResult(); } }
private async void SelectDealer_Click(object sender, RoutedEventArgs e) { UserDialog dialog = new UserDialog(); ContentDialogResult button; // select till the selected user is playing a dealer role. do { button = await dialog.EnqueueAndShowIfAsync(); } while (button == ContentDialogResult.Primary && dialog.User.Role != RoleEnum.Dealer); if (button == ContentDialogResult.Primary) { DealerGUID.Text = (dealer = dialog.User).Id.ToString(); SelectedUser.Visibility = Visibility.Visible; SelectedUser.Text = $"Selected Dealer: {dealer.FirstName} {dealer.LastName}"; } }
private async void SelectModifier_Click(object sender, RoutedEventArgs e) { var dialog = new UserDialog(); var button = await dialog.EnqueueAndShowIfAsync(); if (button == ContentDialogResult.Primary) { User modifier = dialog.User; ModifierGUID.Text = modifier.Id.ToString(); SelectedModifier.Text = $"Selected Modifier: {modifier.FirstName} {modifier.LastName}"; if (keyValuePairs.ContainsKey("Modifier")) { keyValuePairs.Remove("Modifier"); } keyValuePairs.Add("Modifier", x => x.ModifierId == modifier.Id); UpdateSearchResult(); } }