Exemple #1
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.qiandaoPic;
            }
            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, sid);
            bool hasLq = true;

            if (user == null || user.id <= 0)
            {
                //说明该用户还未领取这个会员卡
                hidStatus.Value  = "-1";
                hidErrInfo.Value = "请先领取会员卡";
            }
            else
            {
                bindJiFen(user);
                uid = user.id;
                QDInof(user);
                int month = MyCommFun.RequestInt("m");
                bindMonthQD(user, month);
            }
        }
Exemple #2
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.contactusPic;
            }

            BLL.wx_ucard_store_fendian           scoreBll = new BLL.wx_ucard_store_fendian();
            IList <Model.wx_ucard_store_fendian> slist    = scoreBll.GetModelList("sid=" + sid + " order by sort_id asc");
            StringBuilder fdStr = new StringBuilder();

            if (slist != null && slist.Count > 0)
            {
                Model.wx_ucard_store_fendian fd = new Model.wx_ucard_store_fendian();
                string tel = "";
                for (int i = 0; i < slist.Count; i++)
                {
                    fd = slist[i];
                    fdStr.Append(" <h2>" + fd.area + "</h2>");
                    fdStr.Append(" <ul class=\"round\">");
                    fdStr.Append(" <li class=\"addr\">");

                    fdStr.Append("<a href=\"http://api.map.baidu.com/marker?location=" + fd.yPoint + "," + fd.xPoint + "&amp;title=" + fd.addr + "&amp;content=" + fd.area + "&amp;output=html\">");
                    fdStr.Append("<span>" + fd.addr + "</span></a>");
                    fdStr.Append("</li>");
                    tel = MyCommFun.ObjToStr(fd.tel);
                    fdStr.Append("<li class=\"tel\"><a href=\"tel:" + tel + "\"><span>" + tel + "</span></a></li>");
                    fdStr.Append("</ul>");
                }
            }
            litFenDianList.Text = fdStr.ToString();
        }
Exemple #3
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.noticePic;
            }
            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, sid);
            if (user == null)
            {
                return;
            }
            int degreeNum = 0;

            BLL.wx_ucard_fun.userDegree(sid, MyCommFun.Obj2Int(user.ttScore), "", out degreeNum);
            BLL.wx_ucard_notice nBll = new BLL.wx_ucard_notice();

            IList <Model.wx_ucard_notice> nlist = nBll.GetModelList(" sid=" + sid + " and ( userDegree ='0' or userDegree like '%," + degreeNum + ",%' ) order by createDate desc");
            StringBuilder noticeStr             = new StringBuilder();

            if (nlist != null && nlist.Count > 0)
            {
                Model.wx_ucard_notice notice = new Model.wx_ucard_notice();
                for (int i = 0; i < nlist.Count; i++)
                {
                    notice = nlist[i];
                    if (i == 0)
                    {
                        //第一条数据
                        noticeStr.Append("<div id=\"test0-header\" class=\"accordion_headings  header_highlight \">");
                        noticeStr.Append(" <div class=\"tab  new \">");
                        noticeStr.Append(" <span class=\"title\">" + notice.nName + "<p>" + notice.createDate.Value.ToString("yyyy年MM月dd日") + "</p>");
                        noticeStr.Append("  </span></div>");
                        noticeStr.Append(" <div id=\"test0-content\" style=\"display: block; overflow: hidden; opacity: 1;\"> ");
                        noticeStr.Append("<div class=\"accordion_child\"><p class=\"xiangqing\">");
                        noticeStr.Append(notice.nContent);
                        noticeStr.Append(" </p></div></div></div>");
                    }
                    else
                    {
                        noticeStr.Append("<div id=\"test" + i + "-header\" class=\"accordion_headings \">");
                        noticeStr.Append("<div class=\"tab \">");
                        noticeStr.Append("<span class=\"title\">" + notice.nName + "<p>" + notice.createDate.Value.ToString("yyyy年MM月dd日") + "</p></span>");
                        noticeStr.Append("</div>");
                        noticeStr.Append(" <div id=\"test" + i + "-content\" style=\"display: none; overflow: hidden;\">");
                        noticeStr.Append("<div class=\"accordion_child\">");
                        noticeStr.Append("<p class=\"xiangqing\">" + notice.nContent + "</p>");
                        noticeStr.Append("</div> </div> </div>");
                    }
                }
            }
            litNoticeList.Text = noticeStr.ToString();
        }
Exemple #4
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int id = MyCommFun.Str2Int(hidid.Value);

            Model.wx_ucard_cardinfo card = new Model.wx_ucard_cardinfo();

            if (id > 0)
            {
                card = cardBll.GetModel(id);
            }
            card.cardName      = txtcardName.Text.Trim();
            card.cardNameColor = "#" + txtcardNameColor.Text;
            card.logo          = Request.Form["txtImgICO"].Trim();

            if (txtbgUrl.Text.Trim() == "")
            {
                card.bgTypeUrl = ddlbgTypeId.SelectedItem.Value;
                card.bgUrl     = "";
            }
            else
            {
                card.bgTypeUrl = "";
                card.bgUrl     = txtbgUrl.Text.Trim();
            }

            card.cardNoColor     = "#" + txtcardNoColor.Text;
            card.noticePic       = txtnoticePic.Value;
            card.privilegesPic   = txtprivilegesPic.Value;
            card.qiandaoPic      = txtqiandaoPic.Value;
            card.shopingPic      = txtshopingPic.Value;
            card.perinfoPic      = txtperinfoPic.Value;
            card.instructionsPic = txtinstructionsPic.Value;
            card.contactusPic    = txtcontactusPic.Value;

            if (id > 0)
            {
                ChkAdminLevel("ucard_km", MXEnums.ActionEnum.Edit.ToString()); //检查权限

                //修改
                cardBll.Update(card);
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "设置卡版面信息,主键为" + id); //记录日志
                JscriptMsg("设置卡版面信息成功!", "card_design.aspx", "Success");
            }
            else
            {
                ChkAdminLevel("ucard_km", MXEnums.ActionEnum.Add.ToString()); //检查权限
                //新增
                card.sId        = sid;
                card.createDate = DateTime.Now;
                cardBll.Add(card);
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "设置卡版面信息,主键为" + id); //记录日志
                JscriptMsg("设置卡版面信息成功!", "card_design.aspx", "Success");
            }
        }
Exemple #5
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int id = MyCommFun.Str2Int(hidid.Value);
            Model.wx_ucard_cardinfo card = new Model.wx_ucard_cardinfo();

            if (id > 0)
            {
                card = cardBll.GetModel(id);
            }
            card.cardName = txtcardName.Text.Trim();
            card.cardNameColor = "#" + txtcardNameColor.Text;
            card.logo = Request.Form["txtImgICO"].Trim();

            if (txtbgUrl.Text.Trim() == "")
            {
                card.bgTypeUrl = ddlbgTypeId.SelectedItem.Value;
                card.bgUrl = "";
            }
            else
            {
                card.bgTypeUrl = "";
                card.bgUrl = txtbgUrl.Text.Trim();
            }

            card.cardNoColor ="#"+ txtcardNoColor.Text;
            card.noticePic = txtnoticePic.Value;
            card.privilegesPic = txtprivilegesPic.Value;
            card.qiandaoPic = txtqiandaoPic.Value;
            card.shopingPic = txtshopingPic.Value;
            card.perinfoPic = txtperinfoPic.Value;
            card.instructionsPic = txtinstructionsPic.Value;
            card.contactusPic = txtcontactusPic.Value;

            if (id > 0)
            {
                //修改
                cardBll.Update(card);
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "设置卡版面信息,主键为" + id); //记录日志
                JscriptMsg("设置卡版面信息成功!", "business_list.aspx", "Success");
            }
            else
            { //新增
                card.sId = sid;
                card.createDate = DateTime.Now;
                cardBll.Add(card);
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "设置卡版面信息,主键为" + id); //记录日志
                JscriptMsg("设置卡版面信息成功!", "business_list.aspx", "Success");

            }
        }
Exemple #6
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.perinfoPic;
            }

            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, sid);

            uName = user.realName;
            tel   = user.mobile;
        }
