103 lines
3.3 KiB
C#
103 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Text;
|
|
using System.Globalization;
|
|
using System.Security.Cryptography;
|
|
using System.Security.Cryptography.X509Certificates;
|
|
namespace Mtxfw.shop
|
|
{
|
|
public partial class Member_zhongjiang_list : Mtxfw.Utility.MemberBase
|
|
{
|
|
|
|
Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank();
|
|
Mtxfw.DAL.user_info daouser = new Mtxfw.DAL.user_info();
|
|
public Mtxfw.DAL.User_zhongjiang daozj = new Mtxfw.DAL.User_zhongjiang();
|
|
public Mtxfw.Utility.Config Config = new Mtxfw.Utility.Config();
|
|
#region 判断页面是否刷新
|
|
private bool _refreshState;
|
|
private bool _isRefresh;
|
|
|
|
/// <summary>
|
|
/// 判断页面是否刷新
|
|
/// </summary>
|
|
public bool IsRefresh
|
|
{
|
|
get
|
|
{
|
|
return _isRefresh;
|
|
}
|
|
}
|
|
protected override void LoadViewState(object savedState)
|
|
{
|
|
object[] allStates = (object[])savedState;
|
|
base.LoadViewState(allStates[0]);
|
|
_refreshState = (bool)allStates[1];
|
|
_isRefresh = _refreshState == (bool)Session["__ISREFRESH"];
|
|
}
|
|
protected override object SaveViewState()
|
|
{
|
|
Session["__ISREFRESH"] = _refreshState;
|
|
object[] allStates = new object[2];
|
|
allStates[0] = base.SaveViewState();
|
|
allStates[1] = !_refreshState;
|
|
return allStates;
|
|
}
|
|
#endregion
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
if (!IsPostBack)
|
|
{
|
|
Page.Title = "我的中奖记录 - " + GetWebName;
|
|
|
|
Data_Bind();
|
|
|
|
}
|
|
MyPager.PageChanged += delegate(object s, EventArgs ex)
|
|
{
|
|
Data_Bind();
|
|
};
|
|
|
|
}
|
|
|
|
protected void Data_Bind()
|
|
{
|
|
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
|
String SJ = Mtxfw.Utility.Tools.SafeSQL(Request.QueryString["SJ"]);
|
|
String SJ2 =Mtxfw.Utility.Tools.SafeSQL(Request.QueryString["SJ2"]);
|
|
sb.Append("(utype=0 or utype=1)");
|
|
sb.Append(" And MemberId=" + Card);
|
|
string strOrder = " Order By addtime desc";
|
|
MyPager.PageSize = 100;
|
|
MyPager.RecordCount = daozj.GetCount("" + sb.ToString());
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, daozj.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.MemberId) as MemberName,", "" + sb.ToString() + strOrder));
|
|
|
|
}
|
|
|
|
//功能函数。将变量值不为空的参数组成字符串
|
|
#region 字符串串联函数
|
|
public string appendParam(string returnStr, string paramId, string paramValue)
|
|
{
|
|
if (returnStr != "")
|
|
{
|
|
if (paramValue != "")
|
|
{
|
|
returnStr += "&" + paramId + "=" + paramValue;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (paramValue != "")
|
|
{
|
|
returnStr = paramId + "=" + paramValue;
|
|
}
|
|
}
|
|
return returnStr;
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
} |