




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、1、 如何在工具欄上添加多級審核的按鈕?在m_billinterface_menubarinitialize事件里添加如下代碼即可。set otool = m_billinterface.menubar.bostools(mnueditmulticheck)with otool .caption = 多級審核 .tooltiptext = 多級審核 .description = 多級審核 .begingroup = false .toolpicture = app.path + checker.bmp .setpicture 0, vbbuttonfaceend withset oband =
2、 omenubar.bosbands(bandtoolbar)oband.bostools.insertbefore mnufileprint, otool 將菜單對象插入指定工具欄2、 如何在顯示一張bos單據(jù)的同時給它賦值?要想在顯示bos單據(jù)的同時給它賦值,關(guān)鍵是在顯示前要購建m_billinterface的data包,這樣在顯示這張同據(jù)的時候,程序會解析data包,并將里面的值賦到單據(jù)界面上來。 dim dctdata as kfo.dictionary dim datasrv as object dim otableinfo as object set datasrv = m_bil
3、linterface.k3lib.createk3object(k3classtpl.datasrv) datasrv.classtypeid = lclasstypeid lclasstypeid 需要彈出單據(jù)的id set otableinfo = datasrv.tableinfo set dctdata = datasrv.getemptybill 然后將當(dāng)前單據(jù)數(shù)據(jù)包中需要的數(shù)據(jù)填充到dctdata的對應(yīng)字段 在以上語句執(zhí)行后,dctdata(“page2”)里只有一行表結(jié)構(gòu)(即表體只有一行) 賦表頭的值 dctdata(page1)(otableinfo(map)(ftext)(f
4、fld) = m_billinterface.getfieldvalue(ftext) dctdata(page1)(otableinfo(map)(fdeptid)(ffld) = m_billinterface.getfieldvalue(fdeptid, -1, enu_valuetype_ffld) dctdata(page1)(otableinfo(map)(fdeptid)(ffnd) = m_billinterface.getfieldvalue(fdeptid, -1, enu_valuetype_ffnd) dctdata(page1)(otableinfo(map)(fde
5、ptid)(fdsp) = m_billinterface.getfieldvalue(fdeptid, -1, enu_valuetype_fdsp) 賦表體的值 dim opage2 as object for i = 1 to m_billinterface.data(page2).ubound - 1 set opage2 = dctdata(page2)(1).cloneall dctdata(page2).add opage2 添加到 dcdata dctdata(page2)(i + 1)(otableinfo(map)(findex2)(ffld) = i + 1 更改分錄號
6、next for i = 1 to m_billinterface.data(page2).ubound 物料 fitemid dctdata(page2)(i)(otableinfo(map)( fitemid )(ffld) = m_billinterface.getfieldvalue(fitemid , i, enu_valuetype_ffld) dctdata(page2)(i)(otableinfo(map)( fitemid )(fdsp) = m_billinterface.getfieldvalue(fitemid , i, enu_valuetype_fdsp) dctd
7、ata(page2)(i)(otableinfo(map)( fitemid )(ffnd) = m_billinterface.getfieldvalue(fitemid , i, enu_valuetype_ffnd) 物料名稱 fbaseproperty dctdata(page2)(i)(otableinfo(map)(fbaseproperty)(ffld) = m_billinterface.getfieldvalue(fbaseproperty, i, enu_valuetype_ffld) dctdata(page2)(i)(otableinfo(map)(fbaseprope
8、rty)(fdsp) = m_billinterface.getfieldvalue(fbaseproperty, i, enu_valuetype_fdsp) dctdata(page2)(i)(otableinfo(map)(fbaseproperty)(ffnd) = m_billinterface.getfieldvalue(fbaseproperty, i, enu_valuetype_ffnd) 計量單位 funitid dctdata(page2)(i)(otableinfo(map)( funitid )(ffld) = m_billinterface.getfieldvalu
9、e(funitid , i, enu_valuetype_ffld) dctdata(page2)(i)(otableinfo(map)( funitid )(fdsp) = m_billinterface.getfieldvalue(funitid , i, enu_valuetype_fdsp) dctdata(page2)(i)(otableinfo(map)( funitid )(ffnd) = m_billinterface.getfieldvalue(funitid , i, enu_valuetype_ffnd) 數(shù)量 fqty dctdata(page2)(i)(otablei
10、nfo(map)(fqty)(ffld) = m_billinterface.getfieldvalue(fqty, i, enu_valuetype_ffld) next set obj = createobject(k3singleclassbill.classinfomanager) with obj .datasrv = datasrv .ischeckright = true .show , , , dctdata end with3、 如何在插件中實現(xiàn)選單的功能?調(diào)用bos單據(jù)m_billinterface.billctl.doselbill lclasstypeid (原單的cl
11、asstypeid)調(diào)用工業(yè)單據(jù)m_billinterface.billctl.doseloldbill lclasstypeid (原單的classtypeid)4、 在插件中以新增、修改和查看方式打開另一單據(jù) * 功能:顯示bos單據(jù),顯示的方式為新增、修改和瀏覽參數(shù):lclasstypeid顯示bos單據(jù)的id* private sub showbill(byval lclasstypeid as long) dim odatasrv as object dim obill as object on error goto err_ctr set odatasrv = m_billinte
12、rface.k3lib.createk/3object(k3classtpl.datasrv)odatasrv.classtypeid = lclasstypeid set obill = createobject(k3singleclassbill.classinfomanager)with obill .datasrv = odatasrv .isnetcontrol = true .ischeckright = true .show * show 參數(shù)類型 第一個參數(shù) optional byval lid as long = 0 ;描述修改或查看的單據(jù)id 第二個參數(shù) optional
13、byval bshowgroup as boolean = false ;如是基礎(chǔ)資料時,是否顯示分組 第三個參數(shù) optional byval billstatus as long = enu_billstatus_new ;顯示方式 0查看;1新增;2修改 第四個參數(shù) optional byval dctdata as kfo.dictionary 單據(jù)初始值 * end with set odatasrv = nothing set obill = nothing exit suberr_ctr:set odatasrv = nothing set obill = nothingend
14、sub5、 顯示bos序時簿并返回選中的值* 功能:顯示bos序時簿并返回選中的值參數(shù):lclasstypeid顯示bos單據(jù)的id* private function showlistbyreturn(byval lclasstypeid as long) as object dim odatasrv as objectdim objlookup as objecton error goto err_ctrset odatasrv = m_billinterface.k3lib.createk3object(k3classtpl.datasrv)odatasrv.classtypeid =
15、lclasstypeidif odatasrv.showfilter then set objlookup = createobject(k3classlookup.billlookup) objlookup.classtypeid = lclasstypeid set objlookup.datasrv = odatasrv objlookup.lookup set showlistbyreturn = objlookup.vectreturn end ifset odatasrv = nothingset objlookup = nothingexit functionerr_ctr:se
16、t odatasrv = nothingset objlookup = nothingend function6、 如何在序事簿中得到選中行的記錄集值?dim vectselect as kfo.vectordim rs as adodb.recordsetset vectselect=m_listinterface. getselectedbillinfoset rs=m_listinterface.datasrv. getbilldetail(vectselect(1)(fid)7、 將當(dāng)前單據(jù)轉(zhuǎn)化為另一單據(jù),并無界面保存數(shù)據(jù) *功能:將當(dāng)前單據(jù)轉(zhuǎn)化為另一單據(jù),并無界面保存數(shù)據(jù)參數(shù):lcl
17、asstypeid顯示bos單據(jù)的id* private sub nouisavebill(byval lclasstypeid as long) dim odatasrv as objectdim otableinfo as objectdim obill as objectdim odata as objectdim osrv as objectdim opage2 as objectdim i as longon error goto err_ctrset odatasrv = m_billinterface.k3lib.createk3object(k3classtpl.datasrv
18、)odatasrv.classtypeid = lclasstypeidset otableinfo = odatasrv.tableinfoset odata = odatasrv.getemptybillfor i = 1 to m_billinterface.data(page2).ubound - 1 set opage2 = odata(page2)(1).cloneall odata(page2).add opage2 添加到 dcdata odata(page2)(i + 1)(_-0001_findex2)(ffld) = i + 1 更改分錄號nextfor i = 1 to
19、 m_billinterface.data(page2).ubound odata(page2)(i)(otableinfo(map)(fitemid)(ffld) = m_billinterface.getfieldvalue(fitemid, i, enu_valuetype_ffld) odata(page2)(i)(otableinfo(map)(fitemid)(ffnd) = m_billinterface.getfieldvalue(fitemid, i, enu_valuetype_ffnd) odata(page2)(i)(otableinfo(map)(fitemid)(f
20、dsp) = m_billinterface.getfieldvalue(fitemid, i, enu_valuetype_fdsp) next set osrv = createobject(k3mclass.billupdate) i = osrv.save(mmts.propsstring, odatasrv.classtype, odatasrv.classtypeentry, odatasrv.tableinfo, odata, odatasrv.dctlink)set odatasrv = nothingset obill = nothing exit suberr_ctr: m
21、sgbox err.descriptionset odatasrv = nothingset obill = nothingend sub【備注】1、k/3 bos保存方法save的參數(shù)描述:public function save(byval sdsn as string, _ byval dctclasstype as kfo.dictionary, _ byval vctclasstypeentry as kfo.vector, _ byval dcttableinfo as kfo.dictionary, _ byref dctdata as kfo.dictionary, _ byval dctlinks as kfo.dictionary) as long/*/*描述
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 股權(quán)未出資轉(zhuǎn)讓協(xié)議書
- 期貨交易居間合同
- 鄉(xiāng)村文化旅游土地開發(fā)利用合同
- 工業(yè)互聯(lián)網(wǎng)安全檢測服務(wù)協(xié)議
- 制造企業(yè)ERP系統(tǒng)升級改造方案
- 醫(yī)療美容項目合作協(xié)議書8篇
- 全國人教版初中信息技術(shù)八年級下冊第二單元第7課《度量圖形》教學(xué)設(shè)計
- 發(fā)展邏輯思維學(xué)會理性表達-《邏輯的力量》(大單元教學(xué)設(shè)計)高二語文同步備課系列(統(tǒng)編版選擇性必修上冊)
- 第8課《珍愛環(huán)境·活動三 廢舊電器的回收和利用》 教學(xué)設(shè)計 2023-2024學(xué)年粵教版《綜合實踐活動》七年級下冊
- 后拋實心球 教學(xué)設(shè)計-2023-2024學(xué)年高一上學(xué)期體育與健康人教版必修第一冊
- 瑜伽課程合同轉(zhuǎn)讓協(xié)議書范本
- 個人經(jīng)營性貸款合同模板
- 2025年山東化工職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測試近5年常考版參考題庫含答案解析
- 課題申報參考:生活服務(wù)數(shù)字化轉(zhuǎn)型下社區(qū)生活圈建設(shè)理念、模式與路徑研究
- 舞臺機械基礎(chǔ)知識培訓(xùn)
- 人教版數(shù)學(xué)八年級下冊 第16章 二次根式 單元測試(含答案)
- 甘肅省民航機場集團招聘筆試沖刺題2025
- 中學(xué)班主任培訓(xùn)內(nèi)容
- 心理學(xué)基礎(chǔ)知識考試參考題庫500題(含答案)
- 北師大版小學(xué)三年級數(shù)學(xué)下冊全冊教案
- DCMM練習(xí)題練習(xí)試題
評論
0/150
提交評論