【正文】
2. 登陸窗口的open事件=string(now(),hhmmss) //通過時間計算得到驗證碼登陸窗口確定按鈕clicked事件int bstring username,passwordusername=password=select count(*) into :b from myuser where userid=:username and password=:password。 //取得權(quán)限的代號3. 主窗口open事件opensheet(w_logo,w_main)timer(1)timer事件 //取得系統(tǒng)時間 并在標題顯示時間和權(quán)限的簡單說明if qx=2 thentitle=(學生成績管理系統(tǒng) 當前時間:+string(now(),hh:mm:ss)+ 您的權(quán)限是:學生您只能查詢) end if if qx=1 thentitle=(學生成績管理系統(tǒng) 當前時間:+string(now(),hh:mm:ss)+ 您的權(quán)限是:教師您能查詢,修改) end if if qx=0 thentitle=(學生成績管理系統(tǒng) 當前時間:+string(now(),hh:mm:ss)+ 您的權(quán)限是:管理員)end ifrbuttondown事件(xpos,ypos) //右擊事件中關聯(lián)菜單resize事件if isvalid(w_logo) then = +800 = +230end if if = then =modified end if 4. 成績查詢窗口open事件(sqlca)()關閉按鈕clickedclose(w_cjicx)查找按鈕 clicked=3067long frowstring fstropenwithparm(w_find,student) //打開窗口并提交一個值fstr=(fstr)()5.查找窗口的open事件choose case case student (學號 *studentid) (姓名 *name)end choose查找窗口中的確定按鈕clickedint nstring rcif = then messagebox(提示,沒有設置查找條件!請輸入。*39。 + + 39。if bb=0 and cc then messagebox(,學號不存在!請重新輸入!) //檢查錄入的學號在學生表中是否存在end ifaa=(1,3)ee=integer(aa)if ee0 or ee100 then messagebox(,你輸入的成績超出范圍!請重新輸入!) //檢查錄入的成績是否超出范圍end if確定查找按鈕clicked事件string cc,aa,ddstring sscc= aa= if cc and aa then select , into:ss,:dd from sreport where studentid=:cc and courseid=:aa。 if =0 then messagebox(,修改成功) //對查到的信息可以進行修改,直接保存在數(shù)據(jù)庫中。 messagebox( 提示,保存成功!) (sqlca)()else messagebox(,保存失敗!) //保存數(shù)據(jù)窗口控件中的數(shù)據(jù)end if統(tǒng)計按鈕clicked事件 //統(tǒng)計學生的成績等級string aa,bb,cc,dd,eeselect count() into :aa from sreport where score=90。select count() into :cc from sreport where score80 and score =70。select count() into :ee from sreport where score60 and score =0。 messagebox( 提示,保存成功!) //保存數(shù)據(jù)窗口控件中的數(shù)據(jù)到數(shù)據(jù)庫 (sqlca