?? cbill_show.cls
字號(hào):
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 2 'RequiresTransaction
END
Attribute VB_Name = "CBill_Show"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_Description = "This is MiddleWareEvents Interface Class [ AfterMultiCheck ], made by K3BOSPLUGINSWIZAED"
'名稱: AfterMultiCheck
'描述: 多級(jí)審核的邏輯,如果當(dāng)前級(jí)別是業(yè)務(wù)審核,則調(diào)用審核接口
'版本: V10.4
'作者: Christin
'//參數(shù)
'/*@ sDsn K/3連接字符串
'/*@ nClassID Long, 業(yè)務(wù)對(duì)象事務(wù)類型
'/*@ nFBillID Long, 業(yè)務(wù)單據(jù)內(nèi)碼
'/*@ nFPage Long, 業(yè)務(wù)單據(jù)頁(yè)碼
'/*@ nFBillEntryID, 業(yè)務(wù)單據(jù)分錄內(nèi)碼
'/*@ dctBillCheckRecord, 審核路線數(shù)據(jù)包
'返回值:
'創(chuàng)建時(shí)間: 2007-04-04
Public Function AfterMultiCheck(ByVal Sdsn As String, _
ByVal nClassID As Long, _
ByVal nFBillID As Long, _
Optional ByVal nFPage As Long = 1, _
Optional ByVal nFBillEntryID As Long = 0, _
Optional ByVal dctBillCheckRecord As KFO.Dictionary) As Boolean
GetObjectContext.SetAbort
On Error GoTo HError
Dim bCancel As Boolean
Dim rs As ADODB.Recordset
Dim ConnectString As String
Dim m_cnn As ADODB.Connection
If dctBillCheckRecord Is Nothing Then
Err.Raise 5, "BOSV104MShow.CBill_Show.AfterMultiCheck", "缺少參數(shù): dctBillCheckRecord "
End If
If Not dctBillCheckRecord.Lookup("FMode") Then
Err.Raise 5, "BOSV104MShow.CBill_Show.AfterMultiCheck", " 缺少參數(shù):FMode "
End If
If Not dctBillCheckRecord.Lookup("OverBusinessLevel") Then
Err.Raise 5, "BOSV104MShow.CBill_Show.AfterMultiCheck", " 缺少參數(shù):OverBusinessCheck "
End If
'判斷當(dāng)前操作為審核或反審核
bCancel = IIf(dctBillCheckRecord("FMode") = 2, True, False) '0審核,2反審核
'判斷當(dāng)前審核級(jí)次是否為業(yè)務(wù)審核
If Not dctBillCheckRecord("OverBusinessLevel") Then '業(yè)務(wù)審核
GoTo HExit
End If
'由于sDsn不是標(biāo)準(zhǔn)ADO連接串,需從中截取出標(biāo)準(zhǔn)連接串
ConnectString = Left(Sdsn, InStr(1, Sdsn, "}") - 1)
ConnectString = Mid(ConnectString, 16)
Set m_cnn = New ADODB.Connection
m_cnn.Open ConnectString
m_cnn.CursorLocation = adUseClient
m_cnn.CommandTimeout = 0
bCancel = IIf(dctBillCheckRecord("FMode") = 2, True, False) '0審核,2反審核
If bCancel Then
Set rs = m_cnn.Execute("select 1 from t_BOS200000001 where fvoucherid_id>0 and FID=" & CStr(nFBillID))
If rs.RecordCount > 0 Then
Err.Raise 5, "BOSV104MShow.CBill_Show.AfterMultiCheck", "單據(jù)已經(jīng)做帳,不允許反審核!"
GoTo HExit
End If
Set rs = m_cnn.Execute("select 1 from t_BOS200000001entry2 where FFinishQty>0 and FID=" & CStr(nFBillID))
If rs.RecordCount > 0 Then
Err.Raise 5, "BOSV104MShow.CBill_Show.AfterMultiCheck", "單據(jù)被其他單據(jù)關(guān)聯(lián),不允許反審核!"
GoTo HExit
End If
m_cnn.Execute ("Update t_BOS200000001 set FStatus=0 where FID=" & CStr(nFBillID))
Else
m_cnn.Execute ("Update t_BOS200000001 set FStatus=1 where FID=" & CStr(nFBillID))
End If
HExit:
GetObjectContext.SetComplete
AfterMultiCheck = True
If Not m_cnn Is Nothing Then m_cnn.Close
Set m_cnn = Nothing
Set rs = Nothing
Exit Function
HError:
GetObjectContext.SetAbort
AfterMultiCheck = False
Err.Raise 5, "BOSV104MShow.CBill_Show.AfterMultiCheck", Err.Description
If Not m_cnn Is Nothing Then m_cnn.Close
Set m_cnn = Nothing
Set rs = Nothing
End Function
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -