'//lock 文件
文件在一開始時就要先存
'Lock Document
If (SourceDoc.Lock_Flag(0) = "Y") Then
If (SourceDoc.WhoLock(0)<> Session.UserName) Then
Messagebox("目前 " + SourceDoc.WhoLock(0) + " 正在簽核此文件, 請稍後再簽核")
Call uidoc.close
Exit Sub
End If
Else
SourceDoc.Lock_Flag = "Y"
SourceDoc.WhoLock = session.username
Call SourceDoc.save(True, True)
End If
在最後關閉前再解lock
'//unlock
SourceDoc.Lock_Flag = "N"
SourceDoc.WhoLock = ""
uidoc.AutoReload = True
Call uidoc.Reload
Call uidoc.save
SourceDoc.saveoptions = "0"
Call uidoc.close
沒有留言:
張貼留言