Hello,

I have 1 database which is stored Service History for staff.
And i also use add button (to add service history for staff) and come out the latest service history such as Basic Salary , job and position. Not include Record Type (like Increment/Hired and so on)

How to select latest date automatically use linq. Pls help me dear.
Below is my code. Pls add select latest date for me. TQ.

Using db As New AutoPayDAL.AutoPayDataContext(sDBCon)

Dim Emaster As AutoPayDAL.ServiceHistory = (From rec In db.ServiceHistories _
Where rec.EmpNo = lblEmployee.Text And rec.Sequence = "1").SingleOrDefault