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