cart.aspx.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
public partial class gg : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(Session["lname"]==null)
{
MessageBox.ShowAndRedirect(this, "请先登录!", "login.aspx");
return;
}
if(!IsPostBack)
{
chushi();
bind();
}
}
/// <summary>
/// 初始化
/// </summary>
protected void chushi()
{
StringBuilder strSql = new StringBuilder();
strSql.Append(@"select * from members where lname='" + Session["lname"].ToString() + "'");
//根据编号得到相应的记录
DataSet ds = DbHelperSQL.Query(strSql.ToString());
if (ds.Tables[0].Rows.Count > 0)
{
txt_mname.Text = ds.Tables[0].Rows[0]["mname"].ToString();
txt_tel.Text = ds.Tables[0].Rows[0]["tel"].ToString();
txt_address.Text = ds.Tables[0].Rows[0]["address"].ToString();
}
}
/// <summary>
/// 绑定购物车
/// </summary>
protected void bind()
{
shoppingcart car = new shoppingcart();
if (Session["car"] != null)
{
car = (shoppingcart)Session["car"];
}
Repeater1.DataSource = car.orders;
Repeater1.DataBind();
this.Literal1.Text = car.totalcost.ToString();
后面还有 151 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。