老师:您好! 我有一道工艺流程,共有12道工序,gxdm表示为“c01,c02.....c12”,所有员工作业都用扫码枪扫码,表中的每一条清单条码是每一张图纸的标识码。接收图纸(gxdm=c00),不算做开工工序。我的目的是查询一下哪张图纸没开工,思路是图纸接收后,表中工序c00就有了,但c01至c02,都没有扫进,这就表示这张图纸还没有开工,还要统计没有开工的图纸数量。我的代码是如下:但我用了,字符串包含的表达式,运行不了,请帮助解决。谢谢!
Dim b As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim gzh As String = b.Value
Dim tt2 As Integer = 0
Dim n As Integer
Dim v As String
Dim gxm As String = "('c01','c02','c03','c04','c05','c06','c07','c08','c09','c10','c11','c12')"
Dim gx As String
Dim grs As List(Of DataRow)
Dim qdm1 As String
Dim qr As DataRow
grs = DataTables("亚中车间扫码表").Select("工作令号='" & gzh & "'", "gxdm")
Dim sr As Date
Dim tt1 As Integer = 0
Dim dr As DataRow
For Each gr As DataRow In grs
qdm1 = gr("清单条码编码")
dr = DataTables("亚中车间扫码表").find("清单条码编码='" & qdm1 & "'")
If dr IsNot Nothing Then
gx = dr("gxdm")
If "gx Not In gxm" = True Then
tt1 = tt1 + 1
End If
MessageBox.Show(tt1) ‘统计个数,工序为空的个数
End if
Next
If tt1 = 12 Then
tt2 = tt1 + 1 ’如果这12道工序都没有就表示未开工,统计为开工的图纸数量
End If