private void buttonAddStudent_Click(object sender, EventArgs e) { var form = new FormStudent(); if (form.ShowDialog() == DialogResult.OK) { LoadData(); } }
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(); } } }