Ejemplo n.º 1
0
        private void RptBind(int aid, string _strWhere, string _orderby)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();

            this.page = MXRequest.GetQueryInt("page", 1);
            _strWhere = "aid=" + aid + " and " + _strWhere;

            this.txtKeywords.Text = this.keywords;
            //列表显示

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

            ////链接处理,待做
            //if (artDs != null)
            //{
            //    DataRow dr;
            //    for (int i = 0; i < artDs.Tables[0].Rows.Count; i++)
            //    {
            //        dr = artDs.Tables[0].Rows[i];
            //        dr["url"] = " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/weixin/product/detail.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&id=" + dr["id"] + "</a>";
            //    }
            //}

            this.rptList.DataSource = artDs;
            this.rptList.DataBind();


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

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Ejemplo n.º 2
0
        private void BindData()
        {
            BLL.wx_sq_act   actBll = new BLL.wx_sq_act();
            Model.wx_sq_act act    = actBll.GetModel(aid);
            if (act != null)
            {
                litBanner.Text = " <img src=\"" + act.bannerPic + "\">";
            }
            BLL.wx_sq_piclist pBll     = new BLL.wx_sq_piclist();
            string            whereStr = "";

            if (act.shenghe)
            {
                //需要审核
                whereStr = "aid=" + aid + " and hasShenghe=1";
            }
            else
            {
                //不需要审核
                whereStr = "aid=" + aid;
            }
            // IList<Model.wx_sq_piclist> plist = pBll.GetModelList(whereStr);
            DataSet artDs = pBll.GetList(20, this.page, whereStr, "createDate desc", out this.totalCount);

            rpPoto.DataSource = artDs;
            rpPoto.DataBind();
            //上一页
            if (this.page == 1)
            {
                aBefore.HRef = "javascript:;";
            }
            else
            {
                aBefore.HRef = MyCommFun.getWebSite() + "/weixin/shangqiang/index.aspx?wid=" + wid + "&aid=" + aid + "&openid=" + openid + "&p=" + (this.page - 1);
            }

            //下一页
            if (this.page == totalCount)
            {
                aAfter.HRef = "javascript:;";
            }
            else
            {
                aAfter.HRef = MyCommFun.getWebSite() + "/weixin/shangqiang/index.aspx?wid=" + wid + "&aid=" + aid + "&openid=" + openid + "&p=" + (this.page + 1);
            }
        }
Ejemplo n.º 3
0
        private void BindData()
        {
            BLL.wx_sq_act actBll = new BLL.wx_sq_act();
            Model.wx_sq_act act = actBll.GetModel(aid);
            if (act != null)
            {
                litBanner.Text = " <img src=\""+act.bannerPic+"\">";
            }
            BLL.wx_sq_piclist pBll = new BLL.wx_sq_piclist();
            string whereStr = "";
            if (act.shenghe)
            {
                //需要审核
                whereStr = "aid=" + aid + " and hasShenghe=1";
            }
            else
            { 
                //不需要审核
                whereStr = "aid=" + aid;
            }
           // IList<Model.wx_sq_piclist> plist = pBll.GetModelList(whereStr);
            DataSet artDs = pBll.GetList(20, this.page, whereStr, "createDate desc", out this.totalCount);
            rpPoto.DataSource = artDs;
            rpPoto.DataBind();
            //上一页
            if (this.page == 1)
            {
                aBefore.HRef = "javascript:;";
            }
            else
            {
                aBefore.HRef = MyCommFun.getWebSite() + "/weixin/shangqiang/index.aspx?wid="+wid+"&aid="+aid+"&openid="+openid+"&p="+(this.page-1);
            }

            //下一页
            if (this.page == totalCount)
            {
                aAfter.HRef = "javascript:;";
            }
            else
            {
                aAfter.HRef = MyCommFun.getWebSite() + "/weixin/shangqiang/index.aspx?wid=" + wid + "&aid=" + aid + "&openid="+openid+"&p=" + (this.page + 1);
            }
        
        }