91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6.11MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-01
  • 語言: C#
  • 標簽: 畢業設計??基于c#的??

資源簡介

畢業設計 基于c#的 電子商城購物系統的實現

資源截圖

代碼片段和文件信息

using?System;
using?System.Configuration;
using?System.Data;
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;

public?partial?class?_Default?:?System.Web.UI.Page?
{
protected?void?Page_Load(object?senderEventArgs?e)
{ ///設置分頁控件的屬性
///設置需要分頁的控件
gvPageUC.PageGridView?=?gvProduct;
///設置分頁控件綁定數據的委托
gvPageUC.OnBindControlData?+=?new?UserControls_PageUC.BindGridViewEventHandler(gvPageUC_OnBindControlData);
///綁定控件的數據
if(!Page.IsPostBack)
{
BindPageData();
if(lbCategory.Items.Count?>?0)
{
///lbCategory.SelectedIndex?=?0;
///把商品分類設置為“書籍”
WebShoppingSystem.ListSelectedItemByValue(lbCategory“2“);
BindPageData(Int32.Parse(lbCategory.SelectedValue));
}
}
}

private?void?gvPageUC_OnBindControlData(object?senderEventArgs?e)
{
BindPageData(Int32.Parse(lbCategory.SelectedValue));
}

private?void?BindPageData()
{???///顯示商品分類的層次結構
CategoryOperate.InitCategoryTreeWithList(lbCategory);
}

private?void?BindPageData(int?categoryID)
{???///創建WebShoppingDB數據庫的上下文實例
WebShoppingDBDataContext?db?=?new?WebShoppingDBDataContext(WebShoppingSystem.WebShoppingDBConnectionString);
///查詢記錄
var?query?=?from?p?in?db.Product
where?p.CategoryID?==?categoryID
orderby?p.SellInDate?descending
select?p;
///綁定控件,并顯示數據
gvProduct.DataSource?=?query;
gvProduct.DataBind();

///分頁控件初始化
gvPageUC.InitPageUC();
}

protected?void?gvProduct_RowCommand(object?senderGridViewCommandEventArgs?e)
{
OrderItemInfo?item?=?null;
OrderInfo?order?=?null;

///如果購物車為空
if(Session[Session.SessionID?+?OrderOperate.CART_PRODUCTS_INFO_KEY]?==?null)
{???///為該商品創建一個實例,并添加到購物車中
item?=?GetOrderItemInformation(e);
if(item?==?null)?return;

///創建訂單信息???????????????
order?=?new?OrderInfo();
order.OrderItemList.Add(item);
order.TotalMoney?=?item.Price;
order.TotalNumber?=?item.Number;
///將購物車的信息保存在Session中
Session[Session.SessionID?+?OrderOperate.CART_PRODUCTS_INFO_KEY]?=?order;
}
else
{ ///如果購物車中已經存在商品,則獲取購物車的信息
order?=?(OrderInfo)Session[Session.SessionID?+?OrderOperate.CART_PRODUCTS_INFO_KEY];
///為該商品創建一個實例,并添加到購物車中
item?=?GetOrderItemInformation(e);
if(item?==?null)?return;

///判斷購物車中是否已經存在該商品。
///如果存在,則數量增1,否則添加新商品到購物車中
int?i?=?0;
for(i?=?0;?i? { ///如果存在,則數量增1
if(item.ProductID?==?((OrderItemInfo)order.OrderItemList[i]).ProductID)
{
((OrderItemInfo)order.OrderItemList[i]).Number++;
((OrderItemInfo)order.OrderItemList[i]).ItemTotalMoney?+=?item.ItemTotalMoney;
break;
}
}
///否則添加新商品到購物車中
if(i?==?order.OrderItemList.Count)
{
order.OrderItemList.Add(item);
}
///更新訂單信息
order.TotalNumber++;
order.TotalMoney

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????4035072??2008-04-20?17:52??電子購物商城系統(C#實現)\database\使用還原方式創建數據庫\WebShoppingDB2008.4.20.bak

?????文件????4194304??2008-04-20?17:52??電子購物商城系統(C#實現)\database\使用附加方式創建數據庫\WebShoppingDB_Data.MDF

?????文件????6422528??2008-04-20?17:52??電子購物商城系統(C#實現)\database\使用附加方式創建數據庫\WeShoppingDB_Log.LDF

?????文件??????28872??2008-04-20?17:52??電子購物商城系統(C#實現)\database\數據庫的腳本文件\WebShoppingDB.sql

?????文件????????428??2008-04-19?10:55??電子購物商城系統(C#實現)\WebShopping\Admin\AdminDesktop.aspx

?????文件????????660??2008-04-12?15:26??電子購物商城系統(C#實現)\WebShopping\Admin\Index.aspx

?????文件????????456??2008-04-12?15:04??電子購物商城系統(C#實現)\WebShopping\Admin\Index.aspx.cs

?????文件???????2720??2008-04-10?23:11??電子購物商城系統(C#實現)\WebShopping\Admin\Information\AddNews.aspx

?????文件???????1392??2008-04-10?22:48??電子購物商城系統(C#實現)\WebShopping\Admin\Information\AddNews.aspx.cs

?????文件???????2755??2008-04-12?12:05??電子購物商城系統(C#實現)\WebShopping\Admin\Information\EditNews.aspx

?????文件???????2021??2008-04-10?22:53??電子購物商城系統(C#實現)\WebShopping\Admin\Information\EditNews.aspx.cs

?????文件???????2134??2008-04-12?14:11??電子購物商城系統(C#實現)\WebShopping\Admin\Information\LeavewordInfo.aspx

?????文件???????1369??2008-04-12?14:11??電子購物商城系統(C#實現)\WebShopping\Admin\Information\LeavewordInfo.aspx.cs

?????文件???????3272??2008-04-10?23:29??電子購物商城系統(C#實現)\WebShopping\Admin\Information\leavewordManage.aspx

?????文件???????2363??2008-04-10?23:28??電子購物商城系統(C#實現)\WebShopping\Admin\Information\leavewordManage.aspx.cs

?????文件???????2170??2008-04-10?23:09??電子購物商城系統(C#實現)\WebShopping\Admin\Information\NewsInfo.aspx

?????文件???????1330??2008-04-10?23:09??電子購物商城系統(C#實現)\WebShopping\Admin\Information\NewsInfo.aspx.cs

?????文件???????3678??2008-04-10?23:11??電子購物商城系統(C#實現)\WebShopping\Admin\Information\NewsManage.aspx

?????文件???????2597??2008-04-10?23:28??電子購物商城系統(C#實現)\WebShopping\Admin\Information\NewsManage.aspx.cs

?????文件???????2547??2008-04-10?23:17??電子購物商城系統(C#實現)\WebShopping\Admin\Information\Notice.aspx

?????文件???????1826??2008-04-10?23:19??電子購物商城系統(C#實現)\WebShopping\Admin\Information\Notice.aspx.cs

?????文件???????2124??2008-04-12?15:08??電子購物商城系統(C#實現)\WebShopping\Admin\OperateTree.aspx

?????文件????????777??2008-04-13?14:33??電子購物商城系統(C#實現)\WebShopping\Admin\OperateTree.aspx.cs

?????文件???????2795??2008-04-12?11:36??電子購物商城系統(C#實現)\WebShopping\Admin\Product\AddCategory.aspx

?????文件???????1623??2008-04-12?12:21??電子購物商城系統(C#實現)\WebShopping\Admin\Product\AddCategory.aspx.cs

?????文件???????8880??2008-04-12?13:46??電子購物商城系統(C#實現)\WebShopping\Admin\Product\AddProduct.aspx

?????文件???????2083??2008-04-13?14:10??電子購物商城系統(C#實現)\WebShopping\Admin\Product\AddProduct.aspx.cs

?????文件???????3913??2008-04-16?19:02??電子購物商城系統(C#實現)\WebShopping\Admin\Product\Category.aspx

?????文件???????2318??2008-04-16?19:09??電子購物商城系統(C#實現)\WebShopping\Admin\Product\Category.aspx.cs

?????文件???????2313??2008-04-12?14:12??電子購物商城系統(C#實現)\WebShopping\Admin\Product\CommentInfo.aspx

............此處省略240個文件信息

評論

共有 條評論