Backstage code ticket and find the code to verify the flight

Source: Internet
Author: User

  

//Backstage Tickets     PublicList<string[]>Buy (Integer lid,string radio1) {List<String[]> result=NewArraylist<string[]>(); if(Radio1.tostring (). Equals ("First Class") ) {String SQL= "Select B. ' Name ', a.linename,\r\n" + "a.startplace,a.endplace,a.planedate,a.starttime,a.endtime" + ", A.I D,d.planetype,d.tdcprice "+" from line A,aircompany b,plane d\r\n "+" where a.id=? and B.id=a.pid and D.lname=a.linename; "; Query Q=GS (). createsqlquery (SQL); Q.setparameter (0, lid); Result=q.list (); }    Else if(Radio1.tostring (). Equals ("Business Class")) ) {String SQL= "Select B. ' Name ', a.linename,\r\n" + "a.startplace,a.endplace,a.planedate,a.starttime,a.endtime" + ", A.I D,d.planetype,d.swcprice "+" from line A,aircompany b,plane d\r\n "+" where a.id=? and B.id=a.pid and D.lname=a.linename; "; Query Q=GS (). createsqlquery (SQL); Q.setparameter (0, lid); Result=q.list (); }    Else if(Radio1.tostring (). Equals ("Economy class")) ) {String SQL= "Select B. ' Name ', a.linename,\r\n" + "a.startplace,a.endplace,a.planedate,a.starttime,a.endtime" + ", A.I D,d.planetype,d.jjcprice "+" from line A,aircompany b,plane d\r\n "+" where a.id=? and B.id=a.pid and D.lname=a.linename; "; Query Q=GS (). createsqlquery (SQL); Q.setparameter (0, lid); Result=q.list (); }    Else if(Radio1.tostring (). Equals ("Ex-Class")) ) {String SQL= "Select B. ' Name ', a.linename,\r\n" + "a.startplace,a.endplace,a.planedate,a.starttime,a.endtime" + ", A.I D,d.planetype,d.thcprice "+" from line A,aircompany b,plane d\r\n "+" where a.id=? and B.id=a.pid and D.lname=a.linename; "; Query Q=GS (). createsqlquery (SQL); Q.setparameter (0, lid); Result=q.list (); }            returnresult; }    //find the right route     PublicList<string[]>searchline (String sfz,string ddz,string cfrq) {List<String[]> result =NewArrayList (); List List=NewArrayList (); String SQL= "Select B. ' Name ', a.linename,a.startplace,a.starttime,a.endplace,a.endtime, \ r \ n" + "D.TDCPRICE,C.TDCNUM,D.SW cprice,c.swcnum,d.jjcprice,c.jjcnum,d.thcprice,c.thcnum,\r\n "+" D.planetype,a.id,b.logourl,d.tdcnum as Tdcnum 1,d.swcnum as swcnum1,d.jjcnum as jjcnum1,d.thcnum as THCNUM1, "+" c.id as CID, c.planedate as cplanedate from L ine A,aircompany B, seatnum c,plane d\r\n "+" WHERE a.pid=b.id and a.startcity=?\r\n "+" and A.E Ndcity=? and a.planedate=? and C.lname=a.linename "+" and D.lname=a.linename "; Query Q=GS (). createsqlquery (SQL); Q.setparameter (0, SFZ); Q.setparameter (1, Ddz); Q.setparameter (2, CFRQ); Result=q.list (); returnresult; }    

Backstage code ticket and find the code to verify the flight

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.