If the idea is to define a value for a key for a new record in the database, normally the application does not do this. Instead the database assigns the key when a record is added.
For example if two users are adding a row at the same time, based on your code they could try to use the same ID value for an employee. This would result into key violation or to a duplicate record, depending on your schema definitions.
If this is a SQL Server application, you could utilize
IDENTITY (Property) (Transact-SQL) - SQL Server | Microsoft Docs[
^] for the Id column to define it as auto-incremented. After the insert, you can get the inserted calue using
@@IDENTITY (Transact-SQL) - SQL Server | Microsoft Docs[
^]