private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); if (this.status > 0) { this.ddlStatus.SelectedValue = this.status.ToString(); } if (this.payment_status > 0) { this.ddlPaymentStatus.SelectedValue = this.payment_status.ToString(); } if (this.distribution_status > 0) { this.ddlDistributionStatus.SelectedValue = this.distribution_status.ToString(); } this.txtKeywords.Text = this.keywords; BLL.orders bll = new BLL.orders(); this.rptList.DataSource = bll.list_pagesWhere(this.page, this.pageSize, " and " + _strWhere, _orderby); this.totalCount = bll.GetTatalNum(_strWhere); this.rptList.DataBind(); //綁定頁碼 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("order_list.aspx", "status={0}&payment_status={1}&distribution_status={2}&keywords={3}&page={4}", this.status.ToString(), this.payment_status.ToString(), this.distribution_status.ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void Bind(int page) { int totalCount; int pageSize = 8; //發佈的商品 if (!string.IsNullOrEmpty(Request.QueryString["status"])) { sqlwhere = " and status=" + Request.QueryString["status"]; } DataTable dt = bll.list_pagesWhere(page, pageSize, " and user_id=" + WEBUserCurrent.UserID + sqlwhere, " order by id desc"); if (dt.Rows.Count > 0) { this.repddata.DataSource = dt.DefaultView; this.repddata.DataBind(); totalCount = bll.GetTatalNum(" user_id=" + WEBUserCurrent.UserID + sqlwhere); aspPage.PageSize = pageSize; aspPage.RecordCount = totalCount; } }