DataColChanged事件
Dim dr As DataRow = e.DataRow
Select Case e.DataCol.Name
Case "部品ID","工程","项目略"
If dr.IsNull("部品ID") OrElse dr.IsNull("工程") OrElse dr.IsNull("项目略") Then
dr("部品工程项目")= Nothing
dr("绩效工时H")= Nothing
Else
dr("部品工程项目") = dr("部品ID") + dr("工程") + dr("项目略")
Dim drfind As DataRow = DataTables("工程和工时").Find(CExp("部品ID='{0}' and 工程='{1}'",dr("部品ID") ,dr("工程")))
If drfind IsNot Nothing AndAlso drfind.IsNull(dr("项目略")) = False Then
dr("绩效工时H")= drfind(dr("项目略")) / 60
End If
End If
End Select