Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                button_valider_Click();
            }
            else
            {
                List <ServiceAgence.BienImmobilierBase> liste = null;

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


                    if (resultat.SuccesExecution)
                    {
                        liste = resultat.Liste.List;
                    }
                    else
                    {
                        liste            = new List <ServiceAgence.BienImmobilierBase>();
                        this.mLabel.Text = resultat.ErreursBloquantes.ToString();
                    }
                }

                /*this.gvResultats.DataSource = liste;
                 * this.gvResultats.DataBind();*/
                Session["TaskTable"] = liste;
                //this.gvResultats.DataSource = liste;
                //this.gvResultats.DataBind();
                BindData();
            }
        }
Ejemplo n.º 2
0
        public async Task new_research(ServiceAgence.CriteresRechercheBiensImmobiliers criteres)
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                ServiceAgence.ResultatListeBiensImmobiliers resultat = client.LireListeBiensImmobiliers(criteres, null, null);

                if (resultat.SuccesExecution)
                {
                    liste = resultat.Liste.List;
                }
                else
                {
                    liste = new ObservableCollection <ServiceAgence.BienImmobilierBase>();
                }
            }
            this._lastCritere = criteres;
        }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            this.ListeBiens = new ObservableCollection <ServiceAgence.BienImmobilierBase>();

            using (ServiceAgence.AgenceClient _service = new ServiceAgence.AgenceClient())
            {
                ServiceAgence.CriteresRechercheBiensImmobiliers criteres = new ServiceAgence.CriteresRechercheBiensImmobiliers();
                criteres.DateMiseEnTransaction1 = null;
                criteres.DateMiseEnTransaction2 = null;
                criteres.DateTransaction1       = null;
                criteres.DateTransaction2       = null;
                criteres.EnergieChauffage       = null;
                criteres.MontantCharges1        = -1;
                criteres.MontantCharges2        = -1;
                criteres.NbEtages1            = -1;
                criteres.NbEtages2            = -1;
                criteres.NbPieces1            = -1;
                criteres.NbPieces2            = -1;
                criteres.NumEtage1            = -1;
                criteres.NumEtage2            = -1;
                criteres.Prix1                = -1;
                criteres.Prix2                = -1;
                criteres.Surface1             = -1;
                criteres.Surface2             = -1;
                criteres.TransactionEffectuee = null;

                ServiceAgence.ResultatListeBiensImmobiliers resultat;
                resultat = _service.LireListeBiensImmobiliers(criteres, null, null);

                ListeBiens = resultat.Liste.List;

                if (resultat.SuccesExecution)
                {
                    ListeBiens = resultat.Liste.List;
                }
                else
                {
                    ListeBiens = new ObservableCollection <ServiceAgence.BienImmobilierBase>();
                    //this.lblErreurs.Text = resultat.ErreursBloquantes.ToString();
                }
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                client.Open();

                ServiceAgence.CriteresRechercheBiensImmobiliers c = new ServiceAgence.CriteresRechercheBiensImmobiliers();

                Initcriteres(c);

                ServiceAgence.ResultatListeBiensImmobiliers res = client.LireListeBiensImmobiliers(c, 1, 4);

                this.rpResultats.DataSource = res.Liste.List;
                this.rpResultats.DataBind();

                client.Close();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {

                client.Open();

                ServiceAgence.CriteresRechercheBiensImmobiliers c = new ServiceAgence.CriteresRechercheBiensImmobiliers();

                Initcriteres(c);

                ServiceAgence.ResultatListeBiensImmobiliers res = client.LireListeBiensImmobiliers(c, 1, 4);

                this.rpResultats.DataSource = res.Liste.List;
                this.rpResultats.DataBind();

                client.Close();
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ListeBiens = new ObservableCollection <ServiceAgence.BienImmobilierBase>();

            using (ServiceAgence.AgenceClient _service = new ServiceAgence.AgenceClient())
            {
                ServiceAgence.CriteresRechercheBiensImmobiliers criteres = new ServiceAgence.CriteresRechercheBiensImmobiliers();
                criteres.DateMiseEnTransaction1 = null;
                criteres.DateMiseEnTransaction2 = null;
                criteres.DateTransaction1       = null;
                criteres.DateTransaction2       = null;
                criteres.EnergieChauffage       = null;
                criteres.MontantCharges1        = -1;
                criteres.MontantCharges2        = -1;
                criteres.NbEtages1            = -1;
                criteres.NbEtages2            = -1;
                criteres.NbPieces1            = -1;
                criteres.NbPieces2            = -1;
                criteres.NumEtage1            = -1;
                criteres.NumEtage2            = -1;
                criteres.Prix1                = -1;
                criteres.Prix2                = -1;
                criteres.Surface1             = -1;
                criteres.Surface2             = -1;
                criteres.TransactionEffectuee = null;

                ServiceAgence.ResultatListeBiensImmobiliers resultat;
                resultat = _service.LireListeBiensImmobiliers(criteres, null, null);

                // ListeBiens = resultat.Liste;

                if (resultat.SuccesExecution)
                {
                    //ListeBiens = resultat.Liste.List;
                }
                else
                {
                    ListeBiens = new ObservableCollection <ServiceAgence.BienImmobilierBase>();
                    //this.lblErreurs.Text = resultat.ErreursBloquantes.ToString();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

            List<ServiceAgence.BienImmobilierBase> liste = null;

            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                ServiceAgence.CriteresRechercheBiensImmobiliers criteres =
                    new ServiceAgence.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
                    };
                ServiceAgence.ResultatListeBiensImmobiliers resultat = client.LireListeBiensImmobiliers(criteres, null, null);

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

            this.rpResultats.DataSource = liste;
            this.rpResultats.DataBind();

        }
        private void BindData()
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                client.Open();

                ServiceAgence.CriteresRechercheBiensImmobiliers c = new ServiceAgence.CriteresRechercheBiensImmobiliers();

                Initcriteres(c);

                if (IsPostBack)
                {
                    c.TitreContient = Titre.Text;

                    if (DropDownListTypeBien.SelectedValue != "-1")
                    {
                        Catalogue obj = new Catalogue();
                        c.TypeBien = (ServiceAgence.BienImmobilierBase.eTypeBien)obj.AffectSelectedValue(DropDownListTypeBien);
                    }

                    c.AdresseContient = Adresse.Text;
                    c.CodePostal      = CP.Text;
                    c.Ville           = Ville.Text;
                }


                ServiceAgence.ResultatListeBiensImmobiliers res = client.LireListeBiensImmobiliers(c, 0, 8);


                List <ServiceAgence.BienImmobilierBase> liste = res.Liste.List;
                this.gvDisplay.DataSource = liste;
                this.gvDisplay.DataBind();


                client.Close();
            }
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <ServiceAgence.BienImmobilierBase> liste = null;
            String nbpieces1 = null;
            String nbpieces2 = null;
            String prix1     = null;
            String prix2     = null;
            String surface1  = null;
            String surface2  = null;

            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                if (Request.QueryString["prix_demande"] != null)
                {
                    string[] words = Request.QueryString["prix_demande"].TrimStart(',').Split(',');
                    if (words.Length == 2)
                    {
                        if (Convert.ToInt32(words[0]) > Convert.ToInt32(words[1]))
                        {
                            prix1 = words[1];
                            prix2 = words[0];
                        }
                        else
                        {
                            prix1 = words[0];
                            prix2 = words[1];
                        }
                    }
                }
                if (Request.QueryString["surface_demande"] != null)
                {
                    string[] words = Request.QueryString["surface_demande"].TrimStart(',').Split(',');
                    if (words.Length == 2)
                    {
                        if (Convert.ToInt32(words[0]) > Convert.ToInt32(words[1]))
                        {
                            surface1 = words[1];
                            surface2 = words[0];
                        }
                        else
                        {
                            surface1 = words[0];
                            surface2 = words[1];
                        }
                    }
                }
                if (Request.QueryString["nombre_piece_demande"] != null)
                {
                    string[] words = Request.QueryString["nombre_piece_demande"].TrimStart(',').Split(',');
                    if (words.Length == 2)
                    {
                        nbpieces1 = words[0];
                        nbpieces2 = words[1];
                    }
                }


                ServiceAgence.CriteresRechercheBiensImmobiliers criteres = new ServiceAgence.CriteresRechercheBiensImmobiliers();
                criteres.DateMiseEnTransaction1 = (null != Request.QueryString["date_mise_transaction_1"] && "" != Request.QueryString["date_mise_transaction_1"] ? DateTime.Parse(Request.QueryString["date_mise_transaction_1"]) : (DateTime?)null);
                criteres.DateMiseEnTransaction2 = (null != Request.QueryString["date_mise_transaction_2"] && "" != Request.QueryString["date_mise_transaction_2"] ? DateTime.Parse(Request.QueryString["date_mise_transaction_2"]) : (DateTime?)null);
                criteres.DateTransaction1       = (null != Request.QueryString["date_transaction_1"] && "" != Request.QueryString["date_transaction_1"] ? DateTime.Parse(Request.QueryString["date_transaction_1"]) : (DateTime?)null);
                criteres.DateTransaction2       = (null != Request.QueryString["date_transaction_2"] && "" != Request.QueryString["date_transaction_2"] ? DateTime.Parse(Request.QueryString["date_transaction_2"]) : (DateTime?)null);
                criteres.MontantCharges1        = (null != Request.QueryString["montantcharges1"] && "" != Request.QueryString["montantcharges1"] ? int.Parse(Request.QueryString["montantcharges1"]) : -1);
                criteres.MontantCharges2        = (null != Request.QueryString["montantcharges2"] && "" != Request.QueryString["montantcharges2"] ? int.Parse(Request.QueryString["montantcharges2"]) : -1);

                criteres.NbEtages1 = (null != Request.QueryString["nbetages1"] && "" != Request.QueryString["nbetages1"] ? int.Parse(Request.QueryString["nbetages1"]) : -1);
                criteres.NbEtages2 = (null != Request.QueryString["nbetages2"] && "" != Request.QueryString["nbetages2"] ? int.Parse(Request.QueryString["nbetages2"]) : -1);
                criteres.NumEtage1 = (null != Request.QueryString["numetage1"] && "" != Request.QueryString["numetage1"] ? int.Parse(Request.QueryString["numetage1"]) : -1);
                criteres.NumEtage2 = (null != Request.QueryString["numetage2"] && "" != Request.QueryString["numetage2"] ? int.Parse(Request.QueryString["numetage2"]) : -1);

                criteres.NbPieces1 = (null != nbpieces1 && "" != nbpieces1 ? int.Parse(nbpieces1) : -1);
                criteres.NbPieces2 = (null != nbpieces2 && "" != nbpieces2 ? int.Parse(nbpieces2) : -1);
                criteres.Prix1     = (null != prix1 && "" != prix1 ? Double.Parse(prix1) : -1);
                criteres.Prix2     = (null != prix2 && "" != prix2 ? Double.Parse(prix2) : -1);
                criteres.Surface1  = (null != surface1 && "" != surface1 ? Double.Parse(surface1) : -1);
                criteres.Surface2  = (null != surface2 && "" != surface2 ? Double.Parse(surface2) : -1);

                criteres.TransactionEffectuee = (null != Request.QueryString["transaction_effectue"] && "" != Request.QueryString["transaction_effectue"] ? Boolean.Parse(Request.QueryString["transaction_effectue"]) : (bool?)null);

                criteres.Ville = "" != Request.QueryString["town"] ? Request.QueryString["town"] : null;

                criteres.TypeBien = null;
                String key = localiseKey("type_bien");
                if (key != null)
                {
                    if (key != "-1")
                    {
                        criteres.TypeBien = (ServiceAgence.BienImmobilierBase.eTypeBien)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eTypeBien), key);
                    }
                    else
                    {
                        criteres.TypeBien = null;
                    }
                }

                criteres.TypeBien = null;
                key = localiseKey("energie_chauffage");
                if (key != null)
                {
                    if (key != "-1")
                    {
                        criteres.EnergieChauffage = (ServiceAgence.BienImmobilierBase.eEnergieChauffage)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eEnergieChauffage), key);
                    }
                    else
                    {
                        criteres.EnergieChauffage = null;
                    }
                }

                criteres.TypeChauffage = null;
                key = localiseKey("type_chauffage");
                if (key != null)
                {
                    if (key != "-1")
                    {
                        criteres.TypeChauffage = (ServiceAgence.BienImmobilierBase.eTypeChauffage)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eTypeChauffage), key);
                    }
                    else
                    {
                        criteres.TypeChauffage = null;
                    }
                }

                criteres.TypeTransaction = null;
                key = localiseKey("type_transaction");
                System.Diagnostics.Debug.WriteLine(key);
                if (key != null)
                {
                    if (key != "-1")
                    {
                        criteres.TypeTransaction = (ServiceAgence.BienImmobilierBase.eTypeTransaction)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eTypeTransaction), key);
                    }
                    else
                    {
                        criteres.TypeTransaction = null;
                    }
                }



                ServiceAgence.ResultatListeBiensImmobiliers resultat = client.LireListeBiensImmobiliers(criteres, null, null);


                if (resultat.SuccesExecution)
                {
                    liste = resultat.Liste.List;
                }
                else
                {
                    liste            = new List <ServiceAgence.BienImmobilierBase>();
                    this.mLabel.Text = resultat.ErreursBloquantes.ToString();
                }
            }

            /*this.gvResultats.DataSource = liste;
             * this.gvResultats.DataBind();*/

            this.rpResultats.DataSource = liste;
            this.rpResultats.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            List<ServiceAgence.BienImmobilierBase> liste = null;
            String nbpieces1 = null;
            String nbpieces2 = null;
            String prix1 = null;
            String prix2 = null;
            String surface1 = null;
            String surface2 = null;

            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                if(Request.QueryString["prix_demande"] != null)
                {
                    string[] words = Request.QueryString["prix_demande"].TrimStart(',').Split(',');
                    if(words.Length == 2)
                    {
                        if (Convert.ToInt32(words[0]) > Convert.ToInt32(words[1]))
                        {
                            prix1 = words[1];
                            prix2 = words[0];
                        }
                        else
                        {
                            prix1 = words[0];
                            prix2 = words[1];
                        }
                    }
                }
                if (Request.QueryString["surface_demande"] != null)
                {
                    string[] words = Request.QueryString["surface_demande"].TrimStart(',').Split(',');
                    if (words.Length == 2)
                    {
                        if(Convert.ToInt32(words[0]) > Convert.ToInt32(words[1]))
                        {
                            surface1 = words[1];
                            surface2 = words[0];
                        }
                        else
                        {
                            surface1 = words[0];
                            surface2 = words[1];
                        }
                    }
                }
                if (Request.QueryString["nombre_piece_demande"] != null)
                {
                    string[] words = Request.QueryString["nombre_piece_demande"].TrimStart(',').Split(',');
                    if (words.Length == 2)
                    {
                        nbpieces1 = words[0];
                        nbpieces2 = words[1];
                    }
                }

                ServiceAgence.CriteresRechercheBiensImmobiliers criteres = new ServiceAgence.CriteresRechercheBiensImmobiliers();
                criteres.DateMiseEnTransaction1 = (null != Request.QueryString["date_mise_transaction_1"] && "" != Request.QueryString["date_mise_transaction_1"] ? DateTime.Parse(Request.QueryString["date_mise_transaction_1"]) : (DateTime?)null);
                criteres.DateMiseEnTransaction2 = (null != Request.QueryString["date_mise_transaction_2"] && "" != Request.QueryString["date_mise_transaction_2"] ? DateTime.Parse(Request.QueryString["date_mise_transaction_2"]) : (DateTime?)null);
                criteres.DateTransaction1 = (null != Request.QueryString["date_transaction_1"] && "" != Request.QueryString["date_transaction_1"] ? DateTime.Parse(Request.QueryString["date_transaction_1"]) : (DateTime?)null);
                criteres.DateTransaction2 = (null != Request.QueryString["date_transaction_2"] && "" != Request.QueryString["date_transaction_2"] ? DateTime.Parse(Request.QueryString["date_transaction_2"]) : (DateTime?)null);
                criteres.MontantCharges1 = (null != Request.QueryString["montantcharges1"] && "" != Request.QueryString["montantcharges1"] ? int.Parse(Request.QueryString["montantcharges1"]) : -1);
                criteres.MontantCharges2 = (null != Request.QueryString["montantcharges2"] && "" != Request.QueryString["montantcharges2"] ? int.Parse(Request.QueryString["montantcharges2"]) : -1);

                criteres.NbEtages1 = (null != Request.QueryString["nbetages1"] && "" != Request.QueryString["nbetages1"] ? int.Parse(Request.QueryString["nbetages1"]) : -1);
                criteres.NbEtages2 = (null != Request.QueryString["nbetages2"] && "" != Request.QueryString["nbetages2"] ? int.Parse(Request.QueryString["nbetages2"]) : -1);
                criteres.NumEtage1 = (null != Request.QueryString["numetage1"] && "" != Request.QueryString["numetage1"] ? int.Parse(Request.QueryString["numetage1"]) : -1);
                criteres.NumEtage2 = (null != Request.QueryString["numetage2"] && "" != Request.QueryString["numetage2"] ? int.Parse(Request.QueryString["numetage2"]) : -1);

                criteres.NbPieces1 = (null != nbpieces1 && "" != nbpieces1 ? int.Parse(nbpieces1) : -1);
                criteres.NbPieces2 = (null != nbpieces2 && "" != nbpieces2 ? int.Parse(nbpieces2) : -1);
                criteres.Prix1 = (null != prix1 && "" != prix1 ? Double.Parse(prix1) : -1);
                criteres.Prix2 = (null != prix2 && "" != prix2 ? Double.Parse(prix2) : -1);
                criteres.Surface1 = (null != surface1 && "" != surface1 ? Double.Parse(surface1) : -1);
                criteres.Surface2 = (null != surface2 && "" != surface2 ? Double.Parse(surface2) : -1);

                criteres.TransactionEffectuee = (null != Request.QueryString["transaction_effectue"]  && "" != Request.QueryString["transaction_effectue"] ? Boolean.Parse(Request.QueryString["transaction_effectue"]) : (bool?) null);

                criteres.Ville = "" != Request.QueryString["town"] ? Request.QueryString["town"] : null;

                criteres.TypeBien = null;
                String key = localiseKey("type_bien");
                if(key != null)
                {
                    if (key != "-1")
                        criteres.TypeBien = (ServiceAgence.BienImmobilierBase.eTypeBien)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eTypeBien), key);
                    else
                        criteres.TypeBien = null;
                }

                criteres.TypeBien = null;
                key = localiseKey("energie_chauffage");
                if (key != null)
                {
                    if (key != "-1")
                        criteres.EnergieChauffage = (ServiceAgence.BienImmobilierBase.eEnergieChauffage)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eEnergieChauffage), key);
                    else
                        criteres.EnergieChauffage = null;
                }

                criteres.TypeChauffage = null;
                key = localiseKey("type_chauffage");
                if (key != null)
                {
                    if (key != "-1")
                        criteres.TypeChauffage = (ServiceAgence.BienImmobilierBase.eTypeChauffage)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eTypeChauffage), key);
                     else
                        criteres.TypeChauffage = null;
                }

                criteres.TypeTransaction = null;
                key = localiseKey("type_transaction");
                System.Diagnostics.Debug.WriteLine(key);
                if (key != null)
                {
                    if (key != "-1")
                        criteres.TypeTransaction = (ServiceAgence.BienImmobilierBase.eTypeTransaction)Enum.Parse(typeof(ServiceAgence.BienImmobilierBase.eTypeTransaction), key);
                    else
                        criteres.TypeTransaction = null;
                }

                ServiceAgence.ResultatListeBiensImmobiliers resultat = client.LireListeBiensImmobiliers(criteres, null, null);

                if (resultat.SuccesExecution)
                {
                    liste = resultat.Liste.List;
                }
                else
                {
                    liste = new List<ServiceAgence.BienImmobilierBase>();
                    this.mLabel.Text = resultat.ErreursBloquantes.ToString();
                }
            }
            /*this.gvResultats.DataSource = liste;
            this.gvResultats.DataBind();*/

            this.rpResultats.DataSource = liste;
            this.rpResultats.DataBind();
        }
        private void BindData()
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {

                client.Open();

                ServiceAgence.CriteresRechercheBiensImmobiliers c = new ServiceAgence.CriteresRechercheBiensImmobiliers();

                Initcriteres(c);

                if (IsPostBack)
                {

                    c.TitreContient = Titre.Text;

                    if (DropDownListTypeBien.SelectedValue != "-1")
                    {
                        Catalogue obj = new Catalogue();
                        c.TypeBien = (ServiceAgence.BienImmobilierBase.eTypeBien)obj.AffectSelectedValue(DropDownListTypeBien);
                    }

                    c.AdresseContient = Adresse.Text;
                    c.CodePostal = CP.Text;
                    c.Ville = Ville.Text;

                }

                ServiceAgence.ResultatListeBiensImmobiliers res = client.LireListeBiensImmobiliers(c, 0, 8);

                List<ServiceAgence.BienImmobilierBase> liste = res.Liste.List;
                this.gvDisplay.DataSource = liste;
                this.gvDisplay.DataBind();

                client.Close();
            }
        }
Ejemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                client.Open();
                ServiceAgence.CriteresRechercheBiensImmobiliers a = new ServiceAgence.CriteresRechercheBiensImmobiliers();
                Initcriteres(a);

                if (!this.IsPostBack)
                {
                    Load_DropDownListItem <ServiceAgence.BienImmobilierBase.eTypeBien>(DropDownListTypeBien, true);
                    Load_DropDownListItem <ServiceAgence.BienImmobilierBase.eTypeChauffage>(DropDownListTypeChauffage, true);
                    Load_DropDownListItem <ServiceAgence.BienImmobilierBase.eEnergieChauffage>(DropDownListEnergieChauffage, true);
                    Load_DropDownListItem <ServiceAgence.BienImmobilierBase.eTypeTransaction>(DropDownListTypeTransaction, true);


                    DropDownListTypeBien.SelectedValue         = "-1";
                    DropDownListEnergieChauffage.SelectedValue = "-1";
                    DropDownListTypeChauffage.SelectedValue    = "-1";
                    DropDownListTypeTransaction.SelectedValue  = "-1";
                }

                if (this.IsPostBack)
                {
                    if (Request.Form["searchtype"] != null)
                    { // Recherche simple
                        a.TitreContient = RechercheTitre_simple.Text;
                    }

                    else
                    {// Recherche avancée
                        a.TitreContient       = RechercheTitre_adv.Text;
                        a.DescriptionContient = RechercheDescription.Text;
                        a.AdresseContient     = RechercheAdresse.Text;
                        a.CodePostal          = RechercheCodePostal.Text;
                        a.Ville = RechercheVille.Text;

                        if (DropDownListTypeBien.SelectedValue != "-1")
                        {
                            a.TypeBien = (ServiceAgence.BienImmobilierBase.eTypeBien)AffectSelectedValue(DropDownListTypeBien);
                        }
                        if (DropDownListEnergieChauffage.SelectedValue != "-1")
                        {
                            a.EnergieChauffage = (ServiceAgence.BienImmobilierBase.eEnergieChauffage)AffectSelectedValue(DropDownListEnergieChauffage);
                        }
                        if (DropDownListTypeChauffage.SelectedValue != "-1")
                        {
                            a.TypeChauffage = (ServiceAgence.BienImmobilierBase.eTypeChauffage)AffectSelectedValue(DropDownListTypeChauffage);
                        }
                        if (DropDownListTypeTransaction.SelectedValue != "-1")
                        {
                            a.TypeTransaction = (ServiceAgence.BienImmobilierBase.eTypeTransaction)AffectSelectedValue(DropDownListTypeTransaction);
                        }



                        double Number = 0;
                        if (Double.TryParse(RecherchePrixMin.Text, out Number))
                        {
                            a.Prix1 = Number;
                        }
                        if (Double.TryParse(RecherchePrixMax.Text, out Number))
                        {
                            a.Prix2 = Number;
                        }
                        if (Double.TryParse(RechercheSurfaceMin.Text, out Number))
                        {
                            a.Surface1 = Number;
                        }
                        if (Double.TryParse(RechercheSurfaceMax.Text, out Number))
                        {
                            a.Surface2 = Number;
                        }
                        if (Double.TryParse(RechercheEtageMin.Text, out Number))
                        {
                            a.NbEtages1 = (int)Number;
                        }
                        if (Double.TryParse(RechercheEtageMax.Text, out Number))
                        {
                            a.NbEtages2 = (int)Number;
                        }
                        if (Double.TryParse(RecherchePieceMin.Text, out Number))
                        {
                            a.NbPieces1 = (int)Number;
                        }
                        if (Double.TryParse(RecherchePieceMax.Text, out Number))
                        {
                            a.NbPieces2 = (int)Number;
                        }
                    }
                }

                ServiceAgence.ResultatListeBiensImmobiliers res = client.LireListeBiensImmobiliers(a, 0, 2);

                this.rpResultats.DataSource = res.Liste.List;
                this.rpResultats.DataBind();
                client.Close();
            }
        }
        public async Task new_research(ServiceAgence.CriteresRechercheBiensImmobiliers criteres)
        {
            using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient())
            {
                ServiceAgence.ResultatListeBiensImmobiliers resultat = client.LireListeBiensImmobiliers(criteres, null, null);

                if (resultat.SuccesExecution)
                {
                    liste = resultat.Liste.List;
                }
                else
                {
                    liste = new ObservableCollection<ServiceAgence.BienImmobilierBase>();
                }
            }
            this._lastCritere = criteres;
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                button_valider_Click();
            }
            else {

                List<ServiceAgence.BienImmobilierBase> liste = null;

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

                    if (resultat.SuccesExecution)
                    {
                        liste = resultat.Liste.List;
                    }
                    else
                    {
                        liste = new List<ServiceAgence.BienImmobilierBase>();
                        this.mLabel.Text = resultat.ErreursBloquantes.ToString();
                    }
                }
                /*this.gvResultats.DataSource = liste;
                this.gvResultats.DataBind();*/
                Session["TaskTable"] = liste;
                //this.gvResultats.DataSource = liste;
                //this.gvResultats.DataBind();
                BindData();
            }
        }