資源簡介
完整版 畢業(yè)論文 eshop畢業(yè)論文加源代碼

代碼片段和文件信息
package?com.wy.dao;
import?java.sql.*;
import?java.util.*;
import?com.wy.tool.JDBConnection;
import?com.wy.domain.AfficheForm;
//對公告信息的操作
public?class?AfficheDao?{
??private?Connection?connection?=?null;?//定義連接的對象
??private?PreparedStatement?ps?=?null;?//定義預準備的對象
??private?JDBConnection?jdbc?=?null;?//定義數據庫連接對象
??public?AfficheDao()?{
????jdbc?=?new?JDBConnection();
????connection?=?jdbc.connection;?//利用構造方法取得數據庫連接
??}
??//刪除的方法
??public?void?deleteAffiche(Integer?id)?{
????try?{
??????ps?=?connection.prepareStatement(“delete?from?tb_affiche?where?id=?“);
??????ps.setInt(1?id.intValue());
??????ps.executeUpdate();
??????ps.close();
????}
????catch?(SQLException?ex)?{
????}
??}
??//修改的方法
??public?void?updateAffiche(AfficheForm?form)?{
????try?{
??????ps?=?connection.prepareStatement(“update?tb_affiche?set?name=?content=??where?id=?“);
??????ps.setString(1?form.getName());
??????ps.setString(2?form.getContent());
??????ps.setInt(3?form.getId().intValue());
??????ps.executeUpdate();
??????ps.close();
????}
????catch?(SQLException?ex)?{
????}
??}
//添加的方法
??public?void?insertAffiche(AfficheForm?form)?{
????try?{
??????ps?=?connection.prepareStatement(“insert?into?tb_affiche?values?(??getDate())“);
??????ps.setString(1?form.getName());
??????ps.setString(2?form.getContent());
??????ps.executeUpdate();
??????ps.close();
????}
????catch?(SQLException?ex)?{
????}
??}
//以數據庫流水號為條件查詢信息
??public?AfficheForm?selectOneAffiche(Integer?id)?{
????AfficheForm?affiche?=?null;
????try?{
??????ps?=?connection.prepareStatement(“select?*?from?tb_affiche?where?id=?“);
??????ps.setInt(1?id.intValue());
??????ResultSet?rs?=?ps.executeQuery();
??????while?(rs.next())?{
????????affiche?=?new?AfficheForm();
????????affiche.setId(Integer.valueOf(rs.getString(1)));
????????affiche.setName(rs.getString(2));
????????affiche.setContent(rs.getString(3));
????????affiche.setIssueTime(rs.getString(4));
??????}
????}
????catch?(SQLException?ex)?{
????}
????return?affiche;
??}
//全部查詢的方法
??public?List?selectAffiche()?{
????List?list?=?new?ArrayList();
????AfficheForm?affiche?=?null;
????try?{
??????ps?=?connection.prepareStatement(“select?*?from?tb_affiche?order?by?id?DESC“);
??????ResultSet?rs?=?ps.executeQuery();
??????while?(rs.next())?{
????????affiche?=?new?AfficheForm();
????????affiche.setId(Integer.valueOf(rs.getString(1)));
????????affiche.setName(rs.getString(2));
????????affiche.setContent(rs.getString(3));
????????affiche.setIssueTime(rs.getString(4));
????????list.add(affiche);
??????}
????}
????catch?(SQLException?ex)?{
????}
????return?list;
??}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????401??2009-05-09?15:07??200614293李國慶\shop\bg-resultMember.jsp
?????文件???????2306??2009-05-09?15:07??200614293李國慶\shop\bg-resultTen.jsp
?????文件???????2961??2009-05-09?15:07??200614293李國慶\shop\bg-selectContent.jsp
?????文件???????3341??2009-05-09?15:07??200614293李國慶\shop\bg-selectMember.jsp
?????文件???????2364??2009-05-09?15:07??200614293李國慶\shop\bg-sellResult.jsp
?????文件???????2720??2009-05-09?15:07??200614293李國慶\shop\bg-smallTypeInsert.jsp
?????文件????????394??2009-05-09?15:07??200614293李國慶\shop\bg-smallTypeResult.jsp
?????文件???????4559??2009-05-09?15:07??200614293李國慶\shop\bg-smallTypeSelect.jsp
?????文件???????1474??2009-05-09?15:07??200614293李國慶\shop\bg-up.jsp
?????文件????????954??2009-05-09?15:07??200614293李國慶\shop\cart_add.jsp
?????文件???????4061??2009-05-09?15:07??200614293李國慶\shop\cart_checkOut.jsp
?????文件???????1793??2009-05-09?15:07??200614293李國慶\shop\cart_checkOutOrder.jsp
?????文件????????170??2009-05-09?15:07??200614293李國慶\shop\cart_clear.jsp
?????文件???????4241??2009-05-09?15:07??200614293李國慶\shop\cart_detail.jsp
?????文件????????825??2009-05-09?15:07??200614293李國慶\shop\cart_modify.jsp
?????文件???????3694??2009-05-09?15:07??200614293李國慶\shop\cart_see.jsp
?????文件????????308??2009-05-09?15:07??200614293李國慶\shop\connection.jsp
?????文件???????1756??2009-05-09?15:07??200614293李國慶\shop\fg-One.jsp
?????文件???????2415??2009-05-09?15:07??200614293李國慶\shop\fg-Two.jsp
?????文件???????1427??2009-05-09?15:07??200614293李國慶\shop\fg-afficheSelect.jsp
?????文件????????820??2009-05-09?15:07??200614293李國慶\shop\fg-checkMemberResult.jsp
?????文件????????533??2009-05-09?15:07??200614293李國慶\shop\fg-down.jsp
?????文件???????1150??2009-05-09?15:07??200614293李國慶\shop\fg-four.jsp
?????文件???????2512??2009-05-09?15:07??200614293李國慶\shop\fg-goodSelectOne.jsp
?????文件????????716??2009-05-09?15:07??200614293李國慶\shop\fg-goodSorts.jsp
?????文件???????6598??2009-05-09?15:07??200614293李國慶\shop\fg-left.jsp
?????文件???????3709??2009-05-09?15:07??200614293李國慶\shop\fg-memberRegister.jsp
?????文件???????3726??2009-05-09?15:07??200614293李國慶\shop\fg-selectBigGoods.jsp
?????文件???????4006??2009-05-09?15:07??200614293李國慶\shop\fg-selectFreeGoods.jsp
?????文件???????2891??2009-05-09?15:07??200614293李國慶\shop\fg-selectNewGoods.jsp
............此處省略185個文件信息
- 上一篇:易語言源碼大全 有游戲、外掛、輔助等等
- 下一篇:粒子群算法參考論文權威
評論
共有 條評論