示例#1
0
        public void ShowStadions()
        {
            List <string>  list    = new List <string>();
            StadionControl stadion = new StadionControl();

            list = stadion.StadionNameReturning();
            comboBox1.Items.AddRange(list.ToArray());
        }
示例#2
0
        private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            List <string>  list    = new List <string>();
            StadionControl stadion = new StadionControl();

            list = stadion.ShowStadionByName(comboBox1.SelectedItem.ToString());
            listBox1.Items.AddRange(list.ToArray());
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            StadionControl control = new StadionControl();

            if ((textBox1.Text != null) && (textBox2.Text != null) && (textBox3.Text != null))
            {
                control.AddStadion(textBox1.Text, Convert.ToInt32(textBox2.Text), Convert.ToSingle(textBox3.Text));
                this.Hide();
            }
            else
            {
                label7.Visible = true;
            }
        }