private void NewHorse(object sender, EventArgs e) { if (!IsNew) { HorseListForm horseList = new HorseListForm(Year.ClubID, Year.Year); horseList.FormClosing += new FormClosingEventHandler(this.RefreshOnClose); horseList.Visible = true; } }
// If horse is selected, refreshes to existing horse form. private void ViewHorse(object sender, EventArgs e) { if (backNoListBox.SelectedItems.Count != 0) { int horseNo = -1; horseNo = Convert.ToInt32(backNoListBox.SelectedItems[0].SubItems[3].Text); if (horseNo >= 0) { HorseListForm horseList = new HorseListForm(Year.ClubID, Year.Year, horseNo); horseList.FormClosing += new FormClosingEventHandler(this.RefreshOnClose); horseList.Visible = true; } } }
private void ViewHorse(object sender, EventArgs e) { if (AbandonChanges()) { int horseNo = VerifyExistsHorseNo(horseComboBox.SelectedValue.ToString()); if (horseNo > 0) { HorseListForm form = new HorseListForm(ActiveBackNo.ClubID, ActiveBackNo.Year, horseNo); form.Visible = true; this.Close(); } } }