153 lines
5.0 KiB
C#
153 lines
5.0 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_ZDXXJL_List : Mtxfw.Utility.MemberBase
|
|
{
|
|
|
|
Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank();
|
|
Mtxfw.DAL.user_info daouser = new Mtxfw.DAL.user_info();
|
|
Mtxfw.DAL.user_Results_jl2 daojl2 = new Mtxfw.DAL.user_Results_jl2();
|
|
public Mtxfw.Utility.Config Config = new Mtxfw.Utility.Config();
|
|
protected string strTitle="现金币",strcurrend1 = "", strcurrend2 = "", strcurrend3 = "", strcurrend4 = "", strcurrend5 = "";
|
|
|
|
#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 (Request.QueryString["s"] != null)
|
|
{
|
|
if (Request.QueryString["s"].ToString() == "0")
|
|
{
|
|
strcurrend2 = "class=\"currend\"";
|
|
strTitle = "消费币";
|
|
}
|
|
else if (Request.QueryString["s"].ToString() == "1")
|
|
{
|
|
strcurrend3 = "class=\"currend\"";
|
|
strTitle = "积分";
|
|
}
|
|
else if (Request.QueryString["s"].ToString() == "-1")
|
|
{
|
|
strcurrend4 = "class=\"currend\"";
|
|
}
|
|
else
|
|
{
|
|
strcurrend1 = "class=\"currend\"";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
strcurrend1 = "class=\"currend\"";
|
|
}
|
|
if (!IsPostBack)
|
|
{
|
|
Page.Title = strTitle + "详细记录 - " + 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"]);
|
|
if (Request.QueryString["s"] != null)
|
|
{
|
|
if (Request.QueryString["s"].ToString() == "0")
|
|
{
|
|
sb.Append("and utype=0");
|
|
}
|
|
else if (Request.QueryString["s"].ToString() == "1")
|
|
{
|
|
sb.Append("and utype=1");
|
|
}
|
|
else
|
|
{
|
|
sb.Append("and utype=2");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
sb.Append("and utype=2");
|
|
}
|
|
|
|
sb.Append(" And MemberId=" + Card);
|
|
if (!String.IsNullOrEmpty(SJ) && !String.IsNullOrEmpty(SJ2))
|
|
{
|
|
sb.Append(" and (addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') ");
|
|
}
|
|
string strOrder = " Order By Seef desc,addtime desc";
|
|
MyPager.PageSize = 100;
|
|
MyPager.RecordCount = daojl2.GetCount("IFDelete=0" + sb.ToString());
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, daojl2.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.MemberId) as MemberName,", "IFDelete=0" + 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
|
|
|
|
}
|
|
} |