




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
AccountingInformation
實現(xiàn)單表的增加、刪除、保存與檢索功能Single-tabletoadd,delete,saveandretrievefunctions
掌握會計軟件簡單應用開發(fā)方法Tomasterasimpleaccountingsoftwareapplicationdevelopmentmethodology
學習目的與要求LearningObjectivesandRequirements3-5
會計軟件簡單應用開發(fā)SimpleAccountingSoftwareApplicationDevelopment教學內容5.1數(shù)據(jù)窗口控件簡介AboutDataWindowcontrols
5.2
數(shù)據(jù)窗口控件函數(shù)DataWindowcontrolfunctions
5.3
工資管理案例簡介WageManagementCaseIntroduction
5.4固定資產管理案例簡介FixedAssetsManagementCaseIntroduction3-5
會計軟件簡單應用開發(fā)3-5.1數(shù)據(jù)窗口控件簡介數(shù)據(jù)的顯示——數(shù)據(jù)窗口控件Datadisplay-DataWindowControls
數(shù)據(jù)窗口控件是應用程序在窗口中展示數(shù)據(jù)窗口對象中數(shù)據(jù)的唯一手段。數(shù)據(jù)窗口對象和數(shù)據(jù)窗口控件必須結合一起使用。
DataWindowcontrol,anapplicationtodisplaythedatainthewindow,astheonlymeansofdata.DataWindowobjectsandDataWindowcontrolsmustbeintegratetogether.3-5.1數(shù)據(jù)窗口控件簡介數(shù)據(jù)窗口編程的基本過程數(shù)據(jù)源Connect()SetTransObiect()或SetTrans()打開窗口,在窗口上布置數(shù)據(jù)窗口控件創(chuàng)建窗口對象Retrieve()數(shù)據(jù)窗口在數(shù)據(jù)窗口控件的DataObject屬性中選擇數(shù)據(jù)窗口對象創(chuàng)建數(shù)據(jù)窗口對象定義數(shù)據(jù)庫與應用程序相連接的事物對象將數(shù)據(jù)窗口控件與事務對象關聯(lián)數(shù)據(jù)庫中數(shù)據(jù)裝入數(shù)據(jù)窗口將數(shù)據(jù)窗口控件與數(shù)據(jù)對象相關聯(lián)3-5.1數(shù)據(jù)窗口控件簡介在窗口上布置數(shù)據(jù)窗口控件Inthewindowlayoutofdatawindowcontrol2.點擊小三角,展開窗口控件Clickthesmalltriangletostartthewindowcontrols
5.在數(shù)據(jù)窗口的邊沿或四角,拖動調整數(shù)據(jù)窗口的大小Inthedatawindowedgesorcorners,dragtoadjustthesizeofthedatawindow
3.點擊數(shù)據(jù)窗口控件ClickDataWindowControl
6.在數(shù)據(jù)窗口內部,拖動調整數(shù)據(jù)窗口的位置Inthedatawithinthewindow,dragthewindowtoadjustthelocationofthedata
1.創(chuàng)建或打開窗口Tocreateoropenawindow4.在窗口上點擊,出現(xiàn)數(shù)據(jù)窗口控件Inthewindow,clickon,thereDataWindowControl
3-5.1數(shù)據(jù)窗口控件簡介數(shù)據(jù)窗口控件屬性DataWindowcontrolproperties選擇關聯(lián)的數(shù)據(jù)窗口對象Selecttheassociateddatawindow具有控制菜單Hasacontrolmenu具有水平滾動條Withthehorizontalscrollbar具有垂直滾動條Withaverticalscrollbar分割數(shù)據(jù)窗口控件SplitDataWindowControl數(shù)據(jù)窗口控件的標題DataWindowControlTitle
數(shù)據(jù)隨滾動條的移動而滾動DatawiththeRolling具有最小化功能Hasthemaximumfunction具有最大化功能Hasthemaximumfunction具有標題欄Withthetitlebar3-5.1數(shù)據(jù)窗口控件簡介數(shù)據(jù)窗口控件事務對象DataWindowControltransactionobject
事務對象(TransactionObject)是一個不可見的對象,它包含了與數(shù)據(jù)庫連接的相關屬性參數(shù)。Transactionobject(TransactionObject)isaninvisibleobjectthatcontainsthedatabaseconnectionassociatedwiththeattributeparameter.
應用程序與數(shù)據(jù)庫的連接通過事務對象來完成,在建立連接前需要給事務對象的相關屬性賦值,用嵌入式SQL語句CONNECT建立連接。PowerBuilder中缺省事務對象是SQLCA。Applicationandthedatabaseconnectionthroughthetransactionobjecttocompletetheconnectiontothetransactionobjectrequiredpriortoassignmentoftherelevantattributes,usingtheembeddedSQLstatementCONNECTtoestablishaconnection.PowerBuilderisthedefaulttransactionobjectSQLCA.
在數(shù)據(jù)庫連接之后,要使數(shù)據(jù)窗口控件能夠訪問數(shù)據(jù)庫,還必須為數(shù)據(jù)窗口控件指定事務對象,使數(shù)據(jù)窗口控件明確究竟使用哪一個事務對象同數(shù)據(jù)庫進行交互。使用函數(shù)SetTransObject進行指定。Inthedatabaseconnection,theDataWindowcontroltobeabletomakeaccesstothedatabasemustalsobespecifiedfortheDataWindowcontrol,
transactionobject,sothatthedatawindow,whichcontrolswhethertheuseofaspecifictransactionobjecttointeractwiththedatabase.UsethefunctionSetTransObjecttospecifythat.3-5.1數(shù)據(jù)窗口控件簡介何時調用函數(shù)SetTransObject()1.第一次連接數(shù)據(jù)庫2.在調用Retrieve()或Update()之前3.在動態(tài)修改了一個數(shù)據(jù)窗口的數(shù)據(jù)對象之后何處調用SetTransObject()1.窗口的open事件2.數(shù)據(jù)窗口控件的事件(如clicked)3-5.1數(shù)據(jù)窗口控件簡介WhentocallthefunctionSetTransObject()1.Thefirstconnecttothedatabase2.InthecalltoRetrieve()orUpdate()beforethe3.InthedynamicchangesofadatawindowafterthedataobjectWheretocallSetTransObject()1.Thewindowopenevent2.DataWindowcontrolevents(suchasclicked教學內容5.1數(shù)據(jù)窗口控件簡介AboutDataWindowcontrols
5.2
數(shù)據(jù)窗口控件函數(shù)
DataWindowcontrolfunctions
5.3
工資管理案例簡介WageManagementCaseIntroduction
5.4固定資產管理案例簡介FixedAssetsManagementCaseIntroduction3-5
會計軟件簡單應用開發(fā)3-5.2數(shù)據(jù)窗口控件簡介檢索數(shù)據(jù)Retrieve()RetrievedataRetrieve()
可以使用檢索參數(shù),也可以不使用Youcanusethesearchparameters,youcannotuse
例子(Example):stringls_statels_state=ddlb_state.textdw_list.Retrieve(ls_state)Retrieve()的返回值(returnvalueof)
-1失敗(Fail)0無數(shù)據(jù)(Nodata)>0檢索到的數(shù)據(jù)行數(shù)(thenumberofrowsofdataretrieved)3-5.2數(shù)據(jù)窗口控件簡介修改、插入和刪除數(shù)據(jù)行Modify,insertanddeletedatarows
增加和修改列中的數(shù)據(jù)Toincreaseandmodifythedatainthecolumn
插入數(shù)據(jù)行InsertingRows
刪除數(shù)據(jù)行DeletingRows
過濾和排序Filteringandsorting3-5.2數(shù)據(jù)窗口控件簡介數(shù)數(shù)據(jù)類型是否正確?Thenumberofdatatypescorrect?有效性規(guī)則是否滿足?Effectivenessoftherulessatisfied?是否發(fā)生改動?Whethertherehasbeenchange?ItemChanged事件ItemChangedEvent移動數(shù)據(jù)到主緩沖區(qū)中(函數(shù)Acceptext()的使用)Mobiledatatothemainbuffer(FunctionAcceptext()use)修改數(shù)據(jù)Modifydata3-5.2數(shù)據(jù)窗口控件簡介InsertRow(row)函數(shù)InsertRow(row)function其中參數(shù)Row表示插入行的位置OneargumentRow,saidthelocationofinsertedrow在尾行增加一行(Inthelastlineaddaline:):dw_1.insertrow(0)在第一行之前插入一行(Insertarowbeforethefirstline
):dw_1.InsertRow(1)在當前行的后邊插入一行(Insertarowafterthisline
):dw_1.InsertRow(dw_emp.GetRow()+1)插入(增加)數(shù)據(jù)Insert(increase)data3-5.2數(shù)據(jù)窗口控件簡介Dw_1.deleterow()刪除指定的行調用格式:dw_control.DeleteRow(row)1——操作成功刪除行Deleterow-1——出現(xiàn)錯誤返回值3-5.2數(shù)據(jù)窗口控件簡介舉例
Example
刪除當前行(Deletethecurrentline):dw_emp.DeleteRow(0)或者dw_emp.DeleteRow(dw_emp.GetRow())
刪除最后一行(Deletethelastlineof)longRowNumRowNum=dw_emp.RowCount()dw_emp.DeleteRow(RowNum)選中數(shù)據(jù)行的高亮度顯示(Selecteddatarowsofhigh-brightnessdisplay)SelectRow()函數(shù)
dw_control.SelectRow(row)IsSelected()函數(shù)
State=dw_control.IsSelected(row)單擊事件的例子Examplesofclickevent高亮度顯示選中的行,原來高亮度行變?yōu)榉歉吡炼蕊@示(High-brightnessdisplaystheselectedrow,theoriginallineintoanon-high-brightnesshigh-brightnessdisplay):IFrow>0THENdw_1.SelectRow(0,FALSE)dw_1.SelectRow(row,TRUE)ENDIF3-5.2數(shù)據(jù)窗口控件簡介3-5.2數(shù)據(jù)窗口控件簡介設置、獲取當前行Setting,accesstothecurrentrowSetRow()使得指定行成為當前行(makesthespecifiedrowintothecurrentrow)
調用格式(Callformat
):dw_control.SetRow(row)GetRow()得到當前行的位置(getthelocationofthecurrentrow)返回一個長整數(shù)類型,說明緩沖區(qū)中當前行的編號Returnsalongintegertype,indicatingthebufferinthecurrentrownumber
調用格式(Callformat):dw_control.GetRow()3-5.2數(shù)據(jù)窗口控件簡介存取數(shù)據(jù)窗口緩沖區(qū)中數(shù)據(jù)值的方法Accesstodatawindowbuffermethodofdatavalues
使用數(shù)據(jù)窗口對象的數(shù)據(jù)表達式Theuseofthedatawindowobjectdataexpression
使用存取單行數(shù)據(jù)值的函數(shù)AccesstosingledatavaluesusingafunctionofGetItem()系列函數(shù)用來檢索數(shù)據(jù)值GetItem()functionisusedtoretrievethedatavalueseriesSetItem()函數(shù)把指定的值存放在緩沖區(qū)中SetItem()functiontospecifythevaluestoredinthebuffer3-5.2數(shù)據(jù)窗口控件簡介存取數(shù)據(jù)窗口緩沖區(qū)中數(shù)據(jù)值的方法AccesstodatawindowbuffermethodofdatavaluesGetItem()系列函數(shù):從數(shù)據(jù)窗口某一行某一列中獲取數(shù)據(jù)(GetItem()familyfunction:alinefromthedatawindowtoobtainthedataofacolumn)
常用(Commonlyused
):GetItemString(行號,列號或者“列名”)GetItemString(linenumber,columnnumber,or"columnname")GetItemNumber(行號,列號或者“列名”
)GetItemNumber(linenumber,columnnumber,or"columnname"3-5.2數(shù)據(jù)窗口控件簡介GetItemDecimal()GetItemDate()GetItemDateTime()GetItemTime()其他數(shù)據(jù)類型3-5.2數(shù)據(jù)窗口控件簡介設置、獲取當前行SetItem()存放指定值到數(shù)據(jù)窗口緩沖區(qū)中SetItem()storethespecifiedvaluetothedatawindowbuffer
SetItem(行,列,值):注意:數(shù)據(jù)類型的匹配!例子:integerli_empidli_empid=100
dw_data.SetItem(row,"emp_id",li_empid)教學內容5.1數(shù)據(jù)窗口控件簡介
AboutDataWindowcontrols
5.2
數(shù)據(jù)窗口控件函數(shù)DataWindowcontrolfunctions
5.3
工資管理案例簡介WageManagementCaseIntroduction
5.4固定資產管理案例簡介FixedAssetsManagementCaseIntroduction3-5
會計軟件簡單應用開發(fā)工資管理系統(tǒng)功能結構圖碼表設置銀行設置扣稅設置獎懲額度設置職員信息處理考勤信息處理基本工資計算變動工資計算匯總工資計算工資匯總表查詢工資費用分配表查詢銀行代發(fā)文件查詢個人所得稅扣繳表查詢生成工資費用分配憑證生成扣稅憑證生成福利費憑證密碼修改權限設置業(yè)務處理報表查詢憑證處理系統(tǒng)維護初始設置工資管理系統(tǒng)3-5.3工資管理案例簡介工資管理系統(tǒng)業(yè)務流程圖其他部門相關部門人事部制定編制編制費用分配表個人所得稅扣繳申請表福利費計提分配表工資分攤憑證扣稅憑證計提福利費憑證財務處理系統(tǒng)分攤工資扣稅計提福利填制填制填制計算考勤信息獎懲額度標準表職員信息表變動工資表基本工資表工資表匯總銀行代發(fā)文件表銀行員工計算計算遞交代發(fā)工資計算3-5.3工資管理案例簡介3-5.3工資管理案例簡介工資管理系統(tǒng)數(shù)據(jù)流程圖E1其他部門P1輸入考勤信息S10考勤表P2繪制變動工資表S1變動工資表E3相關部門E4銀行P7制定獎懲標準S9獎懲額度表P4計算工資S2基本工資表P5編制基本工資表S8職員信息表P3輸入職員信息表E2人事部S3工資匯總表S6工資費用分配表S5個人所得稅申報表P6憑證處理S4福利費計提分配表S7工資轉賬憑證財務處理系統(tǒng)D1考勤記錄D2職員基本信息D4工資標準D3銀行代發(fā)文件教學內容5.1數(shù)據(jù)窗口控件簡介AboutDataWindowcontrols
5.2
數(shù)據(jù)窗口控件函數(shù)DataWindowcontrolfunctions
5.3
工資管理案例簡介WageManagementC
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- GSP相關知識培訓課件
- 皮膚護膚知識培訓課件
- 空調銷售安裝合同范本
- DB31∕T 693.3-2020 蔬菜工廠化育苗技術規(guī)程 第3部分:茄果類
- 八省聯(lián)考試卷分析(物理 西南聯(lián)大附中)
- 企業(yè)技術標準體系的建立、實施與評估
- 酒店承包經營合同書
- 員工股權轉讓協(xié)議書
- 零件數(shù)據(jù)采集與逆向工程 習題答案 任務五 復合型零件的數(shù)據(jù)采集
- 副總經理聘用協(xié)議
- 《工業(yè)機器人現(xiàn)場編程》課件-任務3.1 涂膠機器人工作站工程現(xiàn)場
- 金屬非金屬礦山安全生產法規(guī)
- 音樂節(jié)組織與執(zhí)行流程指南
- 身心活化健康評估老年康體指導初級
- 2024-2030年中國琥珀酸二辛酯磺酸鈉產業(yè)未來發(fā)展趨勢及投資策略分析報告
- 2024年駕照新規(guī)理論考試C1理論考試試題題庫及答案(共500題)
- 硬筆書法紙(打直接打印)
- 陳銀子礦山基建施工組織方案方案
- 襄陽房地產市場月報2024年08月
- 工業(yè)互聯(lián)網平臺的架構與功能
- 八年級英語下冊課件教學
評論
0/150
提交評論