コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var formAdd = new FormAddSubject();

            formAdd.ShowDialog();
            lbSubjects.DataSource = null;
            lbSubjects.DataSource = controller.GetSubjects();
        }
コード例 #2
0
 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();
     }
 }