コード例 #1
0
ファイル: pic_show.aspx.cs プロジェクト: yidane/51wine
        protected void Page_Load(object sender, EventArgs e)
        {
            this.category_id = Utils.StrToInt(MXRequest.GetQueryString("aid"), 0);
            int id = MyCommFun.RequestInt("id");

            wid = MyCommFun.RequestWid();
            if (!IsPostBack)
            {
                IList <Model.wx_qp_img> imglist = imgBLL.GetModelList("bId=" + category_id + "and iType=2  order by id desc ");

                for (int i = 0; i < imglist.Count; i++)
                {
                    if (imglist[i].id == id)
                    {
                        actNum = i;
                        break;
                    }
                }
                int test = actNum;
                this.rptImgshow.DataSource = imglist;
                this.rptImgshow.DataBind();
                Model.wx_qp_base baseMod = baseBll.GetModel(this.category_id);
                this.Page.Title = baseMod.bName;
            }
        }
コード例 #2
0
ファイル: ModelFunction.cs プロジェクト: yidane/51wine
        /// <summary>
        /// 电影院抢票
        /// </summary>
        /// <param name="id"></param>
        /// <param name="apiid"></param>
        /// <param name="openid"></param>
        /// <returns></returns>
        private IList <Model.ResponseContentEntity> DDYQPReponse(int id, int apiid, string openid)
        {
            IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>();

            Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity();
            responseEntity.id  = id;
            responseEntity.wid = apiid;

            BLL.wx_qp_base   ggkActBll = new BLL.wx_qp_base();
            Model.wx_qp_base actModel  = ggkActBll.GetModel(id);
            if (actModel.actBegin > DateTime.Now)
            {  //活动尚未开始
                responseEntity.rcType   = Model.ReponseContentType.text;
                responseEntity.rContent = "活动【" + actModel.bName + "】将于" + actModel.actBegin + "开始。";
            }
            else if (actModel.actEnd <= DateTime.Now)
            {
                //活动结束
                responseEntity.rcType   = Model.ReponseContentType.text;
                responseEntity.rContent = "活动已经结束了。";
            }
            else
            {
                //活动正在进行中
                responseEntity.rcType    = Model.ReponseContentType.txtpic;
                responseEntity.rContent  = actModel.bName;
                responseEntity.rContent2 = "";
                responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/qiangpiao/index.aspx?wid=" + apiid + "&aid=" + id;
                responseEntity.picUrl    = actModel.beginPic;
            }
            responselist.Add(responseEntity);

            return(responselist);
        }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.keywords    = MXRequest.GetQueryString("keywords");
     this.category_id = Utils.StrToInt(MXRequest.GetQueryString("id"), 0);
     this.pageSize    = GetPageSize(10); //每页数量
     if (!Page.IsPostBack)
     {
         actName = bbll.GetModel(category_id).bName;
         RptBind(category_id, "id>0" + CombSqlTxt(keywords), "sort_id asc,id desc");
     }
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     wid = MyCommFun.RequestWid();
     aid = MyCommFun.RequestInt("aid", 0);
     if (!IsPostBack)
     {
         this.rptImglist.DataSource = imgBLL.GetList("bId=" + this.aid + " and iType=2  order by id desc");
         this.rptImglist.DataBind();
         this.openid = MyCommFun.RequestOpenid();
         Model.wx_qp_base baseMod = baseBll.GetModel(this.aid);
         actName = baseMod.bName;
     }
 }
コード例 #5
0
ファイル: order_Result.aspx.cs プロジェクト: yidane/51wine
        private void ckState()
        {
            BLL.wx_qp_base            actBll    = new BLL.wx_qp_base();
            BLL.wx_qp_users           userBll   = new BLL.wx_qp_users();
            Model.wx_qp_base          baseModel = actBll.GetModel(aid);
            IList <Model.wx_qp_users> userList  = userBll.GetModelList(" openid='" + openid + "' and bId=" + aid);

            Model.wx_qp_users userModel = null;
            string            gpTime    = DateTime.Parse(baseModel.yyGouPiaoBeginDate.ToString()).ToString("MM月dd日-HH:mm") +
                                          "~" + DateTime.Parse(baseModel.yyGouPiaoEndDate.ToString()).ToString("MM月dd日-HH:mm");

            if (userList != null && userList.Count > 0)
            {
                userModel = userList[0];
            }

            string Fulltext = "<h1><i class=\"text-icon\">✔</i>已有" + baseModel.maxPersonNum + "人抢到票啦!</h1>" +
                              "<dl class=\"list\">" +
                              "<dd class=\"dd-padding\">特价票已售完即止!</dd>" +
                              "<dd class=\"dd-padding\">请抓紧时间购票把!</dd>" +
                              "<dd class=\"dd-padding\">购票时间:" + gpTime + "</dd></dl><br />";

            //活动人数已满
            if (baseModel.cyPersonNum > baseModel.maxPersonNum)
            {
                this.litFull.Text = Fulltext;
                return;
            }

            //非法用户
            if (userModel == null)
            {
                if (baseModel.cyPersonNum == baseModel.maxPersonNum)//最后一个用户
                {
                    this.litFull.Text = Fulltext;
                }
                else
                {
                    Response.Redirect(string.Format("index.aspx?wid={0}&aid={1}&openid={2}", wid, aid, openid));
                }
                return;
            }

            //第一次参与活动
            if (joined == "true")
            {
                string snNum = userModel.sn;
                this.litShow.Text = "<h1><i class=\"text-icon\">✔</i>您是第" + baseModel.cyPersonNum + "位参加本次抢票!</h1>" +
                                    "<dl class=\"list\">" +
                                    "<dd class=\"dd-padding\">您的sn码:" + snNum + " </dd>" +
                                    "<dd class=\"dd-padding\">购票时间:" + gpTime + "</dd></dl><br />";
                return;
            }//已参与过本次活动,不可以再参加
            else if (joined == "false")
            {
                string snNum = userModel.sn;
                this.litJoined.Text = "<h1><i class=\"text-icon\">✔</i>您已成功参加本次抢票!</h1>" +
                                      "<dl class=\"list\">" +
                                      "<dd class=\"dd-padding\">您的sn码:" + snNum + " </dd>" +
                                      "<dd class=\"dd-padding\">购票时间:" + gpTime + "</dd></dl><br />";
                return;
            }
        }