If e.DataCol.Name="接收状态" Then
Dim ss,st As String
ss = "工作|物品|账号|其它"
For Each s As String In ss.split("|")
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "S elect Count(*) From {YW_人事交接" & s & "交接} Where 编号 = '" & e.DataRow("编号") & "' AND 接收日期 IS NULL "
If cmd.ExecuteScalar() <> 0
st = "未完成"
End If
Next
If st = "未完成"
e.DataRow("接收状态")= st
Else
e.DataRow("接收状态")= "已完成"
End If
End If
[此贴子已经被作者于2018/12/10 10:53:57编辑过]