private void aktualizaceHracu() { gols = GolTable.Select(); int i = 1; foreach (Gol g in gols) { string[] row = { i.ToString(), g.Hrac.Jmeno.ToString(), HracTable.SelectTym(g.Hrac.IdHrac).TymJmeno, g.PocetGolu.ToString() }; var lVI = new ListViewItem(row); goly.Items.Add(lVI); i += 1; } }
private void pridejGol_Click(object sender, EventArgs e) { ComboboxItem selectedItem = (ComboboxItem)strelec.SelectedItem; if (selectedItem == null) { MessageBox.Show("Vloz hrace !"); return; } if (string.IsNullOrWhiteSpace(casGolu.Text)) { MessageBox.Show("Vloz cas !"); return; } if (GolTable.Insert(zapasID, selectedItem.Value, Int32.Parse(casGolu.Text)) < 0) { MessageBox.Show("Hrac nehral !"); } }