What is Northwind.EmployeesRow
- by Anthony
I am doing a tutorial where you use a templatefield in the gridview control to call a function.
I don't understand the code for the function. What is the object Northwind.EmployeesRow?
This is the tutorial I am doing.
http://msdn.microsoft.com/en-us/library/bb288032%28v=MSDN.10%29.aspx#aspnett12ustmpfldsvb_topic5
And this is the code for the function.
Protected Function DisplayDaysOnJob(ByVal employee As Northwind.EmployeesRow) As String
If employee.IsHireDateNull() Then
Return "Unknown"
Else
' Returns the number of days between the current
' date/time and HireDate
Dim ts As TimeSpan = DateTime.Now.Subtract(employee.HireDate)
Return ts.Days.ToString("#,##0")
End If
End Function