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_JiangJin_Log : 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(); #region 判断页面是否刷新 private bool _refreshState; private bool _isRefresh; /// /// 判断页面是否刷新 /// 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) { Response.Cache.SetNoStore(); Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1); Response.Expires = 0; Response.CacheControl = "no-cache"; 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(" 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 addtime desc"; MyPager.PageSize = 12; MyPager.RecordCount = daojl2.GetCount("utype='0'" + sb.ToString()); Mtxfw.Utility.Tools.ToBind(Repeater1, daojl2.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.MemberId) as MemberName,", "utype='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 } }