dw_3.object.startstation[1]=startstation
dw_3.object.middlestation[1]=middlestation
dw_3.object.endstation[1]=endstation
dw_3.object.takeofftime[1]=takeofftime
dw_3.object.landingtime[1]=landingtime
dw_3.object.price1[1]=price1
//dw_3.object.price2[1]=price2
dw_3.object.memo[1]=memo
3.订购机票界面订票成功按钮 clicked()
dw_3.update()
string num
num=dw_3.GetitemString(1,"flightnumber")
Update buyticket
set flag=1
where flightnumber=:num
using sqlca;
update planeticket
set rest=rest-1
where flightnumber=:num
using sqlca;
close(parent)
4.退票界面w_cancleticket open()
// Profile xuwei
/*SQLCA.DBMS = "O90 Oracle9i (9.0.1)"
SQLCA.LogPass = 'manager'
SQLCA.ServerName = "lab_b14"
SQLCA.LogId = "system"
SQLCA.AutoCommit = true
//SQLCA.DBParm = "PBCatalogOwner='scott'"*/
// Profile fly
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=plane;UID=sa;PWD=sa'"
connect using sqlca;
5.退票界面查询按钮 clicked()
string filterStr
string name
integer rc
name=sle_buyername.text
filterStr="buyername='"+name+"'"
dw_4.SetTransobject(sqlca)
dw_4.setFilter(filterStr)
dw_4.Filter()
dw_4.Retrieve()
rc=dw_4.getrow()
if rc<=0 then
messagebox("提示:","没有此顾客订购机票信息!")
return 1
end if
6.退票界面退票按钮 clicked()
string num
num=dw_4.GetitemString(1,"flightnumber")
update planeticket
set rest=rest+1
where flightnumber=:num
using sqlca;
dw_4.deleterow(0)
dw_4.update()
dw_4.retrieve()
messagebox("提示:","退票成功!")
7选择机票界面查询全部航班信息按钮 clicked()
disconnect using sqlca;
// Profile xuwei
/*SQLCA.DBMS = "O90 Oracle9i (9.0.1)"
SQLCA.LogPass = 'manager'
SQLCA.ServerName = "lab_b14"
SQLCA.LogId = "system"
SQLCA.AutoCommit = true*/
// Profile fly
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=plane;UID=sa;PWD=sa'"
connect using sqlca;
string filterStr
filterStr="flag=0"
dw_1.settransobject(sqlca)
dw_1.setfilter(filterStr)
dw_1.filter()
dw_1.retrieve ()
8.选择机票界面订购按钮 clicked()
int i
string selNum
for i=1 to dw_1.getrow()
if dw_1.GetItemNumber(i,"flag")=1 then
selNum=dw_1.GetitemString(i,"flightnumber")
openwithparm(w_buyticket,selNum)
// close(w_chooseplane)
return
end if
next
9.选择机票界面按目的地查找按钮 clicked()
open(w_findplane)
10.按目的地查找界面w_findplane open()
// Profile xuwei
SQLCA.DBMS = "O90 Oracle9i (9.0.1)"
SQLCA.LogPass = 'manager'
SQLCA.ServerName = "lab_b14"
SQLCA.LogId = "system"
SQLCA.AutoCommit = true
//SQLCA.DBParm = "PBCatalogOwner='scott'"
connect using sqlca;
11.按目的地查找界面查找按钮 clicked()
string filterStr
string name
integer rc
name=sle_station.text
filterStr="endstation='"+name+"'"
dw_5.SetTransobject(sqlca)
dw_5.setFilter(filterStr)
dw_5.Filter()
dw_5.Retrieve()
rc=dw_5.getrow()
if rc<=0 then
mes