Ejemplo n.º 1
0
        private void Remove_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value);

            if (MessageBox.Show($"{trainList[id].ToString()}", "Вы действительно хотите удалить запись", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                trainList.Reamove(id);
                update();
            }
        }