コード例 #1
0
        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();
        }
コード例 #2
0
        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
                );
        }