Exemple #7
0
        private void ShowInfo()
        {
            IList <Model.wx_ucard_cardinfo> cardlist = cardBll.GetModelList("sId=" + sid);

            if (cardlist == null || cardlist.Count <= 0)
            {
                return;
            }
            Model.wx_ucard_cardinfo card = cardlist[0];
            hidid.Value = card.id.ToString();

            txtcardName.Text  = card.cardName;
            vipname.InnerText = card.cardName;
            vipname.Style.Add("color", card.cardNameColor.ToString());
            txtcardNameColor.Text = card.cardNameColor.ToString().Substring(1);
            txtImgICO.Text        = card.logo;
            cardlogo.Src          = card.logo;
            if (card.bgUrl == null || card.bgUrl.ToString().Trim() == "")
            {
                ddlbgTypeId.SelectedValue = card.bgTypeUrl;
                txtbgUrl.Text             = "";
                cardbg.Src = card.bgTypeUrl;
            }
            else
            {
                txtbgUrl.Text = card.bgUrl;
                cardbg.Src    = card.bgUrl;
            }
            txtcardNoColor.Text = card.cardNoColor.ToString().Substring(1);
            number.Style.Add("color", card.cardNoColor.ToString());
            txtnoticePic.Value       = card.noticePic;
            txtprivilegesPic.Value   = card.privilegesPic;
            txtqiandaoPic.Value      = card.qiandaoPic;
            txtshopingPic.Value      = card.shopingPic;
            txtperinfoPic.Value      = card.perinfoPic;
            txtinstructionsPic.Value = card.instructionsPic;
            txtcontactusPic.Value    = card.contactusPic;

            news.Src     = card.noticePic;
            vippower.Src = card.privilegesPic;
            qiandao.Src  = card.qiandaoPic;
            shopping.Src = card.shopingPic;
            user.Src     = card.perinfoPic;
            info.Src     = card.instructionsPic;
            addr.Src     = card.contactusPic;
        }
Exemple #8
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.instructionsPic;
            }

            BLL.wx_ucard_score           scoreBll = new BLL.wx_ucard_score();
            IList <Model.wx_ucard_score> slist    = scoreBll.GetModelList("sid=" + sid);

            if (slist != null && slist.Count > 0)
            {
                lituserdContent.Text = slist[0].userdContent;
                litscoreRegular.Text = slist[0].scoreRegular;
            }
            BLL.wx_ucard_store   storeBll = new BLL.wx_ucard_store();
            Model.wx_ucard_store store    = storeBll.GetModel(sid);
            if (store != null)
            {
                litcardBrief.Text = store.cardBrief;
            }
        }
