Backup/Web/Client/Cart.aspx.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Configuration;
using System.Data;
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.Text;
using System.Collections.Generic;

namespace MrZeng.Web.Client
{
    public partial class Cart : System.Web.UI.Page
    {
        DataTable dt;
        Hashtable hashCar;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!IsPostBack)
                {
                    if (Session["VipNum"] != null)
                    {
                        DataBinder();
                    }
                    else
                    {

                        MrZeng.BLL.Common.Alert("尊敬的个人用户您还没有登录!");
                        MrZeng.BLL.Common.ClientWrite("parent.window.location=\"Default.aspx\"");
                    }
                }
                
            }
        }

        /// <summary>
        /// 为GridView提供数据源
        /// </summary>
        private void DataBinder()
        {
            if (Session["Cart"] == null)
            {
                litMessage.Text = "您还没有开始购物或者清空了购物车!您可以<a href=\"#\"  style=\"color:#ff0000;\" onclick=\"OpenFirstPage()\">去商城首页</a>进行购物或者返回<a href=\"javascript:window.history.back()\" style=\"color:#f00;\">上一页</a>。<br />";
                BtnPanel.Visible = false;
            }
            else
            {
                hashCar = (Hashtable)Session["Cart"];//得到购物车信息
                if (hashCar.Count != 0)
                {
                    dt = MrZeng.BLL.Common.CreateCartTable();//创建临时表以便存储商品信息列表信息
                    DataRow row;
                    foreach (object key in hashCar.Keys)
                    {
                        row = dt.NewRow();
后面还有 160 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。