• 大小: 726KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-03
  • 语言: Java
  • 标签: jsp  

资源简介

jsp火车订票系统,MVC(JSP+JAVABEAN+servlet),MYSQL数据库

资源截图

代码片段和文件信息

package bean;
import java.sql.*;
public class book {
  private String userid;   //用户号
  private int countnum;    //订票数目
  private double dingjin;  //订金
  private double afford;   //应付金额
  private String startplace;
  private String destination; 

  public String getuserId() {
    return userid;
  }
  public void setuserId(String uid) {
    this.userid = uid;
  }                                                             
  public String getStartplace() {
    return startplace;
  }
  public void setStartplace(String sp) {
    this.startplace = sp;
  }
  public String getDestination() {
    return destination;
  }
  public void setDestination(String md) {
    this.destination = md;
  }
      public int getCountnum() {
    return countnum;
  }
  public void setCountnum(int num) {
    this.countnum=num;
  }
  public double getSub() {
    return dingjin;
  }
  public void setSub(double dj) {
    this.dingjin= dj;
  }
  public double getAfford() {
    return afford;
  }
  public void setAfford(double afford) {
    this.afford = afford;
  }

  
  
  public boolean hasLogin(String tidString uid){   //检查该订票信息是否已经存在 
   boolean f=true;
   String sql=“select user_idticket_id from ticket“ +
    “ where ticket_id =‘“+tid+“‘ and user_id=‘“+uid+“‘ “;
   sqlBean db =new sqlBean();
   try{
   ResultSet rs=db.executeQuery(sql);
   if(rs.next()){ f=false;}
   else{ f=true;}
   }catch(Exception e){ e.getMessage();}
   return f;
                          }
                          
  public ResultSet  getBook(){
String sql=“select user_idbook.start_stationbook.dest_stationsubscriptioncountnumberafford“ +
“train_idtypeprice from bookticket“ +
“ where book.start_station=ticket.start_station and book.dest_station=ticket.dest_station“;
sqlBean db= new sqlBean();
ResultSet rs = db.executeQuery(sql);
 return rs;
                         } 
  
                         
   /* public void updateBook(){
     String sql=“update book SET “ +
        “startplace=‘“+startplace+“‘destination=‘“+destination+“‘“ +
        “starttime=‘“+starttime+“‘remain=‘“+shengyu+“‘“ +
        “price=‘“+price+“‘seat=‘“+seat+“‘train_id=‘“+trainid+“‘“+
                   “ where ticket_id=‘“+ticketid+“‘ “;
                 sqlBean db= new sqlBean();
                 db.executeInsert(sql);
                 
     } */    
                                                                                                                              
  public void deleteBook(){
    
     String sql=“delete from book where start_station=‘“+startplace+“‘ and “ +
     “ user_id=‘“+userid+“‘ and dest_station=‘“+destination+“‘“;
     sqlBean db= new sqlBean();
     db.executeDelete(sql);
     }                       
          
  public int dele

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        433  2009-07-09 15:16  TrainOrdering\.classpath

     文件        312  2009-07-09 15:16  TrainOrdering\.mymetadata

     文件       1419  2009-07-09 15:16  TrainOrdering\.project

     文件        406  2009-07-09 15:16  TrainOrdering\.settings\.jsdtscope

     文件        157  2009-07-09 15:16  TrainOrdering\.settings\org.eclipse.core.resources.prefs

     文件         49  2009-07-09 15:16  TrainOrdering\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2009-07-09 15:16  TrainOrdering\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       8824  2009-07-09 23:41  TrainOrdering\ordering.sql

     文件       3380  2009-07-09 18:58  TrainOrdering\src\bean\book.java

     文件       4749  2009-07-09 19:33  TrainOrdering\src\bean\query.java

     文件       2257  2009-07-09 15:16  TrainOrdering\src\bean\register.java

     文件       2977  2009-07-09 15:16  TrainOrdering\src\bean\sqlBean.java

     文件       3523  2009-07-09 15:16  TrainOrdering\src\bean\sta_sta.java

     文件       4835  2009-07-10 07:49  TrainOrdering\src\bean\ticket.java

     文件       3990  2009-07-09 16:00  TrainOrdering\src\bean\train.java

     文件       6131  2009-07-10 08:30  TrainOrdering\src\bean\tra_sta_sta.java

     文件       2282  2009-07-09 15:16  TrainOrdering\src\bean\type.java

     文件       4520  2009-07-09 15:16  TrainOrdering\src\bean\user.java

     文件       2937  2009-07-09 15:16  TrainOrdering\src\servlet\logincheck.java

     文件       4605  2009-07-09 15:16  TrainOrdering\src\servlet\passwordsvlt.java

     文件       7554  2009-07-09 15:16  TrainOrdering\src\servlet\querysvlt.java

     文件       4452  2009-07-09 15:16  TrainOrdering\src\servlet\registersvlt.java

     文件       5367  2009-07-09 15:16  TrainOrdering\src\servlet\sta_stasvlt.java

     文件       8339  2009-07-10 07:54  TrainOrdering\src\servlet\ticketsvlt.java

     文件       6553  2009-07-09 19:05  TrainOrdering\src\servlet\trainsvlt.java

     文件       7097  2009-07-10 08:31  TrainOrdering\src\servlet\tra_sta_stasvlt.java

     文件       3764  2009-07-09 15:16  TrainOrdering\src\servlet\typesvlt.java

     文件       5520  2009-07-09 15:16  TrainOrdering\src\servlet\usersvlt.java

     文件       7398  2009-07-09 15:16  TrainOrdering\WebRoot\addressquery.jsp

     文件       6657  2009-07-09 15:16  TrainOrdering\WebRoot\addressquery1.jsp

............此处省略112个文件信息

评论

共有 条评论