正在加载图片...
I=dw 1.insertrow (0) Dw_1.srolltorow(i) D 制除 dw_1.deleterow(0) 保存 dw_1.updata() if I=-I then messagebox('information'”,“数据无法保存) end if 关闭 cose(parent) (3)对w_da的closequery事件编程,使dw_1中的数据发生改变而又未保存就退出窗口时 给用户一个消息框提示。 Integer m agebox(信息 “数据己改变,是否保存”,question!YesNoCancel) If m=1 then If dw_1.updata()=-1 then Messagebox(information”,”无法保存数据”) Else Messagebox(information”,”已保存数据 Endif Return0 Elseif m=2 then Return 0 Elseif m=3 then Return】 2、ddb_1中为各系名称,当选择了一个系后v_1显示该系学生姓名,对ddb1的 selectionchanged事件编程。 Int I String outname Declare namecur cursor for Select distinct department From学生 Where department-:ddlb_1.text Open namect If sqlca.sqlcode=-1 then Messagebox(“sql error“,sqlca,sqlerrtext) Else Fetch namecur into:outname; 第10页共17页 第 10 页 共 17 页 I= dw_1. insertrow (0) Dw_1. scrolltorow (i) Dw_1. setfocus ( ) 删除 dw_1 . deleterow (0) 保存 int j j= dw_1 . updata ( ) if I= -1 then messagebox (“information” , “数据无法保存”) end if 关闭 close (parent ) (3)对 w_data 的 closequery 事件编程,使 dw_1 中的数据发生改变而又未保存就退出窗口时 给用户一个消息框提示。 Integer m If dw_1.modifiedcount ( ) + deletedcount ( )>0 then M = messagebox (“信息”“数据已改变,是否保存”,question!YesNoCance!) If m=1 then If dw_1.updata ( )= -1 then Messagebox (“information”,”无法保存数据”) Else Messagebox (“information”,”已保存数据”) End if Return 0 Elseif m=2 then Return 0 Elseif m=3 then Return 1 2、ddlb_1 中为各系名称,当选择了一个系后 tv_1 显示该系学生姓名,对 ddlb_1 的 selectionchanged 事件编程。 Int I String outname Declare namecur cursor for Select distinct department From 学生 Where department = :ddlb_1.text Open namecur ; If sqlca.sqlcode = -1 then Messagebox ( “sql error “, sqlca ,sqlerrtext ) Else Fetch namecur into :outname ;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有