If I undestand your question correctly, you need to change the condition. If you search by name the include only
WHERE Emp_Id=@empid
in the WHERE clause and if you search by date then
WHERE Modify = @modifydate
The example code is different from what you have used since you should never concatenate values directly to the SQL statement. This leaves you for example open to SQL injections.
For more discussion, have a look at
Properly executing database operations[
^]