TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Help Method Returning Link Data
Jan 14 2013 12:55 PM
I am having trouble trying to figure out to create a function or method that will return the linkdata from below. I have anonmous type below. How to write the logic to return the linq query result set below. This link will be use in several places below via selected query. Can someone assist me?
var Query = (from tblContact in DataAccess.ContactDataSet.Tables[0].AsEnumerable()
join tblContactType in DataAccess.ContactTypeDataSet.Tables[0].AsEnumerable()
on Convert.ToInt32(tblContact["ContactID"]) equals Convert.ToInt32(tblContactType["ContactID"])
join refContactType in DataAccess.RefContactTypeDataset.Tables[0].AsEnumerable()
on Convert.ToInt32(tblContactType["ContactType"]) equals
Convert.ToInt32(refContactType["ContactTypeID"])
join refContactStatus in DataAccess.RefContactStatusDataset.Tables[0].AsEnumerable()
on Convert.ToInt32(tblContactType["ContactStatus"]) equals
Convert.ToInt32(refContactStatus["ContactStatusID"])
where tblContact["Location"] != DBNull.Value
join refCityLocation in DataAccess.RefCityLocationDataSet.Tables[0].AsEnumerable()
on Convert.ToInt32(tblContact["Location"]) equals Convert.ToInt32(refCityLocation["LocationID"])
where tblContactType["ContactType"] != DBNull.Value &&
Convert.ToInt32(tblContactType["ContactType"]) == contactType
select new
{
ContactID = tblContact["ContactID"],
Title = tblContact["Title"],
FirstName = tblContact["FirstName"],
MiddleName = tblContact["MiddleName"],
LastName = tblContact["LastName"]
}).ToList();
Reply
Answers (
0
)
C# previous month access
problem in simple reading from datagridview