Пример #1
0
        private void ViewBackNo(object sender, EventArgs e)
        {
            if (backNoListBox.SelectedItems.Count != 0)
            {
                int backNo = -1;

                backNo = Convert.ToInt32(backNoListBox.SelectedItems[0].Text);
                if (backNo >= 0)
                {
                    BackNoListForm backNoList = new BackNoListForm(Year.ClubID, Year.Year, backNo);
                    backNoList.FormClosing += new FormClosingEventHandler(this.RefreshOnClose);
                    backNoList.Visible = true;
                }
            }
        }
Пример #2
0
        // If back number is selected from list, loads existing back number form, closes current.
        private void ViewBackNo(object sender, EventArgs e)
        {
            if (riderListBox.SelectedItems.Count != 0)
            {
                int backNo = -1;

                if (int.TryParse(riderListBox.SelectedItems[0].Text, out backNo) && AbandonChanges())
                {
                    BackNoListForm form = new BackNoListForm(ActiveHorse.ClubID, ActiveHorse.Year, backNo);
                    form.Visible = true;
                    this.Close();
                }
            }
        }
Пример #3
0
 private void NewBackNo(object sender, EventArgs e)
 {
     if (!IsNew)
     {
         BackNoListForm backNoList = new BackNoListForm(Year.ClubID, Year.Year);
         backNoList.FormClosing += new FormClosingEventHandler(this.RefreshOnClose);
         backNoList.Visible = true;
     }
 }