代码修改后的版本,全部提交
This commit is contained in:
103
Mtxfw.shop/Member_choujiangq_list.aspx.cs
Normal file
103
Mtxfw.shop/Member_choujiangq_list.aspx.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
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_choujiangq_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_xjcjq daocjq = new Mtxfw.DAL.User_xjcjq();
|
||||
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) And Seef<2");
|
||||
sb.Append(" And MemberId=" + Card);
|
||||
string strOrder = " Order By addtime desc";
|
||||
MyPager.PageSize = 100;
|
||||
MyPager.RecordCount = daocjq.GetCount("" + sb.ToString());
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater1, daocjq.GetPager(MyPager, "(Select xfje From choujiang b Where b.Id=a.cjId) as qjname,(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
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user