private void Filters_Button_Click(object sender, RoutedEventArgs e) { FiltersWindow w = new FiltersWindow(this._filtres); w.Owner = this; if (w.ShowDialog() == true) { this.Filtres = w.Filtres; } }
protected async void ChargerBiensImmobiliers(int page = 1) { this.ChargementListe = true; ServiceAgence.CriteresRechercheBiensImmobiliers criteres = null; ServiceAgence.ResultatListeBiensImmobiliers resultat = null; if (this._filtres == null) { criteres = FiltersWindow.InitializeFilters(); } else { criteres = this._filtres; } criteres.TypeTransaction = this._typeTransaction; // Appel au service WCF try { resultat = await this._service.LireListeBiensImmobiliersAsync(criteres, page, NB_BIENS_IMMOBILIERS_PAR_PAGE); if (resultat.SuccesExecution) { this.ListeBiens = resultat.Liste; this.BienBaseSelectionne = null; } else { AfficherErreur(resultat); } } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Erreur", MessageBoxButton.OK, MessageBoxImage.Error); } this.ChargementListe = false; }