Sum group by Code and Dept

looks more like a group by and group member aggregation

NON LINQ - DataTableVar.DefaultView.ToTable(…, Loop, Filter, Aggregation
LINQ: From d in DataTableVar.AsEnumerable Group d …