金蝶核算项目插件
2016-04-18 10:16
375 查看
'delete from t_ThirdPartyComponent where FTypeID=101 and FTypeDetailID =4 and FComponentName ='baseitemtest.myclass'
'insert into t_ThirdPartyComponent(FTypeID, FTypeDetailID, FIndex, FComponentName)
'values (101,4, 1, 'baseitemtest.myclass')
'-- 101表示基础资料,4表示物料
'-- 该sql表示当编辑物料时,加载Test.MeterialPlug插件,若要该插件在所有核算项目编辑中都加载,只要将FTypeDetailID设为0即可
'--select * from t_ThirdPartyComponent where ftypeid=101
'定义插件对象接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_K3BaseDataEvents As K3BaseDataEvents.ItemEvents
Private m_EditInterface As K3BaseDataEvents.ItemEditInterface 'API接口
Public Sub Show(ByVal oBillTransfer As ItemEvents)
'接口实现
'注意: 此方法必须存在, 请勿修改
Set m_K3BaseDataEvents = oBillTransfer
Set m_EditInterface = m_K3BaseDataEvents.EditInterface
End Sub
Private Sub m_K3BaseDataEvents_AfterGridLoad()
Dim i As Integer
i = m_EditInterface.GetRowNumber("F_114")
m_EditInterface.SetRowValue i, "哦也"
m_EditInterface.SetRowCaption i, "" & m_EditInterface.ItemClassId & "," & m_EditInterface.ParentID & ","
m_EditInterface.SetRowLock i
i = m_EditInterface.GetRowNumber("FSPID")
MsgBox m_EditInterface.ReadID(i)
m_EditInterface.SetRowValue i, "仓位", 50 '给基础资料类型字段赋值
End Sub
Private Sub m_K3BaseDataEvents_BeforeF7(ByVal lRow As Long, strFilterReturn As String)
MsgBox strFilterReturn
' SELECT * FROM t_StockPlace WHERE FSPID <> 0 And FDeleted=0 AND FDetail=1 ORDER BY FNumber
strFilterReturn = " 1=2" '失败
End Sub
Private Sub m_K3BaseDataEvents_BeforeList(ByVal lRow As Long, strSqlReturn As String)
'MsgBox strSqlReturn
'strSqlReturn = "select FNumber,FName from t_Item where FItemClassID =4"
End Sub
Private Sub m_K3BaseDataEvents_BeforeSave(Cancel As Boolean)
MsgBox "BeforeSave"
End Sub
Private Sub m_K3BaseDataEvents_GridChange(ByVal lRow As Long)
MsgBox "GridChange"
End Sub
Private Sub m_K3BaseDataEvents_OnPressF7(ByVal lRow As Long, RetCol As KDVBF.ReturnCollection, Cancel As Boolean)
MsgBox "OnPressF7"
End Sub
--注册脚本
delete from t_ThirdPartyComponent where FTypeID=101 and FTypeDetailID =4 and FComponentName ='baseitemtest.myclass'
insert into t_ThirdPartyComponent(FTypeID, FTypeDetailID, FIndex, FComponentName)
values (101,4, 1, 'baseitemtest.myclass')
-- 101表示基础资料,4表示物料
-- 该sql表示当编辑物料时,加载Test.MeterialPlug插件,若要该插件在所有核算项目编辑中都加载,只要将FTypeDetailID设为0即可
--select * from t_ThirdPartyComponent where ftypeid=101
引用插件
K3BaseDataEvents.dll#K3BaseDataEvents
'delete from t_ThirdPartyComponent where FTypeID=101 and FTypeDetailID =4 and FComponentName ='baseitemtest.myclass'
'insert into t_ThirdPartyComponent(FTypeID, FTypeDetailID, FIndex, FComponentName)
'values (101,4, 1, 'baseitemtest.myclass')
'-- 101表示基础资料,4表示物料
'-- 该sql表示当编辑物料时,加载Test.MeterialPlug插件,若要该插件在所有核算项目编辑中都加载,只要将FTypeDetailID设为0即可
'--select * from t_ThirdPartyComponent where ftypeid=101
'定义插件对象接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_K3BaseDataEvents As K3BaseDataEvents.ItemEvents
Private m_EditInterface As K3BaseDataEvents.ItemEditInterface 'API接口
Public Sub Show(ByVal oBillTransfer As ItemEvents)
'接口实现
'注意: 此方法必须存在, 请勿修改
Set m_K3BaseDataEvents = oBillTransfer
Set m_EditInterface = m_K3BaseDataEvents.EditInterface
End Sub
Private Sub m_K3BaseDataEvents_AfterGridLoad()
Dim i As Integer
i = m_EditInterface.GetRowNumber("F_114")
m_EditInterface.SetRowValue i, "哦也"
m_EditInterface.SetRowCaption i, "" & m_EditInterface.ItemClassId & "," & m_EditInterface.ParentID & ","
m_EditInterface.SetRowLock i
i = m_EditInterface.GetRowNumber("FSPID")
MsgBox m_EditInterface.ReadID(i)
m_EditInterface.SetRowValue i, "仓位", 50 '给基础资料类型字段赋值
End Sub
Private Sub m_K3BaseDataEvents_BeforeF7(ByVal lRow As Long, strFilterReturn As String)
MsgBox strFilterReturn
' SELECT * FROM t_StockPlace WHERE FSPID <> 0 And FDeleted=0 AND FDetail=1 ORDER BY FNumber
strFilterReturn = " 1=2" '失败
End Sub
Private Sub m_K3BaseDataEvents_BeforeList(ByVal lRow As Long, strSqlReturn As String)
'MsgBox strSqlReturn
'strSqlReturn = "select FNumber,FName from t_Item where FItemClassID =4"
End Sub
Private Sub m_K3BaseDataEvents_BeforeSave(Cancel As Boolean)
MsgBox "BeforeSave"
End Sub
Private Sub m_K3BaseDataEvents_GridChange(ByVal lRow As Long)
MsgBox "GridChange"
End Sub
Private Sub m_K3BaseDataEvents_OnPressF7(ByVal lRow As Long, RetCol As KDVBF.ReturnCollection, Cancel As Boolean)
MsgBox "OnPressF7"
End Sub
--注册脚本
delete from t_ThirdPartyComponent where FTypeID=101 and FTypeDetailID =4 and FComponentName ='baseitemtest.myclass'
insert into t_ThirdPartyComponent(FTypeID, FTypeDetailID, FIndex, FComponentName)
values (101,4, 1, 'baseitemtest.myclass')
-- 101表示基础资料,4表示物料
-- 该sql表示当编辑物料时,加载Test.MeterialPlug插件,若要该插件在所有核算项目编辑中都加载,只要将FTypeDetailID设为0即可
--select * from t_ThirdPartyComponent where ftypeid=101
引用插件
K3BaseDataEvents.dll#K3BaseDataEvents
相关文章推荐
- android圆角进度条的实现
- USB描述符
- 利用background-attachment做视差滚动效果
- Wireshark Lua: 一个从RTP抓包里导出H.264 Payload,变成264裸码流文件(xxx.264)的Wireshark插件
- 深入理解PHP之:Nginx 与 FPM 的工作机制
- jQuery队列控制方法详解queue()/dequeue()/clearQueue()
- 初学python(对比java语言不同) 第十一篇
- Splunk虽无Hadoop撑腰但却分析和运维兼备
- iOS中plist的详解
- 巩固C语言(九)----静态库文件的生成和使用、劫持技术
- Splunk虽无Hadoop撑腰但却分析和运维兼备
- 【Hibernate】——持久化对象的三种状态
- 如何在Eclipse中快速添加main方法
- Ajax请求中async:false/true的作用分析
- Android数字签名
- 读《贝叶斯思维:统计建模的Python学习法》en:<Think Bayes>
- 用label绘制圆点
- MVCC 多版本并发控制
- svn的介绍
- Nginx+Resin实现高性能JAVA平台搭建