|
nbsp;machkindname as string … … end type (其中number等均为要输入的图示条目) ;private hards() as m_hard hards(),此时就作为数据的传输变量,进行grid与textbox之间的数据传输。 数据向类内写入: if hardcomp.recordcount > 0 then hardcomp.movefirst do until hardcomp.eof redim preserve hards(h%)// h%为记数变量。 hards(h%).ordernum = hardcomp![ ordernum]//输入编号 hards(h%).machkind = hardcomp![ machkind]//种类 hards(h%).machkindname = hardcomp![ machkindname]//分类名 hards(h%).machname = hardcomp![ machname]//名称 … … loop hardcomp.movefirst 类内数据向grid内写入: grdhardcomp.row = h% + 1//记录数统计 grdhardcomp.col = 0 grdhardcomp.text = " " & hards(h%).ordernum grdhardcomp.col = 1 grdhardcomp.text = " " & hards(h%).machkind grdhardcomp.col = 2&nb sp;grdhardcomp.text = " " & hards(h%).machkindname grdhardcomp.col = 3 grdhardcomp.text = " " & hards(h%).machname grdhardcomp.col = 4 … … grdhardcomp.text = " " & hards(h%).hardlastdate grdhardcomp.rows = grdhardcomp.rows + 1//行数加1 hardcomp.movenext h% =&nbs
|