shoppingcar.aspx.cs

(开头部分) 5KB

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

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;
using System.Data.SqlClient;
public partial class shoppingcar : System.Web.UI.Page
{
   // Double 总价格;
    Double TtlPrice;
   
    protected void Page_Load(object sender, EventArgs e)
    {
       

        if (!Page.IsPostBack)
        { 
            Image13.Visible = false;
        Msg.Visible = false;
            shoplist();
        }
    }
    protected void shoplist()
    {
        Hashtable Hash;
        if (Session["car"] == null)
        {
            Hash = new Hashtable();
        }
        else
        {
            Hash = (Hashtable)Session["car"];
        }
        if (Hash.Count == 0)
        {
            Image13.Visible = true;
            Msg.Visible = true;
            Msg.Text = "您还没有购物呢?赶快购物吧!";
        }

        string[] ArrKey = new string[Hash.Count];
        int[] ArrVal = new int[Hash.Count];
        string Products = "('";
        Hash.Keys.CopyTo(ArrKey, 0);
        Hash.Values.CopyTo(ArrVal, 0);
        int k = 0;
        for (int j = 0; j < ArrKey.Length; j++)
        {
            if (k > 0) Products += "','"; k++;
            Products += ArrKey.GetValue(j).ToString();
        }
        Products += "')";
      
        SqlConnection conn = new SqlConnection(Class1.lianjie());

后面还有 126 行代码,购买后查看完整代码

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

AI 解读 AI

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

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