private void buttonBack_Click(object sender, EventArgs e) { var form = new FormTrebovaniya(vidsporta, rayon, cena, cenaekip, vozrast); form.Show(); this.Hide(); }
private void buttonNext_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(textBoxVozrast.Text)) { MessageBox.Show("Заполните поле", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } List <int> vozrast = new List <int>(); try { vozrast.Add(Convert.ToInt32(textBoxVozrast.Text)); } catch (FormatException ex) { MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var form = new FormTrebovaniya(vidsporta, rayon, cena, cenaekip, vozrast); form.Show(); this.Hide(); }