Select Case e.DataCol.Name Case "第1刀_不良项目","第2刀_不良项目","第3刀_不良项目","第4刀_不良项目","第5刀_不良项目","第6刀_不良项目","第7刀_不良项目","第8刀_不良项目","第9刀_不良项目","第10刀_不良项目" Dim count As Integer = 0 For i As Integer = 1 To 10 If e.DataRow.IsNull("第" & i & "刀_不良项目") = False Then count += 1 End If Next Dim dr As DataRow = DataTables("半成品检验记录表").find("流水号 = '"& e.datarow("流水号") &"'") If count >= 2 Then dr("制程判定") = "不合格" Else dr("制程判定") = "合格" End If End Select
|