CmsWeb/shop/myCoupon.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;
public partial class shop_myCoupon : System.Web.UI.Page
{
protected int user_id;//会员id
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Cms.Model.C_user userModel = adminUser.GetuserLoginState();
this.user_id = userModel.id;
Application["usercard"] = userModel.usercard;
Bind_date(user_id);//赋值操作
}
}
#region 赋值操作========================
public void Bind_date(int user_id)
{
Cms.Model.C_user userModel = adminUser.GetuserLoginState();
this.user_id = userModel.id;
DataTable dt = new Cms.BLL.C_user_coupon().GetList("user_id=" + this.user_id).Tables[0];
if (dt != null && dt.Rows.Count > 0)
{
RepCoupon.DataSource = dt;
RepCoupon.DataBind();
}
else
{
RepCoupon.DataSource = dt;
RepCoupon.DataBind();
}
}
/// <summary>
/// 获取商品的路径
/// </summary>
/// <param name="article_id"></param>
/// <returns></returns>
public string getUrl(string id)
{
string result = "";
if (new Cms.BLL.C_collect().GetModel(Convert.ToInt32(id)).integral.ToString() == "0")
{
result = "/shop/productDetail.aspx?id=" + new Cms.BLL.C_collect().GetModel(Convert.ToInt32(id)).article_id;
}
else
{
result = "/shop/integralDetail.aspx?id=" + new Cms.BLL.C_collect().GetModel(Convert.ToInt32(id)).article_id;
}
return result;
}
后面还有 35 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