Exemple #9
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.privilegesPic;
            }
            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, sid);
            if (user == null)
            {
                return;
            }
            uid = user.id;
            int degreeNum = 0;

            BLL.wx_ucard_fun.userDegree(sid, MyCommFun.Obj2Int(user.ttScore), "", out degreeNum);

            string ticketStr = ticketBLL.getUserTicketStr(sid, user.id, degreeNum, MyCommFun.Obj2Int(user.consumeMoney, 0));

            IList <Model.wx_ucard_ticket> plist = ticketBLL.GetModelList(" id in " + comStrByTid(ticketStr));
            StringBuilder pStr = new StringBuilder();

            if (plist != null && plist.Count > 0)
            {
                Model.wx_ucard_ticket ticket = new Model.wx_ucard_ticket();
                string sn    = "";
                int    syNum = 0; //剩余次数
                for (int i = 0; i < plist.Count; i++)
                {
                    ticket = plist[i];
                    syNum  = MyCommFun.Obj2Int(ticket.usedTimes);
                    sn     = Utils.Number(16, true);
                    if (i == 0)
                    {
                        //第一条数据
                        pStr.Append(" <div id=\"test0-header\" class=\"accordion_headings  header_highlight \">");
                        pStr.Append(" <div class=\"tab  coupon \">");
                        pStr.Append(" <span class=\"title\">" + ticket.tName + "(<span id=\"cid" + ticket.id + "\">" + syNum + "</span>张)<p>有效期至" + ticket.endDate.Value.ToString("yyyy年MM月dd日") + "</p></span>");
                        pStr.Append(" </div>");
                        pStr.Append(" <div id=\"test0-content\" style=\"display: block; overflow: hidden; opacity: 1;\">");
                        pStr.Append(" <div class=\"accordion_child\">");
                        pStr.Append("  <p class=\"num\" onclick=\"jQ('#test0-content').height(300);document.getElementById('queren0').style.display=''\" id=\"sn0\">" + sn + "</p>");
                        pStr.Append("  <div id=\"queren0\" style=\"display: none\">");
                        pStr.Append("  <p style=\"margin: 10px 0\">");
                        pStr.Append(" <input name=\"\" type=\"text\" class=\"px\" id=\"money0\" value=\"\" placeholder=\"请输入实际消费金额\">");
                        pStr.Append(" </p> <p style=\"margin: 10px 0\">");
                        pStr.Append(" <input name=\"\" type=\"text\" class=\"px\" id=\"bmoney0\" value=\"\" placeholder=\"请再次输入实际消费金额\">");
                        pStr.Append(" </p>  <p style=\"margin: 10px 0 0 0\">");
                        pStr.Append("  <input name=\"\" class=\"px\" id=\"parssword0\" value=\"\" type=\"password\" placeholder=\"请输入管理员密码\">");
                        pStr.Append("  </p> <p style=\"margin: 10px 0\">");
                        pStr.Append("<a id=\"showcard0\" class=\"submit\" href=\"javascript:void(0)\" onclick=\"coupon(0,'" + sn + "','" + ticket.id + "')\">确定使用</a>");
                        pStr.Append("   </p> </div>");
                        pStr.Append("  <p class=\"explain_sn\"><span>点击处理</span></p>");
                        pStr.Append(" <b>详情说明</b>");
                        pStr.Append("<ul>" + ticket.usedContent + "</ul></div> </div> </div>");
                    }
                    else
                    {
                        pStr.Append(" <div id=\"test" + i + "-header\" class=\"accordion_headings \">");
                        pStr.Append("  <div class=\"tab  coupon \">");
                        pStr.Append(" <span class=\"title\">" + ticket.tName + "(<span id=\"cid" + ticket.id + "\">" + syNum + "</span>张)<p>有效期至" + ticket.endDate.Value.ToString("yyyy年MM月dd日") + "</p>");
                        pStr.Append(" </span>  </div>");
                        pStr.Append(" <div id=\"test" + i + "-content\" style=\"display: none; overflow: hidden;\">");
                        pStr.Append("  <div class=\"accordion_child\">");
                        pStr.Append("<p class=\"num\" onclick=\"jQ('#test" + i + "-content').height(300);document.getElementById('queren" + i + "').style.display=''\" id=\"sn" + i + "\">" + sn + "</p>");
                        pStr.Append("<div id=\"queren" + i + "\" style=\"display: none\">  <p style=\"margin: 10px 0\">");
                        pStr.Append("  <input name=\"\" type=\"text\" class=\"px\" id=\"money" + i + "\" value=\"\" placeholder=\"请输入实际消费金额\">");
                        pStr.Append("  </p>  <p style=\"margin: 10px 0\">");
                        pStr.Append(" <input name=\"\" type=\"text\" class=\"px\" id=\"bmoney" + i + "\" value=\"\" placeholder=\"请再次输入实际消费金额\">");
                        pStr.Append("  </p> <p style=\"margin: 10px 0 0 0\">");
                        pStr.Append("  <input name=\"\" class=\"px\" id=\"parssword" + i + "\" value=\"\" type=\"password\" placeholder=\"请输入管理员密码\">");
                        pStr.Append("   </p><p style=\"margin: 10px 0\">");
                        pStr.Append(" <a id=\"showcard" + i + "\" class=\"submit\" href=\"javascript:void(0)\" onclick=\"coupon(" + i + ",'" + sn + "','" + ticket.id + "')\">确定使用</a>");
                        pStr.Append("  </p></div>");
                        pStr.Append(" <p class=\"explain_sn\"><span>点击处理</span></p>");
                        pStr.Append("  <b>详情说明</b>");
                        pStr.Append("  <ul>" + ticket.usedContent + "</ul></div> </div> </div>");
                    }
                }
            }
            litTicketlist.Text = pStr.ToString();
        }
