private void button1_Click(object sender, EventArgs e) { Ekipe ekipe = new Ekipe(); this.Hide(); ekipe.Show(); }
private void ekipeButton_Click(object sender, EventArgs e) { Ekipe Ekipe = new Ekipe(); this.Hide(); Ekipe.Show(); }
private void dodajButton_Click(object sender, EventArgs e) { string ime = imeTextbox.Text; string mesto = mestoTextbox.Text; int leto = Convert.ToInt32(letoTextbox.Text); string trener = trenerTextbox.Text; con.Open(); MySqlCommand com = con.CreateCommand(); com.CommandType = CommandType.Text; com.CommandText = "INSERT INTO ekipe (ime, naslov, leto_ustanovitve, trener) VALUES ('" + ime + "', '" + mesto + "', '" + leto + "', '" + trener + "' )"; com.ExecuteNonQuery(); MessageBox.Show("Ekipa dodana!"); Ekipe Ekipe = new Ekipe(); Ekipe.Show(); this.Hide(); }
private void dodajButton_Click(object sender, EventArgs e) { string ime = imeTextbox.Text; string mesto = mestoTextbox.Text; int leto_ustanovitve = Convert.ToInt32(letoTextbox.Text); string trener = trenerTextbox.Text; int i = comboBox1.SelectedIndex + 1; con.Open(); MySqlCommand com = con.CreateCommand(); com.CommandType = CommandType.Text; com.CommandText = "UPDATE ekipe SET ime = '" + ime + "', naslov = '" + mesto + "', leto_ustanovitve = '" + leto_ustanovitve + "', trener = '" + trener + "' WHERE id = '" + i + "'"; com.ExecuteNonQuery(); MessageBox.Show("Posodobitev uspesna."); Ekipe Ekipe = new Ekipe(); Ekipe.Show(); this.Hide(); con.Close(); com.Dispose(); }