WmptWap/GiftList.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WMPT.SQLServerDAL;
using WMPT.Common;
using WMPT.Model;
namespace Html5
{
public partial class gift_list : System.Web.UI.Page
{
Gifts bll = new Gifts();
protected void Page_Load(object sender, EventArgs e)
{
//UserHelp.IsLogin(Server.UrlEncode(Request.Url.PathAndQuery));
ECustomerInfo userInfo = UserHelp.GetUser();
if (userInfo == null)
{
Response.Redirect("~/login.aspx?returnurl=" + Server.UrlEncode(Request.RawUrl));
}
if (!Page.IsPostBack)
{
GetGiftByType();
}
}
/// <summary>
/// 根据参数获取指定类型的产品
/// </summary>
/// <returns></returns>
private void GetGiftByType()
{
//绑定优惠券
string cardsql = " mtype = 1 and CardCount > 0";//为现金券 并且 数量大于0
IList<batshopcardInfo> cardlist = new batshopcard().GetList(10, 1, cardsql, "sortnum", 1);
rptVoucher.DataSource = cardlist;
rptVoucher.DataBind();
//绑定其他礼品
IList<GiftsInfo> list = new List<GiftsInfo>();
rptGiftList.DataSource = bll.GetList(100, 1, " 1=1 ", "sortnum", 1);
rptGiftList.DataBind();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
