private void butAdd_Click(object sender, System.EventArgs e) { SchoolClass cur = new SchoolClass(); FormSchoolClassEdit FormS = new FormSchoolClassEdit(cur); FormS.IsNew = true; FormS.ShowDialog(); if (FormS.DialogResult != DialogResult.OK) { return; } changed = true; FillList(); listMain.SelectedIndex = -1; }
private void listMain_DoubleClick(object sender, System.EventArgs e) { if (listMain.SelectedIndex == -1) { return; } FormSchoolClassEdit FormS = new FormSchoolClassEdit(SchoolClasses.List[listMain.SelectedIndex]); FormS.ShowDialog(); if (FormS.DialogResult != DialogResult.OK) { return; } changed = true; FillList(); }
private void listMain_DoubleClick(object sender, System.EventArgs e) { if(listMain.SelectedIndex==-1) return; FormSchoolClassEdit FormS=new FormSchoolClassEdit(SchoolClasses.List[listMain.SelectedIndex]); FormS.ShowDialog(); if(FormS.DialogResult!=DialogResult.OK){ return; } changed=true; FillList(); }
private void butAdd_Click(object sender, System.EventArgs e) { SchoolClass cur=new SchoolClass(); FormSchoolClassEdit FormS=new FormSchoolClassEdit(cur); FormS.IsNew=true; FormS.ShowDialog(); if(FormS.DialogResult!=DialogResult.OK){ return; } changed=true; FillList(); listMain.SelectedIndex=-1; }