Пример #1
0
 public void DbInsertLoginCar(List<LoginCar> list) throws SQLException {
   Iterator<LoginCar> iter = list.iterator();
   LoginCar lc = new LoginCar();
   while (iter.hasNext()) {
     lc = iter.next();
     String sql = "insert into CarInfo values(" + lc.getLoginId() + "," + lc.getCarId() + ");";
     state.executeUpdate(sql);
   }
 }
Пример #2
0
 public int DbInsertLoginInfo(LoginInfo li) throws SQLException {
   String sql =
       "insert into LoginInfo values(default,'"
           + li.getLoginName()
           + "','"
           + li.getLoginPswd()
           + "',"
           + li.getLoginNum()
           + ");";
   return state.executeUpdate(sql);
 }
Пример #3
0
 public int DbInsertCarInfo(CarInfo ci) throws SQLException {
   String sql =
       "insert into CarInfo values(default,'"
           + ci.getCarPlate()
           + "','"
           + ci.getCarModel()
           + "','"
           + ci.getCarLeaseDate()
           + "','"
           + ci.getCarReaturnDate()
           + "');";
   return state.executeUpdate(sql);
 }
Пример #4
0
 public int DbInsertLoginCar(LoginCar lc) throws SQLException {
   String sql = "insert into CarInfo values(" + lc.getLoginId() + "," + lc.getCarId() + ");";
   return state.executeUpdate(sql);
 }