Exemplo n.º 1
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void RptBind(string _strWhere)
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.plugin_menu_class bll = new BLL.plugin_menu_class();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, "sort_id asc,id asc", out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("class_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Exemplo n.º 2
0
        //绑定类别
        private void TreeBind()
        {
            BLL.plugin_menu_class bll = new BLL.plugin_menu_class();
            DataTable             dt  = bll.GetList(0, "", "sort_id asc, id desc").Tables[0];

            this.ddlClass.Items.Clear();

            string Id, Title;

            foreach (DataRow dr in dt.Rows)
            {
                Id    = dr["id"].ToString();
                Title = dr["title"].ToString().Trim();
                this.ddlClass.Items.Add(new ListItem(Title, Id));
            }
        }