Ejemplo n.º 1
0
        protected override void PageLoad()
        {
            base.PageLoad();
            this.action = RequestHelper.GetQueryString <string>("Action");
            int queryString = RequestHelper.GetQueryString <int>("Page");

            if (queryString < 1)
            {
                queryString = 1;
            }
            int pageSize = 15;
            int count    = 0;

            this.accountType = 2;
            if (this.action == "Money")
            {
                this.accountType = 1;
            }
            this.userAccountRecordList = UserAccountRecordBLL.ReadUserAccountRecordList(queryString, pageSize, ref count, base.UserID, this.accountType);
            if (this.userAccountRecordList.Count > 0)
            {
                if (this.accountType == 1)
                {
                    this.moneyLeft = UserAccountRecordBLL.ReadMoneyLeftBeforID(this.userAccountRecordList[0].ID, base.UserID);
                }
                else
                {
                    this.pointLeft = UserAccountRecordBLL.ReadPointLeftBeforID(this.userAccountRecordList[0].ID, base.UserID);
                }
            }
            this.ajaxPagerClass.CurrentPage = queryString;
            this.ajaxPagerClass.PageSize    = pageSize;
            this.ajaxPagerClass.Count       = count;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 页面加载方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CheckAdminPower("ReadUserAccountRecord", PowerCheckType.Single);
                userID      = RequestHelper.GetQueryString <int>("UserID");
                user        = UserBLL.ReadUserMore(userID);
                accountType = RequestHelper.GetQueryString <int>("AccountType");
                PageSize    = 12;
                //if (accountType == int.MinValue)
                //{
                //    userAccountRecordList = UserAccountRecordBLL.ReadList(CurrentPage, PageSize, AccountRecordType.Money, userID, ref Count);
                //}
                //else
                //{
                userAccountRecordList = UserAccountRecordBLL.ReadList(CurrentPage, PageSize, AccountRecordType.Point, userID, ref Count);
                //}

                if (userAccountRecordList.Count > 0)
                {
                    //if (accountType == (int)AccountRecordType.Money)
                    //{
                    //    moneyLeft = UserAccountRecordBLL.ReadMoneyLeftBeforID(userAccountRecordList[0].Id, userID);
                    //}
                    //else
                    //{
                    pointLeft = UserAccountRecordBLL.ReadPointLeftBeforID(userAccountRecordList[0].Id, userID);
                    //}
                }
                //BindControl(MyPager);
                BindControl(userAccountRecordList, RecordList, MyPager);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 根据现有积分计算剩余积分
        /// </summary>
        /// <param name="point">现有积分</param>
        /// <returns></returns>
        protected object ShowPointLeft(object id, object point)
        {
            int tmp = 0;

            int.TryParse(id.ToString(), out tmp);
            int tmpPoint = 0;

            int.TryParse(point.ToString(), out tmpPoint);
            return(UserAccountRecordBLL.ReadPointLeftBeforID(tmp, userID) + tmpPoint);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            action = RequestHelper.GetQueryString <string>("Action");
            int currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int pageSize = 15;
            int count    = 0;

            accountType = AccountRecordType.Point;
            if (action == "Money")
            {
                accountType = AccountRecordType.Money;
            }
            userAccountRecordList = UserAccountRecordBLL.ReadList(currentPage, pageSize, accountType, base.UserId, ref count);
            if (userAccountRecordList.Count > 0)
            {
                if (accountType == AccountRecordType.Money)
                {
                    moneyLeft = UserAccountRecordBLL.ReadMoneyLeftBeforID(userAccountRecordList[0].Id, base.UserId);
                }
                else
                {
                    pointLeft = UserAccountRecordBLL.ReadPointLeftBeforID(userAccountRecordList[0].Id, base.UserId);
                }
            }
            ajaxPagerClass.CurrentPage = currentPage;
            ajaxPagerClass.PageSize    = pageSize;
            ajaxPagerClass.Count       = count;
            ajaxPagerClass.FirstPage   = "<<首页";
            ajaxPagerClass.PreviewPage = "<<上一页";
            ajaxPagerClass.NextPage    = "下一页>>";
            ajaxPagerClass.LastPage    = "末页>>";
            ajaxPagerClass.ListType    = false;
            ajaxPagerClass.DisCount    = false;
            ajaxPagerClass.PrenextType = true;
        }