K3WIES 笔记

金蝶 k3 BOS开发百问百答 :

http://www.docin.com/p-509465103.html

vb6.0工业单据 增加工具栏按钮:

Private Sub m_BillTransfer_LoadBillEnd(ByVal ShowType As Long)
      With m_BillTransfer.BillForm.tlbTool.Buttons
        .Add .Count + 1, "BtnIn", "引入数据", , 21
    End With
    iRow = 0
    iCol = 0
End Sub
Private Sub m_BillTransfer_RetEvents(ByVal Para As KFO.IDictionary)
 
    'TODO: 请在此处添加代码响应事件 RetEvents
On Error GoTo ErrHandle
    If Para("EventID") = "Bill_ButtonClick" And Para("EventIDProp") = 1 Then
        If Para("Para")("Button").Key = "BtnIn" Then
        ‘触发内容

            
            
        End If
    End If
        
    Exit Sub
ErrHandle:
    'MsgBox Err.Description, vbInformation, "金蝶提示"
End Sub

 工业单据:装载数据之后触发事件(下推生成单据或者修改单据)

Private Sub m_BillTransfer_EndBillFormActive()

end sub

 

工业单据如何获取字段的顺序号

 

    '**********************************
'返回单据字段顺序(isEntry True是表体)
'**********************************
Public Function GetCtlIndexByFld(ByVal fldName As String, Optional ByVal isEntry As Boolean = False) As Long
Dim ctlIdx As Long
Dim i As Integer
Dim isFind As Boolean
Dim vValue As Variant
fldName = UCase(fldName)
isFind = False
With m_BillTransfer
If isEntry Then
    For i = LBound(.EntryCtl) To UBound(.EntryCtl)
    If UCase(.EntryCtl(i).FieldName) = fldName Then
    ctlIdx = .EntryCtl(i).FCtlOrder
    isFind = True
    Exit For
    End If
    Next i
Else
    For i = LBound(.HeadCtl) To UBound(.HeadCtl)
    If UCase(.HeadCtl(i).FieldName) = fldName Then
    ctlIdx = .HeadCtl(i).FCtlIndex
    isFind = True
    Exit For
    End If
    Next i
End If
End With
If isFind = True Then
GetCtlIndexByFld = ctlIdx
Else
GetCtlIndexByFld = 0
End If
End Function

 

新单开发 装载数据事件(下推单据后装载分录数据过程中触发事件):

Private Sub m_BillInterface_AfterFillRow(ByVal lRow As Long, ByVal dctPage As KFO.IDictionary, ByVal dctEntryData As KFO.IDictionary, ByVal dctLink As KFO.IDictionary)
  end sub

 

posted @ 2016-03-19 10:11  swallow123  阅读(1130)  评论(0编辑  收藏  举报