Ejemplo n.º 1
0
        private void btreserver_Click(object sender, EventArgs e)
        {
            Hebergement hebergement = (Hebergement)lbheberg.SelectedItem;

            if (lbheberg.SelectedItem != null)
            {
                label29.Text = hebergement.GetMontant().ToString() + "€ Par Personne";
            }
            label12.Text                     = hsbnbplaces.Value.ToString();
            groupBox2.Visible                = true;
            label3.Visible                   = true;
            dtpdatedebut.Visible             = true;
            hsbnbplaces.Visible              = true;
            btconsultersemainereserv.Visible = true;
            label4.Visible                   = true;
            hsbnbplaces.Visible              = true;
            label12.Visible                  = true;
            label5.Visible                   = true;
            label29.Visible                  = true;
        }
Ejemplo n.º 2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            pbphoto.Visible = true;
            label17.Visible = true;
            label18.Visible = true;
            label19.Visible = true;
            label20.Visible = true;
            label21.Visible = true;
            label22.Visible = true;
            label23.Visible = true;
            label24.Visible = true;
            label25.Visible = true;
            label26.Visible = true;
            label31.Visible = true;
            label28.Visible = true;
            label27.Visible = true;
            label32.Visible = true;
            label34.Visible = true;
            label35.Visible = true;
            label30.Visible = true;

            Hebergement hebergement = (Hebergement)lbheberg.SelectedItem;

            if (lbheberg.SelectedItem != null)
            {
                label18.Text          = hebergement.GetMontant().ToString();
                label20.Text          = hebergement.GetSecteur();
                label22.Text          = hebergement.GetTypeH();
                label24.Text          = hebergement.GetAnnneRemise().ToString();
                label26.Text          = hebergement.GetNBMAX().ToString();
                label28.Text          = hebergement.GetSurface().ToString();
                label32.Text          = hebergement.GetInternet().ToString();
                label35.Text          = hebergement.GetOrientation();
                rtbdescription.Text   = hebergement.GetDescription();
                pbphoto.ImageLocation = hebergement.GetPhoto();
                btReserver.Visible    = true;
            }
        }
Ejemplo n.º 3
0
        private void btinfo_Click(object sender, EventArgs e)
        {
            btmodifier.Visible     = true;
            pbphoto.Visible        = true;
            label4.Visible         = true;
            label5.Visible         = true;
            label19.Visible        = true;
            label7.Visible         = true;
            label21.Visible        = true;
            label11.Visible        = true;
            label23.Visible        = true;
            label12.Visible        = true;
            label25.Visible        = true;
            label13.Visible        = true;
            label24.Visible        = true;
            rtbdescription.Visible = true;
            label27.Visible        = true;
            label8.Visible         = true;
            label31.Visible        = true;
            label9.Visible         = true;
            label34.Visible        = true;
            label10.Visible        = true;
            Hebergement hebergement = (Hebergement)lbhebergement.SelectedItem;

            if (lbhebergement.SelectedItem != null)
            {
                label5.Text           = hebergement.GetMontant().ToString();
                label7.Text           = hebergement.GetSecteur();
                label11.Text          = hebergement.GetTypeH();
                label12.Text          = hebergement.GetAnnneRemise().ToString();
                label13.Text          = hebergement.GetNBMAX().ToString();
                label8.Text           = hebergement.GetSurface().ToString();
                label9.Text           = hebergement.GetInternet().ToString();
                label10.Text          = hebergement.GetOrientation();
                rtbdescription.Text   = hebergement.GetDescription();
                pbphoto.ImageLocation = hebergement.GetPhoto();
            }
        }
Ejemplo n.º 4
0
        private void btvalider_Click(object sender, EventArgs e)
        {
            bool internet;

            if (rbInternetoui.Checked)
            {
                internet = true;
            }
            else
            {
                internet = false;
            }
            string      code_type   = Connexion1.SelectionCodeType(cbtype.SelectedItem.ToString());;
            Hebergement hebergement = new Hebergement(tbNom.Text, Convert.ToInt32(nupd.Value), hsbSurface.Value, internet, Convert.ToInt32(tbAnneRemise.Text), tbSecteur.Text, cborientation.Text, cbEtat.Text, rtbdesc.Text, tbImage.Text, Convert.ToInt32(tbmontant.Text), code_type);

            if (Connexion1.InsererHebergement(hebergement.GetNom(), hebergement.GetNBMAX(), Convert.ToInt16(hebergement.GetSurface()), hebergement.GetInternet(), hebergement.GetAnnneRemise(), hebergement.GetSecteur(), hebergement.GetOrientation(), hebergement.GetEtat(), hebergement.GetDescription(), hebergement.GetTypeH(), hebergement.GetMontant(), hebergement.GetPhoto()) == true)
            {
                MessageBox.Show("Hebergement Crée");
            }
        }