Select Case e.DataCol.Name Case "实出仓_常品M" Dim Filter As String = "[订单SX编码] = '" & e.DataRow("订单SX编码") & "' And [DNP编码] = '" & e.DataRow("DNP编码") & "'" Dim drs As List(of DataRow) = DataTables("DK订单").Select(Filter) '获得此产品所有订单 For Each dr As DataRow In drs dr("已交M") = DataTables("出货规划").Compute("Sum(实出仓_常品M)", Filter) Next End Select