【正文】
close(w_borrow) close(w_borrow_find) close(w_change_password) close(w_kucun) close(w_login) close(w_login_re) close(w_readers) close(w_readers_find) close(w_readers_grid) close(w_return) close(w_user) opensheet (w_about,w_main,6,original!) 重新登錄界面如下: 確定按鈕代碼如下: string correct_pswd if = then //pop a message box messagebox(PayAttention!,The user name cant be null) //sle_1 get the focus () elseif = then //pop a message box messagebox(PayAttention!,The password cant be null) //sle_2 get the focus () else G_INPUT_TIME =G_INPUT_TIME+1 G_USER = G_PWD = //取出數(shù)據(jù)庫用戶口令表格中對應用戶的口令 SELECT user_PWD ,purview INTO :CORRECT_PSWD,:G_right FROM USER_info WHERE user_id=:G_USER or username=:G_USER。 messagebox(提示 !!!,數(shù)據(jù)更新成功 !!!) else //保存修改失敗,取消所作的修改 rollback。 // messagebox(提示 !!!,數(shù)據(jù)更新成功 !!!) //else // //保存修改失敗,取消所作的修改 // rollback。 是否保存所做的修改 ?, Question!, amp。 messagebox(提示 !!!,數(shù)據(jù)更新成功 !!!) else //保存修改失敗,取消所作的修改 rollback。 //彈出一個對話框警告 messagebox(錯誤 !!!,數(shù)據(jù)更新失敗 !!!) end if 退出: close(parent) 添加讀者信息界面: 前一條: //定義參數(shù)當前行行數(shù) integer row_current //數(shù)據(jù)窗口向前滾動一條記錄 row_current=() //如果已經(jīng)到達第一條記錄,則彈出一個對話框警告 if row_current=1 then MessageBox(警告 ,已經(jīng)是最前一條記錄 ) end if 后一條: //定義參數(shù) 表的總行數(shù) integer row_count //定義參數(shù) 當前行 integer row_current //數(shù)據(jù)窗口向后滾動一條紀錄 row_current=() //得到表的總行數(shù) row_count=() //判斷是否是最后一條記錄 if row_current= row_count then MessageBox(警告 ,已經(jīng)是最后一條記錄 ) end if 保存: if update(dw_1,true,false)=1 then //保存修改成功,提交修改 () mit。 //彈出一個對話框 警告 messagebox(錯誤 !!!,數(shù)據(jù)保存失敗 ) end if close(w_books) elseif UpdateOrNot=2 then //不保存 rollback。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。++39。++39。++39。++39。+string(s_readerid)+39。+bid+39。 G_RowNumber=G_RowNumber 1 loop //loop //39。 //過濾數(shù)據(jù)窗口 dw_course_evaluation (lookforcondition) filter(dw_1) //數(shù)據(jù)窗口 dw_1 顯示記錄 () 后一條: //定義參數(shù) 表的總行數(shù) integer row_count //定義參數(shù) 當前行 integer row_current //數(shù)據(jù)窗口向后滾動一條紀錄 row_current=() //得到表的總行數(shù) row_count=() //判斷是否是最后一條記錄 if row_current= row_count then MessageBox(警告 ,已經(jīng)是最后一條記錄 ) end if string s_readerid string lookforcondition g_rownumber=() //得到當前行記錄的讀者種類,賦值給變量 s_readerid=GetItemstring(dw_2,g_rownumber,1) //將讀者對應的讀者種 類信息,顯示在 dw_1 上 //得到過濾條件 lookforcondition=readerid = +39。 if m0 then messagebox(提示 ,您欠費 +string(m)+元 ) else deleterow(dw_1,g_rownumber) end if end if ////string(xiangcha*) 刷新: () () 保存: if update(dw_1,true,false)=1 then //保存修改成功,提交修改 () mit。 update books set putup=39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。++39。 where bookid=:bid。 //彈出一個對話框警告 messagebox(錯誤 !!!,數(shù)據(jù)保 存失敗 ) end if string bid G_RowNumber=() do until G_RowNumber=0 bid=(G_RowNumber,4) //bid=char(bid) //bid=39。 //過濾數(shù)據(jù)窗口 dw_course_evaluation (lookforcondition) filter(dw_1) //數(shù)據(jù)窗口 dw_1 顯示記錄 () 刪除: //得到當前記錄 date date1,date2,a string b dec m int xiangcha,k G_RowNumber=() a=(G_RowNumber,7) b=(G_RowNumber,2) //刪除一行,表示該書已經(jīng)歸還 date2=today() //date1=date(a) //date2=date(date2) xiangcha=daysafter(a,date2) if xiangcha0 then k=messagebox(提示 ,已超期 +string(xiangcha)) int(xiangcha) xiangcha=(xiangcha)* else deleterow(dw_1,g_rownumber) end if if k=1 then update readers set yajin=yajin :xiangcha where readerno=:b。 退出: close(w_borrow): 還書界面: 前一條: //定義參數(shù)當前行行數(shù) integer row_current //數(shù)據(jù)窗口向前滾動一條記錄 row_current=() //如果已經(jīng)到達第一條記錄,則彈出一個對話框警告 if row_current=1 then MessageBox(警告 ,已經(jīng)是最前一條記錄 ) end if string s_readerid string lookforcondition g_rownumber=() //得到當前行記錄的讀者種類,賦值給變量 s_readerid=GetItemstring(dw_2,g_rownumber,1) //將讀者對應的讀者種類信息,顯示在 dw_1 上 //得到過濾條件 lookforcondition=readerid = +39。039。 messagebox(提示 !!!,數(shù)據(jù)保存成功 !!!) else//保存修改失敗,取消所作的修改 rollback。++39。++39。++39。++39。++39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。+trim()+39。 messagebox(提示 !!!,數(shù)據(jù)更新成功 !!!) else //保存修改失敗,取消所作的修改 rollback。 //彈出一個對話框警告 messagebox(錯誤 !!!,數(shù)據(jù)更新失敗 !!!) end if 添加: //insert a row in the end of dw_1 g_RowNumber=(0) //dw_1 get the focus () //到當前行 (G_RowNumber) //the first column get the focus (1) 刪除: //得到當前記錄 G_RowNumber=() //將當前記錄中的員工號取出賦值給全局變量 emp_no deleterow(dw_1,g_rownumber) int a a=MessageBox(提示 ,確實要刪除嗎 ?,Question!, YesNoCancel!, 3) if a=1 then ( Clicked!) else () end if 退出: //定義兩個變量 int MCount //修改后沒有保存的行數(shù) int UpdateOrNot //是否修改 //得到修改后沒有保存的行數(shù) MCount=() if MCount=0 then //沒有未保存的修改 close(w_books) elseif Mcount0 then //詢問是否保存所做的修改 UpdateOrNot=MessageBox(保存修改 ,您修改了數(shù)據(jù)窗口中的數(shù)據(jù),現(xiàn)在是否保存 ?,Question!,YesNoCancel!) if UpdateOrNot=1 then //保存 if update(,true,false)=1 then //保存修改成功,提交修改 () mit。 退出: close(parent) 修改讀者信息界面: 添加: //insert a row in the end of dw_1 g_RowNumber=(0) //dw_1 get the focus () //到當前行 (G_RowNumber) //the first column get the focus (1) 刪除: //得到當前記錄 G_RowNumber=() //將當前記錄中的員工號取出賦值給全局變量 emp_no deleterow(dw_1,g_rownumber) int a a=Message