You are passing empID
as an int
type parameter and later you are using it as a type in your parameters. For example.
cmd.Parameters.AddWithValue("@LeaveType", empID.LeaveType);
I believe you have to pass your object probably of EmployeeLeave
type in your method
GetLeaveRecord(int empID)
Or you may get your object based on the ID
in your method and then use that in your parameters
2
solved ‘int’ does not contain a definition and no extension method