销售渠道表,datacolchanged
Select Case e.DataCol.Name
Case "商品名称","渠道级别"
If e.DataRow.IsNull("商品名称") OrElse e.DataRow.IsNull("渠道级别") Then
e.DataRow("供货价") = Nothing
Else
Dim dr As DataRow
dr = DataTables("产品表").Find("[商品名称] = '" & e.DataRow("商品名称") & "'")
If dr IsNot Nothing Then '如果找到了同名的产品行,也就是dr不是Nothing
e.DataRow("供货价") = dr(e.DataRow("渠道级别") & "报价")
End If
End If
End Select