//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