//private List<Management.Souhait> lsSouhait = new List<Management.Souhait>(); public Propose_visite(Immo_Rale.Management.Souhait vouloir = null) { InitializeComponent(); obj_Souhait = vouloir; init(); dataGridView1.DataSource = lsBien; dataGridView1.Columns["Adresse"].HeaderText = "Địa Chỉ"; dataGridView1.Columns["Surfacehabitable"].HeaderText = "Habitable"; dataGridView1.Columns["Surfaceparcelle"].HeaderText = "Parcelle"; dataGridView1.Columns["Typehabitation"].HeaderText = "Type"; dataGridView1.Columns["Nombre_pieces"].HeaderText = "Pieces"; dataGridView1.Columns["Nombre_chambre"].HeaderText = "Chambre"; dataGridView1.Columns["Nombre_bains"].HeaderText = "Bains"; dataGridView1.Columns["Avecgarage"].HeaderText = "Garage"; dataGridView1.Columns["Aveccavel"].HeaderText = "Cave"; dataGridView1.Columns["ID"].Visible = false; dataGridView1.Columns["Nom_Vendeur"].Visible = false; dataGridView1.Columns["prixSouhait"].Visible = false; dataGridView1.Columns["Date_miseenvente"].Visible = false; dataGridView1.Columns["prixReel"].Visible = false; dataGridView1.Columns["date_vente"].Visible = false; dataGridView1.Columns["idAcheteur"].Visible = false; dataGridView1.Columns["idVendeur"].Visible = false; dataGridView1.Columns["Statutbien"].Visible = false; }
private void init_souhait(Management.Souhait sou = null, Management.Acheteur achet = null) { Immo_Rale.ShowForm.Acheteur.Souhait souh = new Immo_Rale.ShowForm.Acheteur.Souhait(sou, achet); souh.trouver_souhait += (s1, e1) => { tabPage1_Acheteur.Text = " Biens Trouver"; changeTab(tabPage1_Acheteur, new ShowForm.Acheteur.Propose_visite((Management.Souhait)s1)); }; changeTab(tabPage1_Acheteur, souh); }
private Management.Souhait getSouhait(string s_habitablemin, string s_parcellemin, string s_type, string s_villesouhait, string s_statut, string s_garage, string s_cave, int chambre, string prix, string s_nom, string s_prenom) { Management.Souhait temp = new Management.Souhait(); if (obj_Souhait == null) { string condition = "typeS = \"" + s_type + "\" AND surfacehabiteMin = \"" + s_habitablemin + "\" AND surfaceparcelleMin = \"" + s_parcellemin + "\" AND aveccaveS = \"" + s_cave + "\" AND avecgarageS = \"" + s_garage + "\" AND villeS = \"" + s_villesouhait + "\" AND prixMax = \"" + prix + "\" AND nomAcheteur = \"" + s_prenom + " " + s_nom + "\""; temp = Management.Souhait.getFirst(condition); } return(temp); }
private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e) { try { id_2 = Guid.Parse(dataGridView2["ID", e.RowIndex].Value.ToString()); obj_souhait = getSelectedSouhait(id_2); textBox2.Text = id_2.ToString(); bt_modifier.Visible = true; bt_trouver.Visible = true; //SouhaitSelected(getSelectedSouhait(id), null); } catch { MessageBox.Show("Vui long double click vao hang ban muon xem thong tin"); } }
private Management.Souhait getSelectedSouhait(Guid id) { obj_souhait = lsSouhait.First(souh => souh.Id == id); return(obj_souhait); }