UI/cart.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Models;
using BLL;
namespace UI
{
public partial class cart : System.Web.UI.Page
{
Manager m = new Manager();
ProductInfo p = new ProductInfo();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataBind();
}
}
private void DataBind()
{
//if (Request["id"] != null && Request["id"] != string.Empty)
//{
// p.ProductID = int.Parse(Request["id"]);
// this.DataList1.DataSource = m.GetByP(p);
// this.DataList1.DataBind();
// DataTable dt = m.GetSum(p);
// this.Label2.Text = dt.Rows[0]["s"].ToString();
//}
this.DataList1.DataSource = m.GetP(p);
this.DataList1.DataBind();
DataTable dt = m.GetSum(p);
this.Label2.Text = dt.Rows[0]["s"].ToString();
//this.lblmessage2.Text = dt.Rows[0]["ProductPrice"].ToString();
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Write("<script>window.location='shouye.aspx';</script>");
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Response.Write("<script>window.location='dingdan.aspx';</script>");
}
protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "add")
{
p.ProductID = int.Parse(e.CommandArgument.ToString());
bool flag = m.UpdateAddP(p);
if (flag)
后面还有 34 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。