Exemple #10
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.privilegesPic;
            }
            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, sid);
            if (user == null)
            {
                return;
            }
            uid = user.id;
            int degreeNum = 0;

            BLL.wx_ucard_fun.userDegree(sid, MyCommFun.Obj2Int(user.ttScore), "", out degreeNum);

            BLL.wx_ucard_privileges           privilegesBLL = new BLL.wx_ucard_privileges();
            IList <Model.wx_ucard_privileges> plist         = privilegesBLL.GetModelList(" sid=" + sid + " and ( userDegree ='0' or userDegree like '%," + degreeNum + ",%' ) and beginDate<='" + DateTime.Now + "' and endDate>='" + DateTime.Now + "' ");
            StringBuilder pStr = new StringBuilder();

            if (plist != null && plist.Count > 0)
            {
                Model.wx_ucard_privileges privileges = new Model.wx_ucard_privileges();
                string sn = "";
                for (int i = 0; i < plist.Count; i++)
                {
                    privileges = plist[i];
                    sn         = Utils.Number(16, true);
                    if (i == 0)
                    {
                        //第一条数据
                        pStr.Append(" <div id=\"test0-header\" class=\"accordion_headings  header_highlight \">");
                        pStr.Append(" <div class=\"tab  vip \">");
                        pStr.Append(" <span class=\"title\">" + privileges.pName + "<p>有效期至" + privileges.endDate.Value.ToString("yyyy年MM月dd日") + "</p></span>");
                        pStr.Append(" </div>");
                        pStr.Append(" <div id=\"test0-content\" style=\"display: block; overflow: hidden; opacity: 1;\">");
                        pStr.Append(" <div class=\"accordion_child\">");
                        pStr.Append("  <p class=\"num\" onclick=\"jQ('#test0-content').height(300);document.getElementById('queren0').style.display=''\" id=\"sn0\">" + sn + "</p>");
                        pStr.Append("  <div id=\"queren0\" style=\"display: none\">");
                        pStr.Append("  <p style=\"margin: 10px 0\">");
                        pStr.Append(" <input name=\"\" type=\"text\" class=\"px\" id=\"money0\" value=\"\" placeholder=\"请输入实际消费金额\">");
                        pStr.Append(" </p> <p style=\"margin: 10px 0\">");
                        pStr.Append(" <input name=\"\" type=\"text\" class=\"px\" id=\"bmoney0\" value=\"\" placeholder=\"请再次输入实际消费金额\">");
                        pStr.Append(" </p>  <p style=\"margin: 10px 0 0 0\">");
                        pStr.Append("  <input name=\"\" class=\"px\" id=\"parssword0\" value=\"\" type=\"password\" placeholder=\"请输入管理员密码\">");
                        pStr.Append("  </p> <p style=\"margin: 10px 0\">");
                        pStr.Append("<a id=\"showcard0\" class=\"submit\" href=\"javascript:void(0)\" onclick=\"power(0,'" + sn + "','" + privileges.id + "')\">确定使用</a>");
                        pStr.Append("   </p> </div>");
                        pStr.Append("  <p class=\"explain_sn\"><span>点击处理</span></p>");
                        pStr.Append(" <b>详情说明</b>");
                        pStr.Append("<ul>" + privileges.usedContent + "</ul></div> </div> </div>");
                    }
                    else
                    {
                        pStr.Append(" <div id=\"test" + i + "-header\" class=\"accordion_headings \">");
                        pStr.Append("  <div class=\"tab  vip \">");
                        pStr.Append(" <span class=\"title\">" + privileges.pName + "<p>有效期至" + privileges.endDate.Value.ToString("yyyy年MM月dd日") + "</p>");
                        pStr.Append(" </span>  </div>");
                        pStr.Append(" <div id=\"test" + i + "-content\" style=\"display: none; overflow: hidden;\">");
                        pStr.Append("  <div class=\"accordion_child\">");
                        pStr.Append("<p class=\"num\" onclick=\"jQ('#test" + i + "-content').height(300);document.getElementById('queren" + i + "').style.display=''\" id=\"sn" + i + "\">" + sn + "</p>");
                        pStr.Append("<div id=\"queren" + i + "\" style=\"display: none\">  <p style=\"margin: 10px 0\">");
                        pStr.Append("  <input name=\"\" type=\"text\" class=\"px\" id=\"money" + i + "\" value=\"\" placeholder=\"请输入实际消费金额\">");
                        pStr.Append("  </p>  <p style=\"margin: 10px 0\">");
                        pStr.Append(" <input name=\"\" type=\"text\" class=\"px\" id=\"bmoney" + i + "\" value=\"\" placeholder=\"请再次输入实际消费金额\">");
                        pStr.Append("  </p> <p style=\"margin: 10px 0 0 0\">");
                        pStr.Append("  <input name=\"\" class=\"px\" id=\"parssword" + i + "\" value=\"\" type=\"password\" placeholder=\"请输入管理员密码\">");
                        pStr.Append("   </p><p style=\"margin: 10px 0\">");
                        pStr.Append(" <a id=\"showcard" + i + "\" class=\"submit\" href=\"javascript:void(0)\" onclick=\"power(" + i + ",'" + sn + "','" + privileges.id + "')\">确定使用</a>");
                        pStr.Append("  </p></div>");
                        pStr.Append(" <p class=\"explain_sn\"><span>点击处理</span></p>");
                        pStr.Append("  <b>详情说明</b>");
                        pStr.Append("  <ul>所有的特权来吧 </ul></div> </div> </div>");
                    }
                }
            }
            litPrivilegeslist.Text = pStr.ToString();
        }
