private void button1_Click(object sender, EventArgs e)
        {
            // Create a new instance of the Form2 class
            Form_Zamestnanec settingsForm = new Form_Zamestnanec();

            settingsForm.Init(this);
            // Show the settings form
            settingsForm.Show();
        }
        private void metroButton2_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("Nejprve vyber řádek");
                return;
            }

            // Create a new instance of the Form2 class
            Form_Zamestnanec settingsForm = new Form_Zamestnanec();

            // Show the settings form
            settingsForm.Show();

            settingsForm.InitEdit(
                (int)this.dataGridView1.SelectedRows[0].Cells[0].Value,
                this
                );
        }