private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dataGridView = sender as DataGridView;

            if (dataGridView == null)
            {
                return;
            }

            int       id = (int)dataGridView.CurrentRow.Cells[1].Value;
            pracownik pr = new pracownik(id);

            pr.Show();
            this.Close();
        }
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dataGridView = sender as DataGridView;
            if (dataGridView == null)
                return;

                int id = (int)dataGridView.CurrentRow.Cells[1].Value;
                pracownik pr = new pracownik(id);
                pr.Show();
                this.Close();
        }