private void button1_Click(object sender, EventArgs e) { VlozitHrace vlozit = new VlozitHrace(new Hraci(), _hraci); vlozit.ShowDialog(this); RefreshList(); }
private void DataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { DataGridView table = (DataGridView)sender; if (e.RowIndex == -1) { return; } int id = ((int)table.Rows[e.RowIndex].Cells["hID"].Value); Hraci a = _hraciDomain.SelectPodleID(id); using (VlozitHrace detail = new VlozitHrace(a, _hraci)) { if (detail.ShowDialog() == DialogResult.OK) { RefreshList(); } } }
private void button1_Click(object sender, EventArgs e) { VlozitHrace form = new VlozitHrace(new ItemHrac(), _id, this); form.ShowDialog(); }