子数据窗口代码

//String ls_temp
//String ls_sql
//DataStore ldst_temp
//String ls_syntax
//String ls_errors
//int li_i=1
//any la_new
//datawindowchild dw_temp
//
//
//ls_temp=""
//ib_Modified = true
//
//if Dwo.name = "bgxm" then
//
////判断是否已经存在相同字段名
//do while li_i<=dw_list.rowcount( )
//<wbr>if dw_list.GetItemString(li_i,"bgxm")=datathen<br>//<wbr><wbr>messagebox("变更项目重复","请重新选择变更项目!")<wbr><wbr><wbr><br>//<wbr><wbr>cb_4.PostEvent(Clicked!)<br>//<wbr><wbr>return<br>//<wbr>end if<br>//<wbr>li_i++<br>//loop<br>////回复变更前内容<br>//<wbr>ls_temp=dw_list.GetItemstring(row,"bgxm")<br>//<wbr>choose caseleft(Lower(ldst_zb.Describe(ls_temp+".ColType")),3)<br>//<wbr>case 'cha'<br>//<wbr><wbr>la_new=dw_list.GetItemString(row,"bgqnr")<br>//<wbr>case 'dat'<br>//<wbr><wbr>la_new=date(dw_list.GetItemstring(row,"bgqnr"))<br>//<wbr>case 'num'<br>//<wbr><wbr>la_new=double(dw_list.GetItemstring(row,"bgqnr"))<wbr><br>//<wbr>endchoose<wbr><wbr><br>//<wbr>ldst_zb.setitem(1,ls_temp ,la_new )<br>////读变更前项目<br>//ls_sql = "select " + data + " from wj_jbxxdjb wheregldm='"+is_gldm+"'"<br>//ls_syntax =SQLCA.SyntaxFromSql(ls_sql,'style(type=grid)',ls_errors)<br>//<br>//if Len(ls_errors) &gt; 0 then return<br>//ldst_temp = Create DataStore<br>//if Len(ls_errors) &gt; 0 then return<br>//ldst_temp.Create(ls_syntax,ls_errors)<br>//if len(ls_errors) &gt; 0 then return<br>//ldst_temp.SetTransObject(SQLCA)<br>//ldst_temp.Retrieve()<br>//if ldst_temp.RowCount() &lt; 1 then return<br>//<br>//dw_list.SetItem(row,"bghnr","")<br>//choose caseleft(Lower(ldst_temp.Describe(data+".ColType")),3)<br>//<wbr>case 'cha'<br>//<wbr><wbr>dw_list.SetItem(row,"bgqnr",string(ldst_temp.GetItemString(1,1)))<br>//<wbr>case 'dat'<br>//<wbr><wbr>dw_list.setitem(row,"bgqnr",string(ldst_temp.GetItemDatetime(1,1),"yyyy-mm-dd"))<br>//<wbr>case 'num'<br>//<wbr><wbr>dw_list.setitem(row,"bgqnr",string(ldst_temp.GetItemNumber(1,1)))<br>//end choose<br>//<wbr><br>////写下面的窗口<br>//choose caseleft(Lower(ldst_temp.Describe(data+".ColType")),3)<br>//<wbr>case 'cha'<br>//<wbr><wbr>dw_1.Modify("t_prevxm_"+string(row)+".text='"+string(ldst_temp.GetItemString(1,1))+"'")<br>//<wbr>case 'dat'<br>//<wbr><wbr>dw_1.Modify("t_prevxm_"+string(row)+".text='"+string(ldst_temp.GetItemDatetime(1,1),"yyyy-mm-dd")+"'")<br>//<wbr>case 'num'<br>//<wbr><wbr>dw_1.Modify("t_prevxm_"+string(row)+".text='"+string(ldst_temp.GetItemNumber(1,1))+"'")<br>//end choose<br>//<br>//<br>//if dw_list.getchild("bgxm",dw_temp)&lt;&gt;-1 then<br>//<wbr>long<wbr> ll_hh<br>//<wbr>ll_hh=dw_temp.find("pbc_cnam='"+data+"'",1,dw_temp.RowCount())<br>//<wbr>ls_temp=string(dw_temp.GetItemString(ll_hh,"pbc_hdr"))<br>//<wbr>dw_1.Modify("t_xm_"+string(row)+".text='"+ls_temp+"'")<br>//end if<br>//<br>//<br>//<br>//<br>//<br>//<br>//<br>//<br>//elseif dwo.name = "bghnr" then<br>//<wbr><wbr><br>////写下面的窗口<br>//<br>//<wbr><wbr>dw_1.Modify("t_nextxm_"+string(row)+".text='"+data+"'")<br>//<br>//<br>//else<br>//<wbr>return<wbr><br>//<wbr><br>//<wbr><br>//<wbr><br>//end if</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>

你可能感兴趣的:(sql)