Ejemplo n.º 1
0
        private void btAdd_Click(object sender, EventArgs e)
        {
            var addEditEmployee = new AddEditEmployee();

            addEditEmployee.FormClosing += AddEditEmployee_FormClosing;
            addEditEmployee.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btEdit_Click(object sender, EventArgs e)
        {
            if (dgvMain.SelectedRows.Count == 0)
            {
                MessageBox.Show("Zaznacz pracownika którego dane chcesz edytować");
                return;
            }

            var addEditEmployee = new AddEditEmployee(Convert.ToInt32(dgvMain.SelectedRows[0].Cells[0].Value));

            addEditEmployee.FormClosing += AddEditEmployee_FormClosing;
            addEditEmployee.ShowDialog();
        }