示例#1
0
        private void BindData()
        {
            BLL.wx_qp_img             imgBLl    = new BLL.wx_qp_img();
            BLL.wx_qp_base            actBll    = new BLL.wx_qp_base();
            BLL.wx_qp_users           usersBll  = new BLL.wx_qp_users();
            Model.wx_qp_base          baseModel = actBll.GetModelList(" id=" + aid)[0];
            IList <Model.wx_qp_users> userList  = usersBll.GetModelList(string.Format(" openid='{0}' and bId={1}", openid, aid));

            //判断活动是否过期
            if (baseModel.actEnd < DateTime.Now || baseModel.actBegin > DateTime.Now)
            {
                ErrLevel  = 1;
                ErrorInfo = "此活动时间不对,很遗憾!";
                return;
            }
            if (userList.Count > 0)
            {
                ErrLevel  = 1;
                ErrorInfo = "你已参加过活动,每人只能参加一次!";
                return;
            }

            //轮播图片
            this.rptImglist.DataSource = imgBLl.GetList(" bId=" + aid + " and iType=3 ");
            if (imgBLl.GetList(" bId=" + aid + " and iType=3 ").Tables[0].Rows.Count <= 0)
            {
                mark = "no";
            }
            this.rptImglist.DataBind();
            this.rptNum.DataSource = imgBLl.GetList(" bId=" + aid + " and iType=3 ");
            this.rptNum.DataBind();

            this.Page.Title     = baseModel.bName;
            this.ltrUserxz.Text = baseModel.qpRemark;
        }
示例#2
0
        private void RptBind()
        {
            BLL.wx_qp_img  imgBll  = new BLL.wx_qp_img();
            BLL.wx_qp_base baseBll = new BLL.wx_qp_base();
            BLL.wx_qp_film filmBll = new BLL.wx_qp_film();
            //得到抢票活动相关信息
            IList <Model.wx_qp_base> qblist = baseBll.GetModelList("wid=" + wid + " and id=" + aid);

            if (qblist == null || qblist.Count <= 0)
            {
                return;
            }

            Model.wx_qp_base qpBase = qblist[0];
            litFilmhb.Text = "<img src=\"" + qpBase.haibaoPic + "\">";
            actName        = qpBase.bName;
            litJies.Text   = "<span>" + qpBase.yyRemark + "</span>";

            //得到所有热映电影
            DataSet ds = filmBll.GetList("bid=" + aid + " order by sort_id asc,id desc");

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

            //得到所有影院图片
            DataSet imgDs = imgBll.GetList(4, "bId=" + aid + " and iType=2 ", "id desc");

            this.rptImg.DataSource = imgDs;
            this.rptImg.DataBind();
        }