示例#1
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.sites bll = new BLL.sites();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

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

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
示例#2
0
        private void TreeBind()
        {
            BLL.sites bll = new BLL.sites();
            DataTable dt  = bll.GetList(0, "", "sort_id asc,id desc").Tables[0];

            this.ddlSitePath.Items.Clear();
            this.ddlSitePath.Items.Add(new ListItem("生成模板到", ""));
            foreach (DataRow dr in dt.Rows)
            {
                if (string.IsNullOrEmpty(dr["templet_path"].ToString()))
                {
                    this.ddlSitePath.Items.Add(new ListItem("├ " + dr["title"].ToString(), dr["build_path"].ToString()));
                }
                else
                {
                    this.ddlSitePath.Items.Add(new ListItem("├ " + dr["title"].ToString() + "(当前模板:" + dr["templet_path"].ToString() + ")", dr["build_path"].ToString()));
                }
            }
        }
示例#3
0
        private void SiteBind(int _id)
        {
            string strWhere = string.Empty;

            if (_id > 0)
            {
                strWhere = "is_lock=0 and parent_id=0 and id<>" + _id;
            }
            else
            {
                strWhere = "is_lock=0 and parent_id=0";
            }
            BLL.sites bll = new BLL.sites();
            DataTable dt  = bll.GetList(0, strWhere, "sort_id asc,id desc").Tables[0];

            this.ddlParentId.Items.Clear();
            this.ddlParentId.Items.Add(new ListItem("不基于其它站点", "0"));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlParentId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString()));
            }
        }