예제 #1
0
        private void TreeBind()
        {
            Model.wx_userweixin  weixin = GetWeiXinCode();
            BLL.article_category bll    = new BLL.article_category();
            DataTable            dt     = bll.GetList(" wid=" + weixin.id);

            //最新车讯
            this.ddlZxcx.Items.Clear();
            this.ddlZxcx.Items.Add(new ListItem("请选择最新车讯...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                string Id    = dr["id"].ToString();
                string Title = dr["title"].ToString().Trim();
                this.ddlZxcx.Items.Add(new ListItem(Title, Id));
            }
            //最新优惠
            this.ddlZxyh.Items.Clear();
            this.ddlZxyh.Items.Add(new ListItem("请选择最新优惠...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                string Id    = dr["id"].ToString();
                string Title = dr["title"].ToString().Trim();
                this.ddlZxyh.Items.Add(new ListItem(Title, Id));
            }
            //尊享二手车
            this.ddlEsc.Items.Clear();
            this.ddlEsc.Items.Add(new ListItem("请选择二手车...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                string Id    = dr["id"].ToString();
                string Title = dr["title"].ToString().Trim();
                this.ddlEsc.Items.Add(new ListItem(Title, Id));
            }

            //品牌相册
            BLL.wx_albums_info aiBll = new BLL.wx_albums_info();
            DataTable          aidt  = aiBll.GetList(" wid=" + weixin.id).Tables[0];

            this.ddlPpxc.Items.Clear();
            this.ddlPpxc.Items.Add(new ListItem("请选择品牌相册...", ""));
            foreach (DataRow dr in aidt.Rows)
            {
                string Id    = dr["id"].ToString();
                string Title = dr["aname"].ToString().Trim();
                this.ddlPpxc.Items.Add(new ListItem(Title, Id));
            }

            //LBS
            BLL.wx_lbs_shopInfo lbsBll = new BLL.wx_lbs_shopInfo();
            DataTable           lbsdt  = lbsBll.GetList(" wid=" + weixin.id).Tables[0];

            this.ddlLbs.Items.Clear();
            this.ddlLbs.Items.Add(new ListItem("请选择LBS...", ""));
            foreach (DataRow dr in lbsdt.Rows)
            {
                string Id    = dr["id"].ToString();
                string Title = dr["shopName"].ToString().Trim();
                this.ddlLbs.Items.Add(new ListItem(Title, Id));
            }
        }
예제 #2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            _strWhere = "wid=" + weixin.id + " and " + _strWhere;
            this.page = MXRequest.GetQueryInt("page", 1);

            this.txtKeywords.Text = this.keywords;

            DataSet ds = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);

            this.rptList1.DataSource = ds;
            this.rptList1.DataBind();

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

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }