FLOWER/ShopCart.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FLOWER
{
public partial class ShopCart : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
if (Session["username"] == null)
{
Response.Redirect("Login.aspx");
}
bind();
}
}
void bind()
{
Repeater1.DataSource = new Common.SQLHelper().Query("select *,(select CurtainPhone from Curtains where Curtains.CurtainId = carts.productid) as CurtainPhone,(select CurtainName from Curtains where Curtains.CurtainId = carts.productid) as CurtainName,IsNull((select price from ProductKC where ProductKC.productid = carts.productid and ProductKC.guige = carts.guige),0) as CurtainPrice,IsNull((select price from ProductKC where ProductKC.productid = carts.productid and ProductKC.guige = carts.guige),0) as ZT from carts where userid=" + Session["userid"].ToString()).Tables[0];
Repeater1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
new Common.SQLHelper().ExecuteSql("delete from carts where infoid = " + HiddenField1.Value);
bind();
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('删除成功!', {icon: 1,kin: 'layer-ext-moon',closeBtn: 0 });", true);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。