(1)DataTables("出货明细").DeleteFor("公司名称 = '" & e.DataRow("公司名称") & "'")
Dim s As String = Tables("订单明细").current("出货明细")
Dim cs As String
For i As Integer = 0 To s.split(chr(10)).length - 1
Dim r As Row = Tables("出货明细").AddNew()
r("公司名称") = Tables("订单明细").current("公司名称")
r("编号") = Tables("订单明细").current("编号")
r("出货时间") = s.split(chr(10))(i).split(" ")(0)
r("出货数量") = s.split(chr(10))(i).split(" ")(1)
Next
(2)Dim dr As DataRow
Dim cl As String = e.DataCol.Name
If cl = "商品名称" Orelse cl = "编号" Orelse cl = "颜色" Then
dr = DataTables("报价明细").Find("商品名称 = '" & e.DataRow("商品名称") & "' And 编号 = '" & e.DataRow("编号") & "' And 颜色 = '" & e.DataRow("颜色") & "'")
If dr IsNot Nothing Then
e.DataRow("单位") = dr("单位")
e.DataRow("单价") = dr("单价")
End If
End If
请帮帮忙这两段语言合成在一起,这是关连到三个表上的功能
1,“订单明细”表
2,“报价明细”表
3,“出货明细”表
都用在DataColChanged中,编了一个晚上,就是出现错码了,请帮帮谢谢