private void button1_Click(object sender, EventArgs e) { var formAdd = new FormAddSubject(); formAdd.ShowDialog(); lbSubjects.DataSource = null; lbSubjects.DataSource = controller.GetSubjects(); }
private void button7_Click(object sender, EventArgs e) { if (lbSubjects.SelectedItem != null) { var selected = (Subject)lbSubjects.SelectedItem; FormAddSubject form = new FormAddSubject(selected, true); form.ShowDialog(); lbSubjects.DataSource = null; lbSubjects.DataSource = controller.GetSubjects(); } }