K3BOS插件開發(fā)常見技巧_第1頁
K3BOS插件開發(fā)常見技巧_第2頁
K3BOS插件開發(fā)常見技巧_第3頁
K3BOS插件開發(fā)常見技巧_第4頁
K3BOS插件開發(fā)常見技巧_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、K3BOS 插件開發(fā)常見技巧以下是為大家整理的K3bos插件開發(fā)常見技巧的相關(guān)范文,本文關(guān)鍵 詞為K3bos,插件,開發(fā),常見,技巧,何在,工具欄,添加,多級(jí),您可以從右 上方搜索框檢索更多相關(guān)文章,如果您覺得有用,請(qǐng)繼續(xù)關(guān)注我們并 推薦給您的好友,您可以在教育文庫中查看更多范文。1、如何在工具欄上添加多級(jí)審核的按鈕?在 m_billInterface_menubarInitialize 事件里添加如下代碼即可。setoTool=m_billInterface.menubar.bosTools(withoTool.caption=多級(jí)審核 .ToolTipText二多級(jí)審核.Descripti

2、on=多級(jí)審核.begingroup=False.Toolpicture=App.path+.setpicture0,vbbuttonFaceendwithsetoband=omenubar.bosbands(oband.bosTools.lnsertbefore將菜單對(duì)象插入指定工具欄2、如何在顯示一張 bos 單據(jù)的同時(shí)給它賦值?要想在顯示 bos 單據(jù)的同時(shí)給它賦值 ,關(guān)鍵是在顯示前要購建 m_billinterface 的 data 包,這樣在顯示這張同據(jù)的時(shí)候 ,程序會(huì)解析 data 包,并將里面的值賦到單據(jù)界面上來。DimdctDataAskfo.DictionaryDimdata

3、srvasobjectDimoTableinfoasobjectsetDatasrv=m_billlnterface.K3Lib.createK3object(Datasrv.classTypelD=lc lassTypelDlclassTypelD 需 要 彈 出 單 據(jù) 的 lDsetoTablelnfo=Datasrv.TablelnfosetdctData二Datasrv.getemptybill然后將當(dāng)前單據(jù)數(shù)據(jù)包中需要的 數(shù)據(jù)填充到 dctdata 的對(duì)應(yīng)字段在以上語句執(zhí)行后,dctdata(“page2”)里只有一行表結(jié)構(gòu)(即表體 只有一行)賦表頭的值dctData(m_bill

4、Interface.getFieldValue(dctData(m_billInterface.getFieldValue(dctData(m_billInterface.getFieldValue(dctData( m_billInterface.getFieldValue(賦表體的值Dimopage2AsobjectFori=1Tom_billInterface.Data(setopage2=dctData(dctData(添加到 deDatadctData(更改分錄號(hào)nextFori=1Tom_billInterface.Data(物料 FItemIDdctData(FItemIDm_b

5、illInterface.getFieldValue(dctData(FItemIDm_billInterface.getFieldValue(dctData(FItemIDm_billInterface.getFieldValue(物料名稱 fbaseproperty dctData(m_billInterface.getFieldValue(dctData(m_billInterface.getFiel dValue(dctData(m_billInterface.getFieldValue(計(jì)量單位 FunitIDdctData(FunitIDm_billInterface.getFie

6、ldValue(dctData(FunitIDm_bill Interface.getFieldValue(dctData(FunitIDm_billInterface.getFieldValue( 數(shù)量 FQtydctData(m_billInterface.getFieldValue(nextsetobj=createobject(withobj.datasrv=datasrv=.IscheckRight=True.show,dctDataendwith3、如何在插件中實(shí)現(xiàn)選單的功能?調(diào)用 bos 單據(jù)m_billlnterface.billctl.DoselbilllclassTypel

7、D(原單的 classTypelD)調(diào) 用工業(yè)單據(jù)m_billlnterface.billctl.DoseloldbilllclassTypelD(原單的 classTypelD)4、在插件中以新增、修改和查看方式打開另一單據(jù)功能:顯示 bos 單據(jù),顯示的方式為新增、修改和瀏覽參數(shù):IcIassTypelD顯示 bos 單據(jù)的 ID privatesubshowbill(byVallclassTypeIDAsLong)DimoDatasrvAsobjectDimobiIIAsobjectonerrorgoToerr_ctrsetoDatasrv=m_biIIInterface.K3Lib.c

8、reateK/3object(oDatasrv.cIassTypeID=IcIassTypeIDsetobiII=createobject(withobiII.Datasrv=oDatasrv.IsnetcontroI=True.IscheckRight=True.show*show 參數(shù)類型第一個(gè)參數(shù)optionalbyValllDAsLong=0;描述修改或查看的單據(jù)ID 第二個(gè)參數(shù) optionalbyValbshowgroupAsboolean二False;如是基礎(chǔ)資料 時(shí),是否顯示分組第三個(gè)參數(shù) optionalbyValbillstatusAsLong二enu_billstatus

9、_new;顯示方 式 0 查 看 ; 1 新 增 ; 2 修 改 第 四 個(gè) 參 數(shù) optionalbyValdctDataAsKFo.Dictionary 單 據(jù) 初 始 值*endwithsetoDatasrv=nothingsetobill=nothingexitsuberr_ctr:setoDatasrv=nothingsetobill=nothingendsub5、顯示 bos 序時(shí)簿并返回選中的值功能:顯示bos序時(shí)簿并返回選中的值參數(shù):IcIassTypelD顯 示 bos 單據(jù)的 IDprivateFunctionshowListbyReturn(byVaIIcIassTyp

10、elDAsLong)AsobjectDimoDatasrvAsobjectDimobjLookupAsobjectonerrorgoToerr_ctrsetoDatasrv=m_biIIlnterface.K3Lib.createK3object(oDatasrv.cIassTypelD=IcIassTypelDlfoDatasrv.showfiIterThensetobjLookup=createobject(objLookup.cIassTypelD=IcIassTypelDsetobjL ookup.Datasrv=oDatasrvobjLookup.LookupsetshowListb

11、yReturn=objLookup.VectReturnendlfsetoDatasrv=nothingsetobjLookup=nothing exitFunctionerr_ctr: setoDatasrv=nothingsetobjLookup=nothingendFunction6、如何在序事簿中得到選中行的記錄集值? Dimvectselectaskfo.vectorDimrsasadodb.recordset setvectselect=m_Listinterface.getselectedbillInfo setrs=m_Listinterface.datasrv.getbill

12、Detail(vectselect(1)(7、將當(dāng)前單據(jù)轉(zhuǎn)化為另一單據(jù),并無界面保存數(shù)據(jù)功能:將當(dāng)前單據(jù)轉(zhuǎn)化為另一單據(jù),并無界面保存數(shù)據(jù)參數(shù):IcIassTypelD顯示 bos 單據(jù)的 IDprivatesubnouIsavebill(byVallclassTypeIDAsLong)DimoDatasrvAsobjectDimoTabIeInfoAsobjectDimobiIIAsobjectDimoDataAsobjectDimosrvAsobj ectDimopage2AsobjectDimiAsLongonerrorgoToerr_ctr setoDatasrv=m_billInter

13、face.K3Lib.createK3object(oDatasrv.classTypeID=lclassTypeIDsetoTableInfo=oDatasrv.TableInfosetoData=oDatasrv.getem ptybillFori=1Tom_billInterface.Data(setopage2=oData(oData(添力口至U deDataoData(更改分錄號(hào)nextFori=1Tom_billInterfaee.Data(oData(m_billInterfaee.getFieldValue(oData(m_billInterfaee.getFieldValue

14、(oData(以下是為大家整理的K3bos插件開發(fā)常見技巧的相關(guān)范文,本文關(guān) 鍵詞為K3bos,插件,開發(fā),常見,技巧,何在,工具欄,添加,多級(jí),您可以從 右上方搜索框檢索更多相關(guān)文章,如果您覺得有用,請(qǐng)繼續(xù)關(guān)注我們 并推薦給您的好友,您可以在教育文庫中查看更多范文。m_billInterface.getFieldValue(nextsetosrv=createobject(i=osrv.save(mmTpsstring,oDatasrv.classType,oDatasrv.classTypeentry, oDatasrv.TableInfo,oData,oDatasrv.dctL

15、ink)setoDatasrv=nothingsetobill=nothingexitsuberr_ctr:msgboxerr.DescriptionsetoDatasrv二nothingsetobill二nothingendsub【備注】1、K/3bos保存方法save的參數(shù)描述:publicFunctionsave(byValsDsnAsstring,_byValdctclassTypeAsKFo.Dictionary,_byValvctclassTypeentryAsKFo.Vecto r,_byValdctTableinfoAsKFo.Dictionary,_byRefdctDataA

16、sKFo.Dictionary,_byValdctLinksAsKFo.Dictionary)AsLong*/*描述:單據(jù)保存/*參數(shù):/*dctclassTypeKFo.Dictionary 單 據(jù) 整 體 信 息 模 板/*dctDataKFo.Dictionary 單據(jù)數(shù)據(jù)包/*dctLinkKFo.Dictionary 選 單 關(guān) 系 模 板 , 無 選 單 為 nothing/*dctTableInfoKFo.Dictionary 單 據(jù) 字 段 模 板 信 息 /*sDsnstringK/3 標(biāo)準(zhǔn)數(shù)據(jù)庫連接串7*vctclassTypeentryKFo.Vector 單據(jù)體模板信息/*備注:*/2、使用此方法時(shí)插件要添加 mmTs。8、如何在插件中獲取當(dāng)前系統(tǒng)字符連接串? 一、連接串獲取方式:(注意不支持調(diào)試,調(diào)試的話可以用實(shí)際 連接串代替)privateDeclareFunctiongetcurrentprocessldLib獲取連接串publicFunctiongetpropsstring()AsstringDim

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論