代码如下 : 是代码的问题么?
Select e.DataCol.Name
Case = "商城","客户名称","店铺名称","_Identify"
If e.DataRow.IsNull("商城") OrElse e.DataRow.IsNull("客户名称") OrElse e.DataRow.IsNull("店铺名称") Then
e.DataRow("取货商品名") = Nothing
Else
Dim bh As String = "QF-" &e.DataRow("商城") & "-" &e.DataRow("店铺名称") & "-" & e.DataRow("客户名称") & "-" & e.DataRow("_Identify") '生成该月编号的前缀
Dim idx As Integer
idx = e.DataTable.Compute("Count(取货商品名)","取货商品名 like '" & bh _
& "*' and [_identify] < " & e.DataRow("_identify") & " ") +1
e.DataRow("取货商品名") = bh
End If
End Select
If e.DataCol.Name = "客户名称" Then '发生变化的是客户名吗?
Dim dr As DataRow
dr = DataTables("客户资料").Find("name2 = " & "'" & e.DataRow("客户名称") & "'" )
If dr IsNot Nothing '如果找到, 则设置各列内容
e.DataRow("邮箱")= dr("qq") & "@QQ.com"
End If
End If
Dim aa As Integer= e.DataRow("应取数量")-e.DataRow("已取数量")
If e.DataRow("应取数量") <> 0 And aa >0 Then
e.DataRow ("状态")= 2
Else If e.DataRow("应取数量") <> 0 And aa <=0 Then
e.DataRow ("状态")= 6
Else
Dim tbl As Table = Tables("取货录入表")
If tbl.Current IsNot Nothing Then
Tables("取货录入表").Current("状态") = e.DataRow("状态")
End If
此主题相关图片如下:??.png