Ejemplo n.º 1
0
 public Nouvelle(Immo_Rale.Management.Biens house = null, Immo_Rale.Management.Vendeur vend = null)
 {
     InitializeComponent();
     lsVendeur = Management.Vendeur.getList("");
     LoadInit();
     if (house != null)
     {
         BindingData((Immo_Rale.Management.Biens)house, (Immo_Rale.Management.Vendeur)vend);
     }
 }
Ejemplo n.º 2
0
 private void reset_value()
 {
     if (obj_biens != null)
     {
         obj_biens   = null;
         obj_vendeur = null;
     }
     groupBox1.Text              = "Nouvelle Fiche";
     bt_save.Text                = "CONTRAT";
     label25.Visible             = tb_prix_vente.Visible = label26.Visible = dateTimePicker_reel.Visible = label27.Visible = tb_acheteur.Visible = false;
     tb_nom.Text                 = tb_prenom.Text = tb_adresse_pro.Text = tb_tel_fixe.Text = tb_tel_mobile.Text = tb_email.Text = String.Empty;
     tb_surfacehabitable.Text    = tb_surfaceparcelle.Text = tb_complementaire.Text = tb_adresse_bien.Text = String.Empty;
     tb_quartier.Text            = tb_prix_souhait.Text = tb_prix_vente.Text = tb_acheteur.Text = String.Empty;
     tb_statut.Text              = "DISPONIBLE";
     cbb_ville_pro.SelectedIndex = cbb_type_habitation.SelectedIndex = cbb_ville_bien.SelectedIndex = 0;
     checkBox_garage.Checked     = checkBox_cave.Checked = dateTimePicker_reel.Checked = false;
     numericUpDown_chambre.Value = numericUpDown_pieces.Value = numericUpDown_bains.Value = numericUpDown_Eau.Value = 0;
     dateTimePicker_veut.Value   = DateTime.Today;
 }
Ejemplo n.º 3
0
        private void BindingData(Immo_Rale.Management.Biens house, Immo_Rale.Management.Vendeur vend)
        // dua cac gia tri cua vendeur va biens vao textbox ( sau khi double click )
        {
            if (house.Statutbien == "VENDU")
            {
                label25.Visible           = tb_prix_vente.Visible = label26.Visible = dateTimePicker_reel.Visible = label27.Visible = tb_acheteur.Visible = true;
                dateTimePicker_reel.Value = Aide.parseDate(house.Date_vente.ToString());
            }
            groupBox1.Text     = "Mise à jour";
            cbb_statut.Visible = true;
            tb_statut.Visible  = false;
            this.obj_biens     = house;
            this.obj_vendeur   = getSelectedVendeur(house.Idvendeur);
            bt_save.Text       = "ENGREGISTRE";

            tb_nom.Text                = obj_vendeur.Nom;
            tb_prenom.Text             = obj_vendeur.Prenom;
            tb_adresse_pro.Text        = obj_vendeur.Adresse;
            cbb_ville_pro.SelectedItem = obj_vendeur.Ville;
            tb_tel_fixe.Text           = obj_vendeur.Telfixe;
            tb_tel_mobile.Text         = obj_vendeur.Telportable;
            tb_email.Text              = obj_vendeur.Email;

            tb_surfacehabitable.Text         = house.Surfacehabitable.ToString();
            tb_surfaceparcelle.Text          = house.Surfaceparcelle.ToString();
            cbb_type_habitation.SelectedItem = house.Typehabitation;
            if (house.Avecgarage == "true")
            {
                checkBox_garage.Checked = true;
            }
            else
            {
                checkBox_garage.Checked = false;
            }
            if (house.Aveccavel == "true")
            {
                checkBox_cave.Checked = true;
            }
            else
            {
                checkBox_cave.Checked = false;
            }
            numericUpDown_chambre.Value = house.Nombre_chambre;
            numericUpDown_pieces.Value  = house.Nombre_pieces;
            numericUpDown_bains.Value   = house.Nombre_bains;
            numericUpDown_Eau.Value     = house.Nombre_eau;
            tb_complementaire.Text      = house.Commentaire;
            tb_adresse_bien.Text        = house.Adresse;
            tb_quartier.Text            = house.Quartier;
            cbb_ville_bien.SelectedItem = house.Ville;
            dateTimePicker_veut.Value   = Aide.parseDate(house.Date_miseenvente.ToString());
            tb_prix_souhait.Text        = house.Prixsouhait.ToString();
            tb_prix_vente.Text          = house.Prixreel.ToString();
            //  dateTimePicker_reel.Value = Aide.parseDate(house.Date_vente.ToString());
            tb_acheteur.Text        = house.Idacheteur.ToString();
            tb_statut.Text          = house.Statutbien;
            cbb_statut.SelectedItem = house.Statutbien;

            //if (obj_biens.Vendeur != null)
            //{
            //    MessageBox.Show(obj_biens.Vendeur.Nom);
            //}
        }