IronPython插件服务插件原创
4人赞赏了该文章
84次浏览
未经作者许可,禁止转载编辑于2024年12月09日 15:55:37
# 引入clr运行库 import clr # 添加对cloud插件开发的常用组件的引用 clr.AddReference('System') clr.AddReference('System.IO') clr.AddReference('System.Data') clr.AddReference('Kingdee.BOS') clr.AddReference('Kingdee.BOS.Core') clr.AddReference('Kingdee.BOS.App') clr.AddReference('Kingdee.BOS.DataEntity') clr.AddReference('Kingdee.BOS.Contracts') clr.AddReference('Kingdee.BOS.ServiceHelper') clr.AddReference('System.Windows.Forms') clr.AddReference('mscorlib') clr.AddReference('Kingdee.K3.BD.Contracts') # 导入cloud基础库中的常用实体对象(分命名空间导入,不会递归导入) from Kingdee.BOS import * from Kingdee.BOS.Core import * from Kingdee.BOS.Core.Bill import * from Kingdee.BOS.Core.Bill.PlugIn import * from Kingdee.BOS.Core.DependencyRules import * from Kingdee.BOS.Core.DynamicForm.PlugIn import * from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import * from Kingdee.BOS.Core.DynamicForm import * from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import * from Kingdee.BOS.Core.Metadata.EntityElement import * from Kingdee.BOS.Core.Metadata.FieldElement import * from Kingdee.BOS.Orm.DataEntity import * from Kingdee.BOS.KDThread import * from Kingdee.BOS.App.Data import * from Kingdee.BOS.ServiceHelper import * from Kingdee.BOS.JSON import * from Kingdee.BOS.Util import * from System import * from System.Collections import * from System.Collections.Generic import * from System.Text import * from System.ComponentModel import * from System.IO import * from System.Data import * def EndOperationTransaction(e): if this.FormOperation.Operation =='Cancel': #自定义操作直接用代码进行判断 for dataEntity in e.DataEntitys: fid =dataEntity["ID"] #获取单据ID sql="""update test_t_db set FDOCUMENTSTATUS='E',FCANCELSTATUS='B' where fid={0} """.format(fid) #处理刷库 DBUtils.ExecuteScalar(this.Context,sql,None)
赞 4
4人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!