Exemple #11
0
        private void bindData()
        {
            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(sid);
            if (cardinfo != null)
            {
                imgTopPic.ImageUrl = cardinfo.privilegesPic;
            }
            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, sid);
            if (user == null)
            {
                return;
            }
            uid = user.id;

            DateTime today = DateTime.Now;
            IList <Model.wx_ucard_gift> glist = giftBLL.GetModelList(" sid=" + sid + " and  beginDate<='" + today.ToString() + "' and endDate>='" + today.ToString() + "'");
            StringBuilder pStr = new StringBuilder();

            if (glist != null && glist.Count > 0)
            {
                Model.wx_ucard_gift gift = new Model.wx_ucard_gift();
                string sn    = "";
                int    syNum = 0; //剩余次数
                for (int i = 0; i < glist.Count; i++)
                {
                    gift = glist[i];

                    sn = Utils.Number(16, true);
                    if (i == 0)
                    {
                        //第一条数据
                        pStr.Append(" <div id=\"test0-header\" class=\"accordion_headings  header_highlight \">");
                        pStr.Append(" <div class=\"tab  gift \">");
                        pStr.Append(" <span class=\"title\">" + gift.gName + "(<span id=\"cid" + gift.id + "\">" + MyCommFun.Obj2Int(gift.score) + "</span>积分)<p>有效期至" + gift.endDate.Value.ToString("yyyy年MM月dd日") + "</p></span>");
                        pStr.Append(" </div>");
                        pStr.Append(" <div id=\"test0-content\" style=\"display: block; overflow: hidden; opacity: 1; \">");
                        pStr.Append(" <div class=\"accordion_child\">");
                        pStr.Append("  <p class=\"num\" onclick=\"jQ('#test0-content').height(210);document.getElementById('queren0').style.display=''\" id=\"sn0\">" + sn + "</p>");
                        pStr.Append("  <div id=\"queren0\" style=\"display: none\">");
                        pStr.Append("  <p style=\"margin: 10px 0\">");
                        pStr.Append("  <input name=\"\" class=\"px\" id=\"parssword0\" value=\"\" type=\"password\" placeholder=\"请输入管理员密码\">");
                        pStr.Append("  </p> <p style=\"margin: 10px 0\">");
                        pStr.Append("<a id=\"showcard0\" class=\"submit\" href=\"javascript:void(0)\" onclick=\"gift(0,'" + sn + "','" + gift.id + "')\">确定使用</a>");
                        pStr.Append("   </p> </div>");
                        pStr.Append("  <p class=\"explain_sn\"><span>点击处理</span></p>");

                        /*
                         *  <p class="ewmimg">
                         *   <img width="220" onclick="jQ('#test0-content').height(210);document.getElementById('queren0').style.display=''" src="http://comment.duapp.com/qrcode.php?url=http%3A%2F%2Fwww.apiwx.com%2Findex.php%3Fac%3Dcardpower3%26tid%3D4486%26c%3Do99epjsmex1G-PTaaHYb7vmeP588%26qrcode%3D1%26cid%3D0" /></p>
                         * **/
                        pStr.Append(" <b>详情说明</b>");
                        pStr.Append("<ul>" + gift.useContent + "</ul></div> </div> </div>");
                    }
                    else
                    {
                        pStr.Append(" <div id=\"test" + i + "-header\" class=\"accordion_headings \">");
                        pStr.Append("  <div class=\"tab  gift \">");
                        pStr.Append(" <span class=\"title\">" + gift.gName + "(<span id=\"cid" + gift.id + "\">" + MyCommFun.Obj2Int(gift.score) + "</span>积分)<p>有效期至" + gift.endDate.Value.ToString("yyyy年MM月dd日") + "</p>");
                        pStr.Append(" </span>  </div>");
                        pStr.Append(" <div id=\"test" + i + "-content\" style=\"display: none; overflow: hidden;\">");
                        pStr.Append("  <div class=\"accordion_child\">");
                        pStr.Append("<p class=\"num\" onclick=\"jQ('#test" + i + "-content').height(210);document.getElementById('queren" + i + "').style.display=''\" id=\"sn" + i + "\">" + sn + "</p>");
                        pStr.Append("<div id=\"queren" + i + "\" style=\"display: none\">  <p style=\"margin: 10px 0\">");
                        pStr.Append("  <input name=\"\" class=\"px\" id=\"parssword" + i + "\" value=\"\" type=\"password\" placeholder=\"请输入管理员密码\">");
                        pStr.Append("   </p><p style=\"margin: 10px 0\">");
                        pStr.Append(" <a id=\"showcard" + i + "\" class=\"submit\" href=\"javascript:void(0)\" onclick=\"gift(" + i + ",'" + sn + "','" + gift.id + "')\">确定使用</a>");
                        pStr.Append("  </p></div>");
                        pStr.Append(" <p class=\"explain_sn\"><span>点击处理</span></p>");
                        pStr.Append("  <b>详情说明</b>");
                        pStr.Append("  <ul>" + gift.useContent + "</ul></div> </div> </div>");
                    }
                }
            }
            litGiftlist.Text = pStr.ToString();
        }
