【正文】
圖 管理員登錄后界面 個(gè)人信息修改 會(huì)員登錄后點(diǎn)擊個(gè)人資料進(jìn)入修改個(gè)人。在此界面中,管理員可已查看應(yīng)經(jīng)處理后的訂單,也可以處理用戶新下的訂單。在折扣管理中,管理員 可以修改不同等級(jí)用戶可以享受的折扣率,在文本框中填寫不同的 01 間的小數(shù)后,點(diǎn)擊“保存”系統(tǒng)把信息存到數(shù)據(jù)庫(kù)中。這一功能通過(guò)兩個(gè)模塊來(lái)實(shí)現(xiàn): 、 。填入查詢條件可以搜索出已經(jīng)為特價(jià)的圖書將其修改回原 26 價(jià),也可以搜索出要調(diào)整成為特價(jià)的圖書修改其價(jià)格變?yōu)樘貎r(jià)圖書。選定一些圖書在一定時(shí)間內(nèi) 以較優(yōu)惠的價(jià)格銷售。 ()。 // Open the connection and execute the Command ()。+cartID+39。 } // Create Instance of Connection and Command Object OleDbConnection myConnection = new OleDbConnection([ConnectionString]+Configura[DbName])。 ()。 // Open the connection and execute the Command ()。+cartID+39。 } public void RemoveItem(string cartID, int BookNo) { // Create Instance of Connection and Command Object OleDbConnection myConnection = new OleDbConnection([ConnectionString]+Configura[DbName])。 OleDbDataReader result = 25 ()。 order by Title,Model, myConnection)。 OleDbCommand myCommand = new OleDbCommand(select Item_Title,Brand, ,Shoppin,(Cost * ) as ExtendedAmount from Categories,Store_Manage,ShoppingCart where = and = and =39。 return ((int)[0].Rows[0][ItemCount])。 ,myConnection)。 Adpt = new OleDbDataAdapter(select count(BookNo) as ItemCount from ShoppingCart where cartID=39。 OleDbDataAdapter Adpt = new OleDbDataAdapter()。 (Ds)。+cartID+39。 (Ds)。+cartID+39。 24 (Ds)。+cartID+39。 OleDbConnection myConnection = new OleDbConnection([ConnectionString]+Configura[DbName])。 } } public void AddItem(string cartID, int BookNo, int Quantity) { DataSet Ds = new DataSet()。 // Send tempCartId back to client as a cookie [applloinfo_CartID].Value = ()。 } // If user is not authenticated, either fetch (or issue) a new temporary cartID if ([applloinfo_CartID] != null) { return [applloinfo_CartID].Value。 } } } ?? ?? 23 } } (5)引用到的類( )中的部分代碼 public class ShoppingCartDB { public ShoppingCartDB() { } public String GetShoppingCartId() { // Obtain current HttpContext of ASP+ Request context = 。 } else { (cartId, (),quantity)。 // If the quantity field is changed or delete is checked if (quantity != (int)[i] || == true) { Label lblCategory_Id = (Label) [i].FindControl(Category_Id)。 // Wrap in try/catch block to catch errors in the event that someone types in // an invalid value for quantity int quantity。s controls TextBox quantityTxt = (TextBox) [i].FindControl(Quantity)。 i 。s shopping cart ID String cartId = ()。 } } 22 void UpdateShoppingCartDatabase() { cart = new ()。 //Update Total Price Label =(cartId)。 } else { // Databind Gridcontrol with Shopping Cart Items = (cartId)。 // If no items, hide details and display message if ((cartId) == 0) { = false。 // Obtain current user39。 } else { = 你不可以提交空購(gòu)物車 .。 // If the cart isn39。 // If cart is not empty, proceed on to checkout page cart = new ()。 PopulateShoppingCartList()。 // Populate the shopping cart the first time the page is accessed. if ( == false) { PopulateShoppingCartList()。 else =Session[aplloinfo_Name].ToString()+39。 else if(Session[aplloinfo_Name].ToString()==) =Session[aplloinfo_UserID].ToString()+39。 (4)購(gòu)物車頁(yè)面 的部分代碼 ?? ?? public ShoppingCart() { += new (Page_Init)。修改過(guò)后點(diǎn)擊 updatae(修改)保存所做的修改。如圖 圖 書籍詳細(xì)信息 20 圖 購(gòu)物車頁(yè)面 ( 3)購(gòu)物車內(nèi)容的現(xiàn)實(shí)與修改 會(huì)員在購(gòu)物過(guò)程中可能要察看 已經(jīng)買了那些書,來(lái)決定是否繼續(xù)購(gòu)買;而且,也應(yīng)該讓會(huì)員察看一下已買的書及其總價(jià)格。 ( 1)購(gòu)物 車的初始化 當(dāng)有用 戶來(lái) 訪,就 要分 給他一 個(gè)購(gòu) 物車 ,把用 戶 ID 保存 到 Session 中Session[aplloinfo_UserId] = 。 購(gòu)物車 購(gòu)物車的實(shí)現(xiàn)主要有兩種方法,即 Session 對(duì)象和 Cookie,由于 Cookie 有一些安全隱患,所以本次網(wǎng)站開發(fā)采用 Session 對(duì)象來(lái)實(shí)現(xiàn)。列表框中的值由數(shù)據(jù)庫(kù)中動(dòng)態(tài)綁定。 圖 網(wǎng)上書店首頁(yè) 19 在高級(jí)搜索中客戶可以通過(guò)書名、作者、出版社、 ISBN、出版日期、圖書類別來(lái)進(jìn)行綜合檢索。點(diǎn)擊購(gòu)物車,登錄用戶可以看到自己在購(gòu)物車中的貨物。首頁(yè)的下邊是 bottom 項(xiàng),包括管理員的聯(lián)系方式和一些友情連接。點(diǎn)擊相應(yīng)圖書名稱可以打開圖書詳細(xì)信息頁(yè)面并可選擇把書籍放入購(gòu)物車。書籍分類區(qū)可以看到書籍的大的分類(父類),每個(gè)父類下面有部分子類,點(diǎn)擊 more查詢父類下的其他書籍,點(diǎn)擊子類可查看子類下的書籍。已注冊(cè)會(huì)員可以通過(guò)填寫 ID 和密碼,然后點(diǎn)擊登錄 (“ Login” )按鈕進(jìn)行登錄。點(diǎn)擊高級(jí)可以進(jìn)入復(fù)合條件搜索界面如圖。在文本框中填寫要查詢的關(guān)鍵字,下拉列表的選項(xiàng)由書名、作者、出版社、ISBN 碼組成,可在其中選出要查詢的字段。 網(wǎng)站首頁(yè)的頂端是網(wǎng)站的頭部( ),由網(wǎng)站標(biāo)志和導(dǎo)航條組成,其中導(dǎo)航條包括首頁(yè)、購(gòu)物車、個(gè)人資料、管理本站、留言板。這兩種顏色有機(jī)結(jié)合再加入一些紅色黃色和紫色的鏈接顏色,整個(gè)網(wǎng)站的顏色即不雜亂也不 單調(diào),能夠重點(diǎn)突出,又不會(huì)有喧賓奪主的感覺,給訪問(wèn)者創(chuàng)造一個(gè)輕松舒適的閱讀環(huán)境。淡藍(lán)色整潔清爽,頗具現(xiàn)代感,又顯得親切溫和。顧客下載頁(yè)面后首先可能注意的是主頁(yè)的主題顏色和結(jié)構(gòu)。 /*End The Create Table Sql*/ 界面的設(shè)計(jì) 信息系統(tǒng)的輸入 /輸出識(shí)系統(tǒng)與用戶的接口,用戶對(duì)系統(tǒng)的評(píng)價(jià)內(nèi)容出了有運(yùn)行效率、可靠性、可修改性外,很大程度是針對(duì)輸入和輸出進(jìn)行的,輸入 /輸出及人 機(jī)界面的設(shè)計(jì)關(guān)系到系統(tǒng)的靈活性、易用性和實(shí)用 性,一個(gè)好的輸入 /輸出界面可以增加用戶使用系統(tǒng)的信心和興趣,使用戶在欣賞中得到所需的信息,因此是信息系統(tǒng)設(shè)計(jì)的重要內(nèi)容。 CREATE TABLE IF NOT EXISTS T_SpecialPrice( /*特價(jià)書籍 */ ISBN char(13) not null primary key, /*ISBN*/ OldPrice float not null, /*原價(jià) */ Price float not null /*現(xiàn)價(jià) */ )。 ALTER TABLE T_IndentList ADD CONSTRAINT PRIMARY KEY CLUSTERED (ID,IndentNo)。 /*初始化管理員用戶 */ CREATE TABLE IF NOT EXISTS T_Indent( /*購(gòu)物車訂單號(hào)表 */ IndentNo int auto_increment not null primary key, /*訂單編號(hào) */ UserId varchar(20) not null, /*用戶序列號(hào) */ SubmitTime datetime not null, /*提交訂單時(shí)間 */ Address varchar(150) not null, /*收貨地址 */ Receiver varchar(20) not null, /*收貨人 TotalPrice float, /*總金額 IsPayoff int null default 0, /*用戶是否已付款 */ IsSales int null default 0 /*是否已發(fā)貨 */ )auto_increment=1000000。jiang39。admin39。 CREATE TABLE IF NOT EXISTS T_BookAdminuser( /*商店管理員表 */ AdminUser varchar(20) not null primary key, /*管理員用戶名 */ AdminPass varchar(20) /*管理員密碼 */ )。 16 CREATE TABLE IF NOT EXISTS T_BookClass( /*商店圖書類別 */ BookClassNo char(2) Not Null primary key, /*圖書類別編碼 */ BookClassName varchar(30) not null /*圖書類別名 */ )。 use bookshop。收到郵寄款或信用卡付賬后 ,查詢出要處理的該訂單 ,將書籍郵寄給讀者。有些書籍需要調(diào)整為特價(jià) ,通過(guò)本功能發(fā)布特價(jià)書籍。有新書來(lái)到時(shí)