protected void Search_advance_button(object sender, EventArgs e)
        {
            List<BienImmobilierBase> liste;

            var name = search_box.Text;

            using (var client = new AgenceClient())
            {
                var criteres =
                    new CriteresRechercheBiensImmobiliers
                    {
                        TitreContient = name,
                        DateMiseEnTransaction1 =
                            filter_date_transaction1.Text != ""
                                ? Convert.ToDateTime(filter_date_transaction1.Text)
                                : (DateTime?) null,
                        DateMiseEnTransaction2 =
                            filter_date_transaction2.Text != "" && filter_date_transaction1.Text != ""
                                ? Convert.ToDateTime(filter_date_transaction2.Text)
                                : (DateTime?) null,
                        DescriptionContient = null,
                        DateTransaction1 = null,
                        DateTransaction2 = null,
                        EnergieChauffage = NegotiateChauffage(filter_type_energie_chauffage.SelectedValue),
                        MontantCharges1 = NegotiateTextBox(filter_montant_charge1.Text),
                        MontantCharges2 = NegotiateTextBox(filter_montant_charge2.Text),
                        NbEtages1 = NegotiateTextBox(filter_nb_etage1.Text),
                        NbEtages2 = NegotiateTextBox(filter_nb_etage2.Text),
                        NbPieces1 = NegotiateTextBox(filter_nb_pieces1.Text),
                        NbPieces2 = NegotiateTextBox(filter_nb_pieces2.Text),
                        NumEtage1 = NegotiateTextBox(filter_num_etage1.Text),
                        NumEtage2 = NegotiateTextBox(filter_num_etage2.Text),
                        Prix1 = NegotiateTextBox(filter_prix1.Text),
                        Prix2 = NegotiateTextBox(filter_prix2.Text),
                        Surface1 = NegotiateTextBox(filter_surface1.Text),
                        Surface2 = NegotiateTextBox(filter_surface2.Text),
                        TransactionEffectuee = null,
                        TypeBien = NegotiateBien(filter_type_bien.SelectedValue),
                        TypeChauffage = NegotiateTypeChauffage(filter_type_chauffage.SelectedValue),
                        TypeTransaction = NegotiateTransaction(filter_type_transaction.SelectedValue)
                    };
                var resultat = client.LireListeBiensImmobiliers(criteres, null, null);

                liste = resultat.SuccesExecution ? resultat.Liste.List : new List<BienImmobilierBase>();
            }
            gvResultats.DataSource = liste;
            gvResultats.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {

            List<BienImmobilierBase> liste;

            using (AgenceClient client = new AgenceClient())
            {
                CriteresRechercheBiensImmobiliers criteres =
                    new CriteresRechercheBiensImmobiliers
                    {
                        DateMiseEnTransaction1 = null,
                        DateMiseEnTransaction2 = null,
                        DescriptionContient = null,
                        DateTransaction1 = null,
                        DateTransaction2 = null,
                        EnergieChauffage = null,
                        MontantCharges1 = -1,
                        MontantCharges2 = -1,
                        NbEtages1 = -1,
                        NbEtages2 = -1,
                        NbPieces1 = -1,
                        NbPieces2 = -1,
                        NumEtage1 = -1,
                        NumEtage2 = -1,
                        Prix1 = -1,
                        Prix2 = -1,
                        Surface1 = -1,
                        Surface2 = -1,
                        TransactionEffectuee = null,
                        TypeBien = null,
                        TypeChauffage = null,
                        TypeTransaction = null
                    };
                ResultatListeBiensImmobiliers resultat = client.LireListeBiensImmobiliers(criteres, null, null);

                liste = resultat.SuccesExecution ? resultat.Liste.List : new List<BienImmobilierBase>();
            }
            gvResultats.DataSource = liste;
            gvResultats.DataBind();
        }