private void ShowGamer_Load(object sender, EventArgs e) { listBox1.Text = null; Action.StadionControl gc = new Action.StadionControl(); List <string> list = new List <string>(); list = gc.ShowStadion(); string[] lists = list.ToArray <string>(); listBox1.Items.AddRange(lists); }
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e) { // повернення значень гравця в поля для зміни Action.StadionControl gm = new Action.StadionControl(); List <string> values = new List <string>(); values = gm.ReturnValues(comboBox4.Text.ToString()); textBox1.Text = values.ElementAt(0); textBox2.Text = values.ElementAt(1); textBox3.Text = values.ElementAt(2); }
private void button1_Click(object sender, EventArgs e) { if ((comboBox4.SelectedIndex > -1)) { Action.StadionControl gc = new Action.StadionControl(); gc.DeleteStadion(comboBox4.SelectedItem.ToString()); this.Hide(); } else { label7.Visible = true; } }
public void ShowInComboBox() { Action.StadionControl gc = new Action.StadionControl(); List <string> fnst = new List <string>(); fnst = gc.StadionNameReturning(); int j = 0; foreach (string i in fnst) { comboBox4.Items.Insert(j, i); j++; } }
private void button1_Click(object sender, EventArgs e) { if ((comboBox4.SelectedIndex > -1) && (textBox1.Text != null) && (textBox2.Text != null) && (textBox3.Text != null)) { string result; Action.StadionControl gc = new Action.StadionControl(); result = gc.ModifyStadion(comboBox4.SelectedItem.ToString(), textBox1.Text, Convert.ToInt32(textBox2.Text), Convert.ToDouble(textBox3.Text)); label12.Text = result; this.Hide(); } else { label7.Visible = true; } }