• 大小: 665KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: C#
  • 标签: 源码  .NET  C#  三层架构  

资源简介

网上书店系统,采用ASP.NET+C#+SQL2000 并采用三层架构,可以直接拿来用,保证质量

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class CheckOut : System.Web.UI.Page
{
    protected void Page_Load(object sender EventArgs e)
    {
        if (billingForm.Address == null)
        {
            //如果帐户地址中没有信息
            //可以提取Profile中的信息为其赋值
            billingForm.Address = Profile.AccountInfo;
        }
    }
    /// 
    /// 当用户选择“与帐户地址相同”复选框时
    /// 用帐户地址的内容填充送货地址
    /// 

    protected void chkShipToBilling_CheckedChanged(object sender EventArgs e)
    {
        if (chkShipToBilling.Checked)
            shippingForm.Address = billingForm.Address;
    }
    protected void Wizard1_NextButtonclick(object sender WizardNavigationEventArgs e)
    {
        //如果当前是第3步,则显示帐户地址和送货地址
        if (Wizard1.ActiveStepIndex == 2)
        {
            //帐户地址
            billingConfirm.Address = billingForm.Address;
            //送货地址
            shippingConfirm.Address = shippingForm.Address;
            //总价格
            ltlTotal.Text = Profile.ShoppingCart.Total.ToString(“c“);
        }
    }
    protected void Wizard1_FinishButtonclick(object sender WizardNavigationEventArgs e)
    {
        //首先判断购物篮中的商品数目是否大于0
        if (Profile.ShoppingCart.CartItems.Count > 0)
        {
            if (Profile.ShoppingCart.Count > 0)
            {
                // 绑定购物篮内容到显示控件
                CartListOrdered.Bind(Profile.ShoppingCart.CartItems);
                // 创建订单
                OrderInfo order = new OrderInfo(int.MinValue DateTime.Now.Date User.Identity.Name GetCreditCardInfo() billingForm.Address shippingForm.Address Profile.ShoppingCart.Total Profile.ShoppingCart.GetOrderLineItems());
                // 保存订单
                Order newOrder = new Order();
                newOrder.Insert(order);
                //清空购物篮
                Profile.ShoppingCart.Clear();
                Profile.Save();
            }
            lblMsg.Text = “您的订单已经提交,谢谢购买本站图书!“;
        }
        else
        {
            lblMsg.Text = “


不能提交订单,因为您的购物篮为空.

nkNewUser href=Default.aspx>继续购物

“;
        }
    }

    /// 
    /// 获取付款信息
    /// 

    private PayInfo GetCreditCardInfo()
    {
        return PayControl1.Pay;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       8184  2006-11-22 11:46  网上书店系统\数据库脚本\BookShop.sql

     文件    3145728  2006-11-22 11:46  网上书店系统\数据库\BookShop.mdf

     文件    1048576  2006-11-22 11:46  网上书店系统\数据库\BookShop_log.ldf

     文件       2746  2006-11-22 11:45  网上书店系统\SQL Server2005源代码\CheckOut.aspx

     文件       2878  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\CheckOut.aspx.cs

     文件       2004  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Default.aspx

     文件       1646  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Default.aspx.cs

     文件        578  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Login.aspx

     文件        406  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Login.aspx.cs

     文件       1288  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Manager.aspx

     文件        408  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Manager.aspx.cs

     文件       2250  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\MasterPage.master

     文件       1878  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\MasterPage.master.cs

     文件       2130  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\RegisterPage.aspx

     文件        515  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\RegisterPage.aspx.cs

     文件      13126  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\styleSheet.css

     文件       1468  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\UserProfile.aspx

     文件        771  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\UserProfile.aspx.cs

     文件       2801  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\Web.Config

     文件        447  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\test.aspx

     文件        405  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\test.aspx.cs

     文件         93  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\images\button-calculate.gif

     文件         61  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\images\button-delete.gif

     文件       1040  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\AddCategory.ascx

     文件        894  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\AddCategory.ascx.cs

     文件        680  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\AddressConfirm.ascx

     文件       1318  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\AddressConfirm.ascx.cs

     文件       3380  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\AddressForm.ascx

     文件       2434  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\AddressForm.ascx.cs

     文件        622  2006-11-22 11:46  网上书店系统\SQL Server2005源代码\controls\CartList.ascx

............此处省略159个文件信息

评论

共有 条评论