private void ajouterToolStripMenuItem1_Click(object sender, EventArgs e) { AddFamille Add_Famille = new AddFamille(); Add_Famille.ShowDialog(this); if (Add_Famille.DialogResult == DialogResult.OK) { listView_ShowBD_DataBinding(); this.ToolStripStatusLabel.Text = "You have added a family!"; } }
private string Add_Famille() { AddFamille AddFamille = new AddFamille() { StartPosition = FormStartPosition.CenterParent }; AddFamille.ShowDialog(this); if (AddFamille.textBox_FamilleName.Text != "") { FamilleNames.Add(AddFamille.textBox_FamilleName.Text); } return(AddFamille.textBox_FamilleName.Text); }