コード例 #1
0
        private void buttonAddStudent_Click(object sender, EventArgs e)
        {
            var form = new FormStudent();

            if (form.ShowDialog() == DialogResult.OK)
            {
                LoadData();
            }
        }
コード例 #2
0
        private void buttonEditStudent_Click(object sender, EventArgs e)
        {
            if (controlTree.GetSelectedItem() != null)
            {
                int id   = controlTree.GetSelectedId();
                var form = new FormStudent();
                form.Id = id;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }
        }