R
Ronald S. Cook
Hey guys,
The below code works fine, BUT appends a comma to my (Please Select).
Anybody know how I can get around this?
Thanks... and sorry is in VB.NET (I wish I was in C# on this project)... but
you guys are WAY more helpful than the VB forum.
Dim _Query As IEnumerable(Of Employee) = _
From e In dc.Employees _
Where e.Lookup.LookupCode <> "INA" _
Order By e.EmployeeLastName, _
e.EmployeeFirstName
Dim _Employee As New Employee()
_Employee.EmployeeLastName = "(Please Select)"
_Employee.EmployeeFirstName = ""
Dim _List As IList(Of Employee) = _Query.ToList()
_List.Insert(0, _Employee)
Dim _QueryWithSelect As IEnumerable = _
(From xyz In _List _
Select xyz.EmployeeId, _
EmployeeName = xyz.EmployeeLastName & ", " &
xyz.EmployeeFirstName).ToList()
Return _QueryWithSelect
The below code works fine, BUT appends a comma to my (Please Select).
Anybody know how I can get around this?
Thanks... and sorry is in VB.NET (I wish I was in C# on this project)... but
you guys are WAY more helpful than the VB forum.
Dim _Query As IEnumerable(Of Employee) = _
From e In dc.Employees _
Where e.Lookup.LookupCode <> "INA" _
Order By e.EmployeeLastName, _
e.EmployeeFirstName
Dim _Employee As New Employee()
_Employee.EmployeeLastName = "(Please Select)"
_Employee.EmployeeFirstName = ""
Dim _List As IList(Of Employee) = _Query.ToList()
_List.Insert(0, _Employee)
Dim _QueryWithSelect As IEnumerable = _
(From xyz In _List _
Select xyz.EmployeeId, _
EmployeeName = xyz.EmployeeLastName & ", " &
xyz.EmployeeFirstName).ToList()
Return _QueryWithSelect