datacolchanged事件
Select Case e.DataCol.Name
Case "车间名称","工序明细"
If e.DataRow.IsNull("车间名称") OrElse e.DataRow.IsNull("工序明细") Then
e.DataRow("工时明细") = Nothing
Else
e.DataRow("工时明细") = DataTables("工序明细").Compute("sum(工时)", "车间 = '" & e.DataRow("车间名称") & "' and 工序名称 in ('" & e.DataRow("工序明细").Replace(",", "','") & "')")
End If
End Select