using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; namespace Mtxfw.shop { public partial class Member_JiangLi_List : Mtxfw.Utility.MemberBase { public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info(); public Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results(); Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank(); public Double umoney=0,umoney0=0; #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) { Page.Title = "我的积分 - " + GetWebName; Mtxfw.Model.user_info model = daoUser.GetModel(Card); if (model != null) { if (model.uLevel8 == 1) { Mtxfw.Utility.Tools.Message("账户被冻结!", "/Member_Index.aspx"); } umoney = model.umoney; umoney0 = model.umoney0; } Data_Bind(); } } protected void Data_Bind() { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("and utype=20 and Seef<>-1 And MemberId=" + Card); string strOrder = " Order By addtime desc"; MyPager.PageSize = 100; MyPager.RecordCount = daoResults.GetCount("IFDelete=0" + sb.ToString()); Mtxfw.Utility.Tools.ToBind(Repeater1, daoResults.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.UserId) as UserName,(Select P_NAME From P_Product b Where b.P_Id=convert(int,a.Managers)) as ProductName,(Select P_images From P_Product b Where b.P_Id=convert(int,a.Managers)) as ProductImages,", "IFDelete=0" + sb.ToString() + strOrder)); } } }