private void DataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { DataGridView table = (DataGridView)sender; if (e.RowIndex == -1) { return; } Soutez a = _soutez.SelectId((int)table.Rows[e.RowIndex].Cells["id_souteze"].Value); using (NovaSoutezF detail = new NovaSoutezF(a, _soutez)) { if (detail.ShowDialog() == DialogResult.OK) { RefreshList(); } } }
public Soutez SelectId(int id) { return(_isoutez.SelectId(id)); }