What is Northwind.EmployeesRow
Posted
by Anthony
on Stack Overflow
See other posts from Stack Overflow
or by Anthony
Published on 2010-04-22T14:08:00Z
Indexed on
2010/04/22
14:13 UTC
Read the original article
Hit count: 422
ASP.NET
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
© Stack Overflow or respective owner