Exemple #12
0
        private void bindData()
        {
            string jibie = "会员卡号";

            BLL.wx_ucard_cardinfo   cardBll  = new BLL.wx_ucard_cardinfo();
            Model.wx_ucard_cardinfo cardinfo = cardBll.GetModelBySid(id);

            BLL.wx_ucard_users   userBll = new BLL.wx_ucard_users();
            Model.wx_ucard_users user    = userBll.GetStoreUserInfo(openid, id);
            bool hasLq = true;

            if (user == null || user.id <= 0)
            {
                //说明该用户还未领取这个会员卡
                hasLq = false;
                StringBuilder lqStr = new StringBuilder("");
                lqStr.Append(" <div class=\"msk\"><p class=\"explain2\">");
                lqStr.Append("<a id=\"showcard\" class=\"receive\" href=\"javascript:void(0)\">领取您的新会员卡</a><span>微时代会员卡,方便携带收藏,永不挂失</span>");
                lqStr.Append("</p></div>");
                litLQK.Text = lqStr.ToString();
            }
            else
            {
                jibie = BLL.wx_ucard_fun.userDegree(id, MyCommFun.Obj2Int(user.ttScore), jibie, out degreeNum);

                //已经领取了会员卡
                bindJiFen(user);  //展示积分
                bindNewInfo(user);
                QDInof(user);
            }
            if (cardinfo != null)
            {
                Page.Title = cardinfo.cardName;
                //卡版面设计
                StringBuilder sbStr = new StringBuilder("");
                string        bgPic = "";
                if (cardinfo.bgUrl == null || cardinfo.bgUrl.Trim().Length <= 0)
                {
                    bgPic = cardinfo.bgTypeUrl;
                }
                else
                {
                    bgPic = cardinfo.bgUrl;
                }
                sbStr.Append(" <img class=\"cardbg\" src=\"" + bgPic + "\">");
                sbStr.Append(" <img id=\"cardlogo\" class=\"logo\" src=\"" + cardinfo.logo + "\">");
                sbStr.Append(" <h1 style=\"color: " + cardinfo.cardNameColor + "\">" + cardinfo.cardName + "</h1>");
                if (hasLq)
                {
                    sbStr.Append(" <strong class=\"pdo verify\" style=\"color: " + cardinfo.cardNoColor + "\"><span id=\"cdnb\"><em>" + jibie + "</em>" + user.cardNo + "</span></strong>");
                }
                else
                {
                    sbStr.Append(" <strong class=\"pdo verify\" style=\"color: #A985FF\"><span id=\"cdnb\"><em>普通会员</em>00000000</span></strong>");
                }
                litCardInfo.Text = sbStr.ToString();
            }
            //店铺信息
            BLL.wx_ucard_store   storeBll = new BLL.wx_ucard_store();
            Model.wx_ucard_store store    = storeBll.GetModel(id);
            if (store != null)
            {
                litTel.Text  = MyCommFun.ObjToStr(store.tel);
                litAddr.Text = MyCommFun.ObjToStr(store.addr);
                aAddr.HRef   = "http://api.map.baidu.com/marker?location=" + store.yPoint + "," + store.xPoint + "&amp;title=" + store.addr + "&amp;content=" + store.cardBrief + "&amp;output=html";
                aTel.HRef    = "tel:" + store.tel;;
            }
        }