資源簡介
可以當做畢業設計的大型項目,含有數據庫的

代碼片段和文件信息
package?com.li.dao;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?java.util.ArrayList;
import?java.util.List;
import?com.li.entity.BuyCarEntity;
import?com.li.util.DBHelper;
import?com.li.util.KeyValue;
public?class?BuyCarDao?{
public?static?DBHelper?db?=?new?DBHelper();
public?static?String?queryIndusttyNameByIndusttyNo(int?industtyno)?throws?SQLException?ClassNotFoundException{
String?sql?=?“select?industty_name?from?tbl_supply?where?industty_no=?“;
KeyValue?k?=?new?KeyValue(1industtyno);
ResultSet?rs?=?db.executeQuery(sql?k);
String?iname?=?null;
if?(rs.next())?{
iname?=?rs.getString(1);
}
db.closeAll();
return?iname;
}
public?static?String?queryCarNameByCarNo(String?carno)?throws?SQLException?ClassNotFoundException{
String?sql?=?“select?car_name?from?tbl_carinfor?where?car_no=?“;
KeyValue?k?=?new?KeyValue(1carno);
ResultSet?rs?=?db.executeQuery(sql?k);
String?carname?=?null;
if?(rs.next())?{
carname?=?rs.getString(1);
}
db.closeAll();
return?carname;
}
public?static?boolean?addBuyCarInfo(BuyCarEntity?bce)?throws?SQLException?ClassNotFoundException{
String?sql?=?“insert?into?tbl_buyinfo?values(??????????????)“;
KeyValue?k1?=?new?KeyValue(1bce.getBuyno());
KeyValue?k2?=?new?KeyValue(2bce.getBuydate());
KeyValue?k3?=?new?KeyValue(3bce.getIndusttyno());
KeyValue?k4?=?new?KeyValue(4bce.getIndusttyname());
KeyValue?k5?=?new?KeyValue(5bce.getCallperson());
KeyValue?k6?=?new?KeyValue(6bce.getCalltel());
KeyValue?k7?=?new?KeyValue(7bce.getMail());
KeyValue?k8?=?new?KeyValue(8bce.getCarno());
KeyValue?k9?=?new?KeyValue(9bce.getCartype());
KeyValue?k10?=?new?KeyValue(10bce.getCarname());
KeyValue?k11?=?new?KeyValue(11bce.getBuyprice());
KeyValue?k12?=?new?KeyValue(12bce.getBuyamount());
KeyValue?k13?=?new?KeyValue(13bce.getYewuyuan());
KeyValue?k14?=?new?KeyValue(14bce.getZhidanyuan());
int?i?=?db.executeUpdate(sql?k1k2k3k4k5k6k7k8k9k10k11k12k13k14);
return?i>0?true:false;
}
public?static?boolean?deleteBuyCarInfo(int?buyno)?throws?SQLException?ClassNotFoundException{
String?sql?=?“delete?from?tbl_buyinfo?where?buy_no=?“;
KeyValue?k?=?new?KeyValue(1buyno);
int?i?=?db.executeUpdate(sql?k);
return?i>0?true:false;
}
public?static?boolean?isExists(int?buyno)?throws?SQLException?ClassNotFoundException{
String?sql?=?“select?*?from?tbl_buyinfo?where?buy_no=?“;
KeyValue?k?=?new?KeyValue(1buyno);
boolean?bln?=?db.isExists(sql?k);
return?bln;
}
public?static?boolean?modifyBuyCarInfo(BuyCarEntity?bce)?throws?SQLException?ClassNotFoundException{
String?sql?=?“update?tbl_buyinfo?set?buy_date=?industty_no=?industty_name=?callperson=?calltel=?mail=?car_no=?car_type=?car_name=?buyprice=?buyamount=??where?buy_no=?“;
KeyValue?k1?=?new?KeyValue(1bce.getBuydate());
KeyValue?k2?=?new?KeyValue(2bce.getIndusttyno());
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\
?????文件?????????357??2014-08-31?16:51??汽車銷售管理系統帶數據庫\CarSaleManagement\.classpath
?????文件?????????383??2014-08-29?11:19??汽車銷售管理系統帶數據庫\CarSaleManagement\.project
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\.settings\
?????文件?????????598??2014-08-29?11:19??汽車銷售管理系統帶數據庫\CarSaleManagement\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\
?????文件????????5832??2014-09-04?09:30??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\BuyCarDao.class
?????文件????????5383??2014-09-03?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\CarDao.class
?????文件????????5261??2014-09-03?20:19??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\CustomerDao.class
?????文件????????4612??2014-09-04?10:33??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\DepositoryInfoDao.class
?????文件????????1846??2014-09-04?10:27??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\MadiaDao.class
?????文件?????????999??2014-08-31?21:21??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\ManagerDao.class
?????文件????????5115??2014-09-03?08:39??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\OrderCarDao.class
?????文件????????6897??2014-09-04?09:29??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\SaleInfoDao.class
?????文件????????3345??2014-09-03?20:12??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\SupplyDao.class
?????文件????????4179??2014-09-03?15:42??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\dao\SystemPreserverDao.class
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\
?????文件????????4295??2014-09-04?08:11??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\BuyCarEntity.class
?????文件????????2015??2014-09-04?08:52??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\CarEntity.class
?????文件????????2149??2014-09-01?20:34??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\CustomerEntity.class
?????文件????????2636??2014-09-03?21:36??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\DepositoryEntity.class
?????文件????????1540??2014-09-03?16:23??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\ManagerEntity.class
?????文件????????3077??2014-09-02?20:44??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\OrderCarEntity.class
?????文件????????3204??2014-09-04?09:27??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\SaleInfoEntity.class
?????文件????????1449??2014-09-03?20:00??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\entity\SupplyEntity.class
?????目錄???????????0??2014-11-27?20:40??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\util\
?????文件????????3179??2014-09-01?13:23??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\util\DBHelper.class
?????文件?????????856??2014-08-31?19:08??汽車銷售管理系統帶數據庫\CarSaleManagement\bin\com\li\util\KeyValue.class
............此處省略66個文件信息
評論
共有 條評論