private void butAdd_Click(object sender, System.EventArgs e) { SchoolCourse cur=new SchoolCourse(); FormSchoolCourseEdit FormS=new FormSchoolCourseEdit(cur); FormS.IsNew=true; FormS.ShowDialog(); if(FormS.DialogResult!=DialogResult.OK){ return; } changed=true; FillList(); listMain.SelectedIndex=-1; }
private void butAdd_Click(object sender, System.EventArgs e) { SchoolCourse cur = new SchoolCourse(); FormSchoolCourseEdit FormS = new FormSchoolCourseEdit(cur); FormS.IsNew = true; FormS.ShowDialog(); if (FormS.DialogResult != DialogResult.OK) { return; } changed = true; FillGrid(); }
private void listMain_DoubleClick(object sender, System.EventArgs e) { if (listMain.SelectedIndex == -1) { return; } FormSchoolCourseEdit FormS = new FormSchoolCourseEdit(SchoolCourses.List[listMain.SelectedIndex]); FormS.ShowDialog(); if (FormS.DialogResult != DialogResult.OK) { return; } changed = true; FillList(); }
private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { if (gridMain.GetSelectedIndex() == -1) { return; } if (IsSelectionMode) { CourseSelected = _listSchoolCourses[gridMain.GetSelectedIndex()]; DialogResult = DialogResult.OK; return; } FormSchoolCourseEdit FormS = new FormSchoolCourseEdit(_listSchoolCourses[gridMain.GetSelectedIndex()]); FormS.ShowDialog(); if (FormS.DialogResult != DialogResult.OK) { return; } changed = true; FillGrid(); }
private void listMain_DoubleClick(object sender, System.EventArgs e) { if(listMain.SelectedIndex==-1) return; FormSchoolCourseEdit FormS=new FormSchoolCourseEdit(SchoolCourses.List[listMain.SelectedIndex]); FormS.ShowDialog(); if(FormS.DialogResult!=DialogResult.OK){ return; } changed=true; FillList(); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { if(gridMain.GetSelectedIndex()==-1) { return; } if(IsSelectionMode) { CourseSelected=SchoolCourses.List[gridMain.GetSelectedIndex()]; DialogResult=DialogResult.OK; return; } FormSchoolCourseEdit FormS=new FormSchoolCourseEdit(SchoolCourses.List[gridMain.GetSelectedIndex()]); FormS.ShowDialog(); if(FormS.DialogResult!=DialogResult.OK) { return; } changed=true; FillGrid(); }