private void CityBind(DropDownList ddl) { BLL.openarea bll = new BLL.openarea(); DataTable dt = bll.GetList(0, "1=1", "id asc").Tables[0]; ddl.Items.Clear(); ddl.Items.Add(new ListItem("请选择城市...", "")); foreach (DataRow dr in dt.Rows) { ddl.Items.Add(new ListItem(dr["city"].ToString(), dr["id"].ToString())); } }
private void RptBind(string _strWhere, string _orderby) { this.page = Vincent._DTcms.DTRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; BLL.openarea bll = new BLL.openarea(); BuysingooShop.Model.manager manModel = Session[Vincent._DTcms.DTKeys.SESSION_ADMIN_INFO] as Model.manager; if (manModel.brand_id != 0) { _strWhere += " and brand_id=" + manModel.brand_id; } this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Vincent._DTcms.Utils.CombUrlTxt("openarea_list.aspx", "status={0}&payment_status={1}&express_status={2}&keywords={3}&page={4}", this.status.ToString(), this.payment_status.ToString(), this.express_status.ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Vincent._DTcms.Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }