資源簡介
用ASP.NET和SQL 編寫的網上書店 實現了網上購書以及管理員管理圖書

代碼片段和文件信息
using?System;
using?System.Data;
using?System.Configuration;
using?System.Linq;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.HtmlControls;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.xml.Linq;
using?System.Data.SqlClient;
///?
///BLhelper?的摘要說明
///?
public?class?BLhelper
{
????private?string?userName;//用戶名稱
????private?string?password;//用戶密碼
????public?string?UserName
????{
????????get?{?return?userName;?}
????????set?{?userName?=?value;?}
????}
????public?string?Password
????{
????????get?{?return?password;?}
????????set?{?password?=?value;?}
????}
public?BLhelper()
{
//
//TODO:?在此處添加構造函數邏輯
//
}
????///?
????///?登錄時驗證
????///?
????///?
????public?bool?Login()
????{
????????string?sql?=?“select?COUNT(*)?from?Member?where?會員名稱=‘“?+?this.userName?+?“‘?and?會員密碼=‘“?+?this.password?+?“‘“;
????????DBHelper?db?=?new?DBHelper();
????????int?count?=?Convert.ToInt32(db.ExecuteScalar(sql));
????????if?(count?>?0)
????????{
????????????return?true;
????????}
????????else
????????{
????????????return?false;
????????}
????}
????///?
????///?注冊時將數據存入數據庫
????///?
????///?電話
????///?Email
????///?地址
????///?
????public?bool?Register(string?tel?string?mail?string?address)
????{
????????string?sql?=?string.Format(“INSERT?INTO?Member?values(‘{0}‘‘{1}‘‘{2}‘‘{3}‘‘{4}‘)“?this.userName?this.password?tel?mail?address);
????????DBHelper?db?=?new?DBHelper();
????????int?result?=?Convert.ToInt32(db.ExecuteNonQuery(sql));
????????if?(result?==?1)
????????{
????????????return?true;
????????}
????????else
????????{
????????????return?false;
????????}
????}
????///?
????///?獲得書的種類數
????///?
????///?
????public?int?CategoryCount()
????{
????????string?sql?=?“select?COUNT(*)?from?bookCategory“;
????????DBHelper?db?=?new?DBHelper();
????????int?count?=?Convert.ToInt32(db.ExecuteScalar(sql));
????????return?count;
????}
????DBHelper?db?=?new?DBHelper();
????///?
????///???獲取書的名稱
????///?
????///?
????public?SqlDataReader?CategoryName()
????{
????????string?sql?=?“select?種類名稱?from?bookCategory“;
???????return??db.GetReader(sql);
???????
????}
????///?
????///?獲取所有書籍
????///?
????///?
????///?
????public?DataTable?BookShow()//將書籍顯示在對應的datagridview中
????{
????????return?(db.GetDataSet(“select?*?from?bookList“).Tables[0]);
????}
????///?
????///?獲取種類編稱限制的書的種類名稱
????///?
????///?
????///?
????public?DataTable?SelectBookShow(string?sql)
????{
????????string?strsql?=?db.ExecuteScalar(“select?種類編號?from
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-09-16?15:21??網上書店\
?????目錄???????????0??2014-06-22?22:41??網上書店\bookShop\
?????文件???????25415??2014-06-22?15:53??網上書店\bookShop\1.jpg
?????文件???????37383??2014-06-22?15:56??網上書店\bookShop\2.jpg
?????文件???????15620??2014-06-22?15:57??網上書店\bookShop\3.jpg
?????文件????????6620??2014-06-22?15:58??網上書店\bookShop\4.jpg
?????目錄???????????0??2014-06-22?22:36??網上書店\bookShop\App_Code\
?????文件???????13356??2014-06-21?16:43??網上書店\bookShop\App_Code\BLhelper.cs
?????文件?????????986??2014-06-22?22:29??網上書店\bookShop\App_Code\BLMange.cs
?????文件????????3864??2014-06-21?00:00??網上書店\bookShop\App_Code\DBHelper.cs
?????文件????????1218??2014-06-21?16:54??網上書店\bookShop\App_Code\SiteHelp.cs
?????目錄???????????0??2014-06-22?22:32??網上書店\bookShop\App_Data\
?????文件????10485760??2014-06-22?20:28??網上書店\bookShop\App_Data\ASPNETDB.MDF
?????文件??????516096??2014-06-22?20:28??網上書店\bookShop\App_Data\aspnetdb_log.ldf
?????文件?????????986??2014-06-22?22:29??網上書店\bookShop\BLMange.cs
?????文件????????2897??2014-06-22?20:13??網上書店\bookShop\BookIntruduce.aspx
?????文件?????????458??2014-06-22?16:53??網上書店\bookShop\BookIntruduce.aspx.cs
?????文件????????2066??2014-06-22?20:17??網上書店\bookShop\BookItem.aspx
?????文件????????1587??2014-06-22?18:33??網上書店\bookShop\BookItem.aspx.cs
?????文件????????2705??2014-06-22?21:24??網上書店\bookShop\bookorder.aspx
?????文件????????2343??2014-06-21?16:57??網上書店\bookShop\bookorder.aspx.cs
?????文件????????9466??2014-06-22?22:13??網上書店\bookShop\BookShop.aspx
?????文件????????2109??2014-06-19?16:46??網上書店\bookShop\BookShop.aspx.cs
?????文件????????3243??2014-06-22?21:04??網上書店\bookShop\EditUser.aspx
?????文件????????2213??2014-06-22?20:51??網上書店\bookShop\EditUser.aspx.cs
?????文件????????4162??2014-06-22?21:24??網上書店\bookShop\EUser.aspx
?????文件?????????453??2014-06-22?21:03??網上書店\bookShop\EUser.aspx.cs
?????文件???????85152??2014-06-22?16:35??網上書店\bookShop\focus.swf
?????文件?????????985??2014-06-21?17:26??網上書店\bookShop\Global.asax
?????目錄???????????0??2014-06-22?22:32??網上書店\bookShop\img\
?????文件????????1265??2014-06-09?11:32??網上書店\bookShop\img\上一頁.gif
............此處省略72個文件信息
- 上一篇:C#藥店管理系統(C-SHARP源碼)
- 下一篇:c#微信通訊的Web平臺
評論
共有 條評論