【正文】
_emp = create datastore = infor_employee (sqlca) () //如是寫在窗口的 open()事件,此段代碼可省略。 messagebox(提示 ,數(shù)據(jù)保存失敗 ) end if 22 修改密碼窗口 “修改密碼”按鈕下的代碼: string id,ymima,xmima,qmima,y_mima int i id = trim() ymima=trim() xmima=trim() qmima=trim() select count(*) into :i from passem,pass where =:id or =:id using sqlca。 ) else (depid) end if 數(shù)據(jù)窗口 dw_1 下得代碼是: “更新”按鈕下的代碼是: int i_count i_count=() if i_count0 then if ()=1 then mit using sqlca。021010139。 (sqlca) (bumenid) 主界面運行窗口 38 程序設(shè)計方法課程設(shè)計評分表 程序設(shè)計方法課程設(shè)計評分表 評分項目 具 體 要 求 分值 評 分 選題質(zhì)量 選題符合要求,體現(xiàn)綜合訓(xùn)練基本要求;題 目難易適 度。 10 總分 五分制成績 評閱教師簽字: 年 月 日 。 dw_1 下的代碼為: 35 統(tǒng)計圖窗口 現(xiàn)狀 創(chuàng)建 graph 形式的 datawindow。 messagebox(提示 ,您已經(jīng)成功添加 +string(i_count)+條數(shù)據(jù),新添加的雇員登陸密碼為“ 0000”! ) else rollback using sqlca。 if i1 then messagebox(對不起 ,該用戶不存在! ) = = () return end if select password,part into :dl_mima,:depid 26 from pass where id=:lr_id。 if xs_mima = mima then (sqlca) (cxeid) else messagebox(提示 ,密碼輸入錯誤,請重新輸入! ) = end if “保存”按鈕下的代碼是: string cxeid cxeid=trim() () if =0 then mit using sqlca。 if dl_mima1 lr_mima and dl_mima2lr_mima then messagebox(對不起 ,密碼錯! ) = () return end if open(wstart) close(parent) “退出”按鈕的代碼 close(parent) 組織結(jié)構(gòu)圖窗口 11 核心代碼 首先創(chuàng)建 treeview 所需的 datawindow infor_depart xx_duty1 OPEN 事件代碼: datastore dt_dept,dt_duty long ll_root,ll_hd_lv1 integer li_deptt,li_dutyt,i,j string ls_deptid,ls_deptname,ls_dutyid,ls_dutyname string ls_temp dt_dept = create datastore//創(chuàng)建數(shù)據(jù)存儲對象 = infor_depart (sqlca) () dt_duty = create datastore = xs_duty1 (sqlca) () //如是寫在窗口的 open()事件,此段代碼可省略。 // Profile 123 = ODBC = False = ConnectString=39。 ( 5)使用默認的用戶 UserID 項“ dba”和默認的口令 Password 項“ sql”,單擊 ok 按鈕,就可以創(chuàng)建一個 ASA 數(shù)據(jù)庫 humenresource,同時 ,系統(tǒng)自動的為數(shù)據(jù)庫配置了 ODBC 和 DB Profile,并且已經(jīng)到新建的數(shù)據(jù)庫。在刪除本部門雇員時,對應(yīng)人員的密碼會隨之注銷。 檔案查詢。具體如下: 密碼設(shè)置。 要求: 本課程設(shè)計要求學(xué)生獨立設(shè)計完成。 技術(shù)條件: powerbuilder 開發(fā)工具的熟練運用,數(shù)據(jù)庫理論知識和實際操作能力。為更近一步完善次系統(tǒng),設(shè)置了密碼和權(quán)限。為了存放職工人事檔案的全部數(shù)據(jù),檔案更新包括對各種表的記錄修改、刪除、添加等操作,而且通過設(shè)置密碼怎家了修改、刪除和添加的安丘性能。 主管管理本部門雇員模塊:部門主管僅可以修改本部門的成員信息和添加、刪除本部門的雇員,沒有權(quán)限干涉其他的部門。 5 ( 4)單擊“ Broswe...”按鈕,彈出“ Create Dtabase”對話框,選擇合適的路徑,返回對話框。在該應(yīng)用的 open 事件中添加如下腳本,用于鏈接數(shù)據(jù)庫,打開運行主窗口。 if i1 then messagebox(對不起 ,該用戶不存在! ) = = () return end if select , into :dl_mima1,:dl_mima2 from passem,pass where =:lr_name or =:lr_name using sqlca。 if i1 then messagebox(對不起 ,該用戶不存在! ) = = () return end if select password into :xs_mima from passem where id=:cxeid。 if = 0 then messagebox(提示 ,密碼修改成功,請記好您新修改的密碼! ) end if end if end if end if 24 修改雇員信息 創(chuàng)建名為 lr_increase1 的 datawindow: 25 在從屬部門列懸掛“ dd_part” 數(shù)據(jù)窗口如下設(shè)置此數(shù)據(jù)窗口: 在職務(wù)列懸掛 xs_duty1 數(shù)據(jù)窗口,次窗口的設(shè)置如下: “登陸”按鈕的代碼: string lr_id,lr_mima,dl_id,dl_mima,depid int i lr_id = trim() lr_mima=trim() select count(*) into :i from pass where id=:lr_id using s