Dim query = From order In Temp_Data.AsEnumerable().Where(Function(x) x.Field(Of String)("VesselType") = param_vesseltype And x.Field(Of String)("VoyageType") = param_voyagetype) Group order By VesselID = order.Field(Of String)("VesselID"), VesselName = order.Field(Of String)("VesselName") Into g = Group Select New With { .VesselName = VesselName, .VesselId = VesselID, .tot_ifo = g.Sum(Function(order) order.Field(Of Double)("Tot_Ifo")), .tot_ifols = g.Sum(Function(order) order.Field(Of Double)("Tot_Ifols")), .tot_mdols = g.Sum(Function(order) order.Field(Of Double)("Tot_mdols")), .tot_mdo = g.Sum(Function(order) order.Field(Of Double)("Tot_mdo")), .Co2 = g.Sum(Function(order) order.Field(Of Double)("Co2")), .Nox = g.Sum(Function(order) order.Field(Of Double)("Nox")), .Sox = g.Sum(Function(order) order.Field(Of Double)("Sox")) }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)