Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            AddTrener vlozit = new AddTrener(new Trener(), _trener);

            vlozit.ShowDialog(this);
            RefreshList();
        }
Beispiel #2
0
        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["ID_Trenera"].Value);
            Trener a  = _trenerDomain.SelectId(id);

            using (AddTrener detail = new AddTrener(a, _trener))
            {
                if (detail.ShowDialog() == DialogResult.OK)
                {
                    RefreshList();
                }
            }
        }