private void btAjouter_Click(object sender, EventArgs e) { Personne p; String titre = txtTitre.Text.Trim(); String nom = txtNom.Text.Trim(); if (titre != "") { p = new VIP(titre, nom); } else { p = new Personne(nom); } lstPersonnes.Items.Add(new ListViewItemPersonne(p)); txtTitre.Text = ""; txtNom.Text = ""; txtSalut.Text = ""; desactiveSaluerAjouter(); desactiveModifierSupprimer(); }
public ListViewItemPersonne(Personne p) : base() { qui = p; Text = qui.ToString(); }
public void Modifier(Personne qui) { this.qui = qui; txtNom.Text = qui.Nom; }