Ejemplo n.º 1
0
        private void módosítás_Click(object _sender, EventArgs _event)
        {
            if ((table.SelectedRows.Count == 0) || (table.SelectedRows[0].Index == data.Rows.Count))
            {
                MessageBox.Show("Nincs kiválasztva induló!", "Hiba", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }
            ;

            foreach (DataGridViewRow current in table.Rows)
            {
                if (table.SelectedRows[0] == current)
                {
                    Form_Induló induló = new Form_Induló(new Induló(current.Cells[0].Value.ToString(),
                                                                    current.Cells[1].Value.ToString(),
                                                                    current.Cells[2].Value.ToString(),
                                                                    current.Cells[3].Value.ToString(),
                                                                    current.Cells[4].Value.ToString(),
                                                                    Convert.ToInt32(current.Cells[5].Value)));
                    induló.ShowDialog();
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        private void hozzáadás_Click(object _sender, EventArgs _event)
        {
            Form_Induló induló = new Form_Induló();

            induló.ShowDialog();
        }