Dim iNum
iNum =Mid(Item.Parent.Parent.CaptionText,2,1)
If iNum = "0" Or iNum = "2" Or iNum = "4" Or iNum = "5" Or iNum = "6" Or iNum = "7" Then
Dim value
Dim sPrgName
sPrgName = Mid(Item.Parent.Parent.CaptionText,2,4)
value = CheckLineState(sPrgName)
If Not value Then Exit Sub
End If
WritePrgOperiteRecord Item.ObjectName,128,0
============================================================================
Function CheckLineState(sEntityName)
Dim sPrgLineC
Dim sPrgLineCA
Dim sUserGroup
sUserGroup = HMIRuntime.Tags("@NOTP::$WorkPost").Read
If sUserGroup="管理员" Then
CheckLineState =True
Exit Function
End If
sPrgLineC = HMIRuntime.Tags("@NOTP::L" & sEntityName & ".TankCauTime").Read
sPrgLineCA = HMIRuntime.Tags("@NOTP::L" & sEntityName & ".TankCATime").Read
If sPrgLineC <= 0 Or sPrgLineCA <= 0 Then
CheckLineState = False
MsgBox "清洗时间超时",,"提示"
Else
CheckLineState =True
End If
End Function

评论列表: