li_ReturnCode=dw_1.UpDate() //保存数据
if pictureChanged=true then
string name
name=dw_1.getitemstring( dw_1.getrow(), "buildingname")
updateblob buildingmessage
set buildingpicture=:ib_emp_pic
where buildingname=:name;
end if
cb_r_mode.enabled=true
//设置按钮效用:可读,可写,可前后翻页
cb_w_mode.enabled=true
cb_prior_record.enabled=true
cb_next_record.enabled=true
cb_save_change.enabled=false
//cb_cancel_change.enabled=false
cb_r_mode.setfocus( ) //使“浏览模式”按钮获得焦点
dw_1.enabled = false
pictureChanged=false
17、房屋基本查询窗口的查询按钮的代码
if ti="房屋号" then
dw_1.setfilter("housenumber="+trim(sle_1.text))
elseif ti="楼盘名" then
dw_1.setfilter("buildingname='"+trim(sle_1.text)+"' ")
elseif ti="楼宇" then
dw_1.setfilter("storynumber="+trim(sle_1.text))
elseif ti="层数" then
dw_1.setfilter("floor="+trim(sle_1.text))
elseif ti="户型" then
dw_1.setfilter("type='"+trim(sle_1.text)+"' ")
elseif ti="朝向" then
dw_1.setfilter("face='"+trim(sle_1.text)+"' ")
elseif ti="销售状况" then
dw_1.setfilter("housesalestuation='"+trim(sle_1.text)+"' ")
end if
dw_1.Retrieve()
18、房屋基本查询窗口的生成Word文档按钮的代码
constant integer ppLayoutBlank = 12
OLEObject ole_object
ole_object = CREATE OLEObject
//连接PowerPoint
IF ole_object.ConnectToNewObject("Word.Application") <> 0 THEN
MessageBox('OLE错误','OLE无法连接!')
return
END IF
ole_object.Visible = True
long ll_colnum,ll_rownum
constant long wdWord9TableBehavior = 1
constant long wdAutoFitFixed = 0
constant long wdCell = 12
string ls_value
//得到数据窗口数据的列数与行数(行数应该是数据行数 + 1)
ll_colnum = Long(dw_1.object.datawindow.column.count)
ll_rownum = dw_1.rowcount() + 1
ole_object.Documents.Add()
ole_object.ActiveDocument.Tables.Add(ole_object.Selection.Range, ll_rownum, ll_colnum)
string ls_colname
integer i,j
for i = 1 to ll_colnum
//得到标题头的名字
ls_colname = dw_1.describe('#' + string(i) + ".name") + "_t"
ls_value = dw_1.describe(ls_colname + ".text")
ole_object.Selection.TypeText(trim(ls_value))
ole_object.Selection.MoveRight(wdCell)
next
dw_1.setredraw(false)
ole_object.Selection.MoveLeft(wdCell)
for i = 2 to ll_rownum
for j = 1 to ll_colnum
dw_1.scrolltorow(i - 1)
dw_1.setcolumn(j)
ls_value = dw_1.gettext()
ole_object.Selection.MoveRight(wdCell)
ole_object.Selection.TypeText(ls_value)
next
next
dw_1.setredraw(true)
constant long wdFormatDocument = 0
//保存新建的文档
ole_object.ActiveDocument.SaveAs("sample.doc", 0,False,"",True,"",False,False,False, False,False)
//断开OLE连接
Ole_Object.DisConnectObject()
Destroy Ole_Object
19、房屋信息综合查询窗口的组合查询按钮的代码
string filterStr
integer rc
filterStr="1=1"
if bname_flag then //设置过滤条件
filterStr=filterStr + " and buildingname = '" + sle_m_bname.text + "'"
end if
if snum_flag then
filterStr=filterStr + " and storynumber = " + sle_m_snum.text
end if
if type_flag then
filterStr=filterStr + " and type = '" + housetype[list_num] + "'"
end if
if hnum_flag then
filterStr=filterStr + " and housenumber = " + sle_m_hnum.text
end if
www.youerw.com
dw_1.Filter()
dw_1.Retrieve()
20、认购书管理窗口的标签页代码
dw_1.settrans( sqlca)
dw_1.Setfocus() //插入一条空行记录,以待修改
Integer li_Row //行标志,指示插入到的行
li_Row=dw_1.InsertRow(0) //设置默认值
dw_1.setitem( li_Row, "bookdate", now())
dw_1.setitem( li_Row, "bookdate_1", now())
dw_1.ScrollToRow(li_Row) //滚动到指定行
21、认购书管理窗口的认购按钮的代码
integer li_ReturnCode //保存操作返回标志
li_ReturnCode=dw_1.UpDate() //保存数据
cb_r_mode.enabled=true //设置按钮效用:可读,可写,可前后翻页
cb_w_mode.enabled=true
cb_prior_record.enabled=true
cb_next_record.enabled=true
cb_cancel_change.enabled=false
cb_r_mode.setfocus( ) //使“浏览模式”按钮获得焦点
22、退房管理窗口的退房按钮的代码
integer currentrow,key
currentrow = dw_1.getrow( )
if currentrow>0 then
key = dw_1.getitemnumber( currentrow, "contractnumber")
delete from contractmessage
where contractnumber=:key;
if SQLCA.SQLCode = 0 then
messagebox("提示","退房成功!")
else
messagebox("提示","退房失败")
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>