第一范文网 - 专业文章范例文档资料分享平台

火车售票系统(毕业论文)

来源:用户分享 时间:2025/7/31 5:15:36 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

number:='number'+riqi+leixing;

num_a:=ADOQuery1.FieldValues[amount]; num_num:=ADOQuery1.FieldValues[number];

if num_a>0 then begin

Qbuy:=TADOQuery.Create(nil); with Qbuy do begin

Connection:=ADOConnection1; if leixing='7' then begin

zuo:=120; //一节车厢中硬座的个数 SQL.Clear; sqlstr:='update '+amount+'='+inttostr(num_a-1)+'

train_no=\ SQL.Add(sqlstr); ExecSQL;

SQL.Clear; sqlstr:='update

checi

set

train_node

set where

'+number+'='+inttostr(num_num+1)+' train_no=\ SQL.Add(sqlstr); ExecSQL; end else begin

zuo:=60; //一节车厢中卧铺,软卧的个数 sqlstr:='update

checi

where

set

'+amount+'='+inttostr(num_a-1)+','+number+'='+inttostr(num_num+1)+' where train_no=\ SQL.Clear; SQL.Add(sqlstr); ExecSQL; end; Close; end;

//打印车票 ,可以用报表更简单,但我没有装! with form2 do begin show;

zhanm.Caption:=ADOQuery1.FieldValues['zhanm'];

no.Caption:=ADOQuery1.FieldValues['train_node.train_no']; riqi.Caption:=r_riqi.Text;

etime.Caption:=ADOQuery1.FieldValues['emit_time']; xiang.Caption:=inttostr(num_num div zuo); hao.Caption:=inttostr(num_num mod zuo); jiage.Caption:=price.Text; leixing.Caption:=r_leixing.Text; end;

ADOQuery1.Close; ADOQuery1.Open;

ADOQuery1.MoveBy(Distance); end else begin

//GroupBox1.Hide;

Qbuy:=TADOQuery.Create(nil); with Qbuy do begin

Connection:=ADOConnection1; DataSource3.DataSet:=Qbuy; SQL.Clear;

SQL.Add('select * from tui where 目的站=\ Open; end;

if Qbuy.RecordCount<=0 then begin

GroupBox2.Hide;

showmessage('对不起!这趟车的票已经售完.'); end else

GroupBox2.Show; end; end;

procedure Tmain.N7Click(Sender: TObject); begin if log then

main.BitBtn2.Click else

showmessage('请先登陆!谢谢!'); end;

procedure Tmain.N8Click(Sender: TObject);

搜索更多关于: 火车售票系统(毕业论文) 的文档
火车售票系统(毕业论文).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c14jj33abku7px008u2n0_10.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top