var query = from row in dtInvoice.AsEnumerable()
group row by new { InvNo = row.Field< string >( "InvNo" ),
EmpUNID = row.Field< decimal >( "EmployeeUNID" )} into grp
orderby grp.Key.InvNo
select new
{
Key = grp.Key,
InvNo = grp.Key.InvNo,
EmpID = grp.Key.EmpUNID,
TotalCost = grp.Sum(r => r.Field< decimal >( "TotalCost" )),
TotalRev = grp.Sum(r => r.Field< decimal >( "TotalRev" ))
};
Thursday, November 12, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment