示例#1
0
        void BindPromoteSales()
        {
            int num2;
            int promotiontype = 0;

            if (int.TryParse(this.Page.Request.QueryString["promoteType"], out num2))
            {
                promotiontype = num2;
            }
            Pagination pagination = new Pagination();

            pagination.PageIndex = this.pager.PageIndex;
            pagination.PageSize  = this.pager.PageSize;
            int       totalPromotes = 0;
            DataTable table         = CommentBrowser.GetPromotes(pagination, promotiontype, out totalPromotes);

            table.Columns.Add("PromoteTypeName");
            if ((table != null) && (table.Rows.Count > 0))
            {
                foreach (DataRow row in table.Rows)
                {
                    row["PromoteTypeName"] = this.ConvertPromoteType((PromoteType)((int)row["PromoteType"]));
                }
                this.rptPromoteSales.DataSource = table;
                this.rptPromoteSales.DataBind();
            }
            this.pager.TotalRecords = totalPromotes;
        }
示例#2
0
        private void BindPromoteSales()
        {
            int promotiontype = 0;
            int num;

            if (int.TryParse(this.Page.Request.QueryString["promoteType"], out num))
            {
                promotiontype = num;
            }
            Pagination pagination = new Pagination();

            pagination.PageIndex = this.pager.PageIndex;
            pagination.PageSize  = this.pager.PageSize;
            int       totalRecords = 0;
            DataTable promotes     = CommentBrowser.GetPromotes(pagination, promotiontype, out totalRecords);

            if (promotes != null && promotes.Rows.Count > 0)
            {
                this.rptPromoteSales.DataSource = promotes;
                this.rptPromoteSales.DataBind();
            }
            this.pager.TotalRecords = totalRecords;
        }