private void butAdd_Click(object sender, System.EventArgs e) { FormSchoolEdit FormSE = new FormSchoolEdit(); FormSE.SchoolCur = new School(); FormSE.IsNew = true; FormSE.ShowDialog(); if (FormSE.DialogResult != DialogResult.OK) { return; } FillList(); }
private void listSchools_DoubleClick(object sender, System.EventArgs e) { if (listSchools.SelectedIndex == -1) { return; } FormSchoolEdit FormSE = new FormSchoolEdit(); FormSE.SchoolCur = Schools.List[listSchools.SelectedIndex]; FormSE.ShowDialog(); if (FormSE.DialogResult != DialogResult.OK) { return; } FillList(); }