Sel ect Case e.DataCol.Name
Case "数量"
Dim dr As DataRow = DataTables("fa piao库存").find(" 名称 = '" & e.DataRow("名称") & "' and 规格 = '" & e.DataRow("规格") & "' and 单位 = '" & e.DataRow("单位") & "' ")
If dr IsNot Nothing Then
'Dim df As DataRow = DataTables("fa piao主表").Find(" AutoID ='" & e.DataRow("MainID") & "'")
'If df("业务类型") = "收进fa piao" Then
Dim drs As List(Of DataRow) = DataTables("fa piao主表").Select(" 业务类型 = '收进fa piao' ")
Dim Values As new List(of String )
For Each dr2 As DataRow In drs
Values.Add(dr2("autoid"))
Next
msgbox(0)
Dim strs() As String = Values.ToArray
msgbox(1)
Dim drs1 As List(Of DataRow) = DataTables("fa piao主表").Select(" 业务类型 = '开出fa piao' ")
Dim Values1 As new List(of String)
For Each dr1 As DataRow In drs1
Values1.Add(dr1("autoid"))
Next
Dim strs1() As String = Values1.ToArray
dr("入库数量") = DataTables("fa piao内容明细表").SQLCompute("sum(数量)"," 名称 = '" & e.DataRow("名称") & "' and 规格 = '" & e.DataRow("规格") & "' and 单位 = '" & e.DataRow("单位") & "' and MainID in strs ")
'ElseIf df("业务类型") = "开出fa piao" Then
dr("出库数量") = DataTables("fa piao内容明细表").SQLCompute("sum(数量)"," 名称 = '" & e.DataRow("名称") & "' and 规格 = '" & e.DataRow("规格") & "' and 单位 = '" & e.DataRow("单位") & "' and MainID in strs1 ")
dr.save
End If
End Sele ct
提示说:strs 、 strs1附近有错误