Esempio n. 1
0
        protected override void PageLoad()
        {
            base.PageLoad();
            if (base.UserId > 0)
            {
                CurrentUser = UserBLL.ReadUserMore(base.UserId);
            }
            int currentPage = RequestHelper.GetQueryString <int>("Page");

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

            pointProductList = PointProductBLL.SearchList(currentPage, pageSize, new PointProductSearchInfo {
                IsSale = (int)BoolType.True, ValidDate = DateTime.Now
            }, ref count);

            Title = "积分兑换商品";
            if (RequestHelper.GetQueryString <string>("Action") == "LoadProducts")
            {
                this.LoadProdcuts();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();

            int currentPage = RequestHelper.GetQueryString <int>("Page");

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

            GiftList = PointProductBLL.SearchList(currentPage, pageSize, new PointProductSearchInfo {
            }, ref count);

            pager.CurrentPage = currentPage;
            pager.PageSize    = pageSize;
            pager.Count       = count;

            pager.CurrentPage = currentPage;
            pager.PageSize    = pageSize;
            pager.Count       = count;
            if (!string.IsNullOrEmpty(isMobile))
            {
                pager.ShowType    = 4;
                pager.PagerCSS    = "page_number";
                pager.PreviewPage = "上一页";
                pager.NextPage    = "下一页";
                pager.URL         = "/mobile/Gift.aspx?Page=$Page";
            }
            else
            {
                pager.ShowType    = 2;
                pager.PagerCSS    = "pagin";
                pager.CurrentCSS  = "current";
                pager.PreviewPage = "<<上一页";
                pager.NextPage    = "下一页>>";
                pager.URL         = "gift.html?Page=$Page";
            }
        }
Esempio n. 3
0
        protected void LoadProdcuts()
        {
            int pageNum  = RequestHelper.GetQueryString <int>("pageNum");
            int pageSize = RequestHelper.GetQueryString <int>("pageSize");
            int count    = 0;
            List <PointProductInfo> _pointProductList = new List <PointProductInfo>();

            if (pageNum > 1)
            {
                var resultlist = PointProductBLL.SearchList(pageNum, pageSize, new PointProductSearchInfo {
                    IsSale = (int)BoolType.True, ValidDate = DateTime.Now
                }, ref count);
                foreach (PointProductInfo item in resultlist)
                {
                    item.Photo = item.Photo.Replace("Original", "400-300");
                    _pointProductList.Add(item);
                }
            }
            Response.Clear();
            ResponseHelper.Write(JsonConvert.SerializeObject(new { count = _pointProductList.Count, dataList = _pointProductList }));
            ResponseHelper.End();
        }
Esempio n. 4
0
        protected override void PageLoad()
        {
            base.PageLoad();
            if (base.UserId > 0)
            {
                CurrentUser = UserBLL.ReadUserMore(base.UserId);
            }
            int currentPage = RequestHelper.GetQueryString <int>("Page");

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

            pointProductList = PointProductBLL.SearchList(currentPage, pageSize, new PointProductSearchInfo {
                IsSale = (int)BoolType.True, ValidDate = DateTime.Now
            }, ref count);

            pager.Init(currentPage, pageSize, count, false);

            Title = "积分兑换商品";
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CheckAdminPower("ReadPointProduct", PowerCheckType.Single);

                string   productName = RequestHelper.GetQueryString <string>("ProductName");
                DateTime beginDate   = RequestHelper.GetQueryString <DateTime>("BeginDate");
                DateTime endDate     = RequestHelper.GetQueryString <DateTime>("EndDate");

                ProductName.Text = productName;
                BeginDate.Text   = beginDate == DateTime.MinValue ? "" : beginDate.ToString("yyyy-MM-dd");
                EndDate.Text     = endDate == DateTime.MinValue ? "" : endDate.ToString("yyyy-MM-dd");

                PointProductSearchInfo searchPointProduct = new PointProductSearchInfo();
                searchPointProduct.ProductName = productName;
                searchPointProduct.BeginDate   = beginDate;
                searchPointProduct.EndDate     = endDate;
                List <PointProductInfo> pointProductInfoList = PointProductBLL.SearchList(CurrentPage, PageSize, searchPointProduct, ref Count);

                BindControl(pointProductInfoList, RecordList, MyPager);
            }
        }