private void addBtn_Click(object sender, EventArgs e)
        {
            switch (tabControl.SelectedIndex)
            {
            case 0:
                Form addEmpForm = new EmployeeRegistryForm(data);
                addEmpForm.ShowDialog();
                break;

            case 1:
                Form addDepForm = new DepartmentRegistryForm(data);
                addDepForm.ShowDialog();
                break;

            case 2:
                Form addRoomForm = new RoomRegistryForm(data);
                addRoomForm.ShowDialog();
                break;
            }
        }
        private void updateBtn_Click(object sender, EventArgs e)
        {
            switch (tabControl.SelectedIndex)
            {
            case 0:
                Employee selectedEmployee = employeesDataGridView.CurrentRow.DataBoundItem as Employee;
                Form     empEditForm      = new EmployeeRegistryForm(data, selectedEmployee);
                empEditForm.ShowDialog();
                break;

            case 1:
                Department selectedDepartment = departmentsDataGridView.CurrentRow.DataBoundItem as Department;
                Form       depEditForm        = new DepartmentRegistryForm(data, selectedDepartment);
                depEditForm.ShowDialog();
                break;

            case 2:
                Room selectedRoom = roomsDataGridView.CurrentRow.DataBoundItem as Room;
                Form roomEditForm = new RoomRegistryForm(data, selectedRoom);
                roomEditForm.ShowDialog();
                break;
            }
        }