private void viewClassBtn_Click(object sender, EventArgs e) { if (classListBox.SelectedItems.Count != 0) { bool loadNew = true; int classNo = -1; if (isChanged) loadNew = AbandonChanges(); if (loadNew) classNo = Convert.ToInt32(classListBox.SelectedItems[0].Text); if (classNo >= 0) { ClassInstanceForm classInstance = new ClassInstanceForm(aClass.clubID, aClass.year, aClass.showNo, classNo); classInstance.Visible = true; this.Close(); } } }
private void prevBtn_Click(object sender, EventArgs e) { if(!isFirst) { bool loadNew = true; if (isChanged) loadNew = AbandonChanges(); if (loadNew) { ClassInstanceForm classInstance = new ClassInstanceForm(aClass.clubID, aClass.year, aClass.showNo, aClass.GetPrev()); classInstance.Visible = true; this.Close(); } } }