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
wenkket sethalam
1.6k
128
5k
How to populate Data to Dataset1 using Linq quary in C#
Dec 26 2017 5:59 AM
Hi
I am trying to set data to Dataset1 using Linq query, But the data source how to give I don't know
can anyone help me..
What I did..
1. I had created Dataset1 and given some column names
2. In Form1 write a Linq query to assign data to Dataset1 table, like below...
DataClasses1DataContext DB =
new
DataClasses1DataContext();
var Quary1 = (from Gv
in
DB.Salses
join gi
in
DB.Items on Gv.Item_ID equals gi.ID
join Gp
in
DB.Item_Groups on Gv.Product_Group_ID equals Gp.ID
where Gv.Sno == txsno.Text
select
new
{
ID = Gv.ID,
Group_Name = Gp.Item_Group_Name,
Item_Name = gi.Item_Name,
Qntity = Gv.Unit,
Price = Gv.Rate,
Total = Gv.Total_Amount,
gid = Gv.Product_Group_ID,
}).ToList();
now here I want to give Dataset1 Datasource = Quary1
How to give
Reply
Answers (
1
)
Can I use GC.Collect() in c# events & functions?
Create a rating stars using bootstrap font awesome using c#