資源簡介
個人博客畢業(yè)論文加程序代碼,數(shù)據(jù)庫,所有文件

代碼片段和文件信息
package?com.wy.dao;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?java.util.ArrayList;
import?java.util.List;
import?com.wy.form.ArticleForm;
import?com.wy.tool.JDBConnection;
public?class?ArticleDao?{
private?JDBConnection?connection?=?null;
private?ArticleForm?articleForm?=?null;
public?ArticleDao()?{
connection?=?new?JDBConnection();
}
public?boolean?operationArticle(String?operation?ArticleForm?form)?{
boolean?flag?=?false;
String?sql?=?null;
if?(operation.equals(“添加“))
sql?=?“insert?into?tb_article?values?(‘“?+?form.getTypeId()?+?“‘‘“
+?form.gettitle()?+?“‘‘“?+?form.getContent()?+?“‘‘“
+?form.getPhTime()?+?“‘‘“?+?form.getNumber()?+?“‘)“;
if?(operation.equals(“修改“))
sql?=?“update?tb_article?set?typeID=‘“?+?form.getTypeId()
+?“‘title=‘“?+?form.gettitle()?+?“‘content=‘“
+?form.getContent()?+?“‘?where?id=‘“?+?form.getId()?+?“‘“;
if?(operation.equals(“刪除“))
sql?=?“delete?from?tb_article?where?id=‘“?+?form.getId()?+?“‘“;
if?(operation.equals(“增加“))
sql?=?“update?tb_article?set?number=number+1?where?id=‘“
+?form.getId()?+?“‘“;
if?(connection.executeUpdate(sql))?{
flag?=?true;
}
return?flag;
}
public?List?queryArticle(Integer?typeId)?{
List?list?=?new?ArrayList();
String?sql?=?null;
if?(typeId?==?null)
sql?=?“select?*?from?tb_article“;
else
sql?=?“select?*?from?tb_article?where?typeID=‘“?+?typeId
+?“‘?order?by?id?desc“;
ResultSet?rs?=?connection.executeQuery(sql);
try?{
while?(rs.next())?{
articleForm?=?new?ArticleForm();
articleForm.setId(rs.getInt(1));
articleForm.setTypeId(rs.getInt(2));
articleForm.settitle(rs.getString(3));
articleForm.setContent(rs.getString(4));
articleForm.setPhTime(rs.getString(5));
articleForm.setNumber(rs.getInt(6));
list.add(articleForm);
}
}?catch?(SQLException?e)?{
e.printStackTrace();
}
return?list;
}
public?ArticleForm?queryArticleForm(Integer?id)?{
String?sql?=?“select?*?from?tb_article?where?id=‘“?+?id?+?“‘“;
ResultSet?rs?=?connection.executeQuery(sql);
try?{
while?(rs.next())?{
articleForm?=?new?ArticleForm();
articleForm.setId(rs.getInt(1));
articleForm.setTypeId(rs.getInt(2));
articleForm.settitle(rs.getString(3));
articleForm.setContent(rs.getString(4));
articleForm.setPhTime(rs.getString(5));
articleForm.setNumber(rs.getInt(6));
}
}?catch?(SQLException?e)?{
e.printStackTrace();
}
this.operationArticle(“添加“?articleForm);
return?articleForm;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????42784??2006-12-08?08:51??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\MFM1992
?????文件???????5690??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\JS\validate.js.bak
?????文件???????1209??2006-12-10?10:25??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\Serverstart.bas
?????文件???????8651??2006-12-23?09:38??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\Sysfunction.bas
?????文件?????156854??2002-06-07?17:36??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\PICTURE\ABOUT.BMP
?????文件????4800054??2005-12-11?00:51??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\PICTURE\Aqua?Blue.bmp
?????文件???????3126??2003-07-16?10:03??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\ICO\BUTTON\Cancel.bmp
?????文件????????630??1996-04-17?14:48??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\ICO\BUTTON\Delete.BMP
?????文件??????41238??2003-06-30?11:03??www.NewXing.com\畢業(yè)設(shè)計11——13\hotelinformation\PICTURE\LOGIN.BMP
?????文件???????3488??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\dao\ArticleDao.class
?????文件???????1681??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\form\ArticleForm.class
?????文件???????7386??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\webiter\ArticleServlet.class
?????文件???????2743??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\dao\ArticleTypeDao.class
?????文件???????1116??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\form\ArticleTypeForm.class
?????文件????????673??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\tool\Chinese.class
?????文件???????4793??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\dao\ConsumerDao.class
?????文件???????2497??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\form\ConsumerForm.class
?????文件???????6059??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\webiter\ConsumerServlet.class
?????文件????????647??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\tool\CountTime.class
?????文件???????2991??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\dao\DiscussDao.class
?????文件???????1329??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\form\DiscussForm.class
?????文件???????3840??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\webiter\DiscussServlet.class
?????文件???????3140??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\dao\FriendDao.class
?????文件???????1293??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\form\FriendForm.class
?????文件???????4079??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\webiter\FriendServlet.class
?????文件???????2907??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\tool\JDBConnection.class
?????文件???????3572??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\tool\MyPagination.class
?????文件???????3106??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\dao\PhotoDao.class
?????文件???????1329??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\form\PhotoForm.class
?????文件???????5337??2008-01-08?11:04??www.NewXing.com\20\BLOG\WebRoot\WEB-INF\classes\com\wy\webiter\PhotoSerlvet.class
............此處省略357個文件信息
- 上一篇:液壓站設(shè)計與使用 張利平
- 下一篇:地形匹配導(dǎo)航程序
評論
共有 條評論