示例#1
0
        public PageModel <PointDetailInfo> GetUserPoints(PointQuery query)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(" UserId = " + query.UserId);
            if (query.TradeType.HasValue)
            {
                stringBuilder.AppendFormat("AND TradeType = " + query.TradeType.Value.GetHashCode());
            }
            return(DataHelper.PagingByRownumber <PointDetailInfo>(query.PageIndex, query.PageSize, "JournalNumber", SortAction.Desc, true, "Hishop_PointDetails", "JournalNumber", stringBuilder.ToString(), "*"));
        }
示例#2
0
        private DataGridViewModel <Dictionary <string, object> > GetDataList(int userId, int?typeId, int pageindex = 1)
        {
            DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >();

            if (userId > 0)
            {
                PointQuery pointQuery = new PointQuery();
                pointQuery.PageIndex = pageindex;
                pointQuery.PageSize  = 10;
                pointQuery.UserId    = userId;
                if (typeId.HasValue && typeId.Value > 0)
                {
                    pointQuery.TradeType = (PointTradeType)typeId.Value;
                }
                PageModel <PointDetailInfo> userPoints = MemberHelper.GetUserPoints(pointQuery);
                dataGridViewModel.rows  = DataHelper.ListToDictionary(userPoints.Models);
                dataGridViewModel.total = userPoints.Total;
            }
            return(dataGridViewModel);
        }
示例#3
0
        protected override void AttachChildControls()
        {
            this.rptPointList     = (WapTemplatedRepeater)this.FindControl("rptPointList");
            this.litCurrentPoints = (Literal)this.FindControl("litCurrentPoints");
            this.litHistoryPoints = (Literal)this.FindControl("litHistoryPoints");
            this.txtTotalPages    = (HtmlInputHidden)this.FindControl("txtTotal");
            int pageIndex = default(int);

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int num = default(int);

            if (!int.TryParse(this.Page.Request.QueryString["size"], out num))
            {
                num = 20;
            }
            MemberInfo user = HiContext.Current.User;

            if (user != null)
            {
                Literal literal = this.litCurrentPoints;
                int     num2    = user.Points;
                literal.Text = num2.ToString();
                int historyPoints = MemberHelper.GetHistoryPoints(user.UserId);
                this.litHistoryPoints.Text = historyPoints.ToString();
                PointQuery pointQuery = new PointQuery();
                pointQuery.PageIndex = pageIndex;
                pointQuery.PageSize  = 10;
                pointQuery.UserId    = user.UserId;
                PageModel <PointDetailInfo> userPoints = MemberHelper.GetUserPoints(pointQuery);
                this.rptPointList.DataSource = userPoints.Models;
                this.rptPointList.DataBind();
                HtmlInputHidden control = this.txtTotalPages;
                num2 = userPoints.Total;
                control.SetWhenIsNotNull(num2.ToString());
            }
            PageTitle.AddSiteNameTitle("我的积分");
        }
示例#4
0
 cpSpatialIndexQuery(space.activeShapes, ref context, bb, new cpSpatialIndexQueryFunc(PointQuery), data);