Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var payConfig = bllPay.GetPayConfig();

            if (payConfig != null)
            {
                if ((!string.IsNullOrEmpty(payConfig.WXAppId)) && (!string.IsNullOrEmpty(payConfig.WXMCH_ID)) && (!string.IsNullOrEmpty(payConfig.WXPartnerKey)))
                {
                    isShowWeixin = true;
                }
            }

            if (CurrentUserInfo.WebsiteOwner == "songhe")
            {
                isShowWeixin = false;
            }

            config = bllWebsite.GetCompanyWebsiteConfig();
            if (config == null)
            {
                config = new CompanyWebsite_Config();
            }
            if (Request["ischannel"] != null && Request["ischannel"].ToString() == "1")
            {
                UserInfo channelUserInfo = bllUser.Get <UserInfo>(string.Format("MgrUserId='{0}'", CurrentUserInfo.UserID));
                if (channelUserInfo == null && (!bllDis.IsChannel(CurrentUserInfo)))
                {
                    Response.Redirect("/error/commonmsg.aspx?msg=您还不是渠道身份,无法访问,请联系商家升级为渠道。");
                    return;
                }
                CurrentUserInfo = channelUserInfo;
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var reqUserAutoId = Request["sid"];//分享用户的AutoId

            website = bllUser.GetWebsiteInfoModelFromDataBase();
            CompanyWebsite_Config config = bllWebsite.GetCompanyWebsiteConfig();

            if (string.IsNullOrWhiteSpace(website.DistributionShareQrcodeBgImg))
            {
                website.DistributionShareQrcodeBgImg = "http://files.comeoncloud.net/img/gxfc.png";
            }
            channelUser = bllUser.GetUserInfoByAutoID(Convert.ToInt32(reqUserAutoId));
            if (!(bllDis.IsChannel(channelUser)))
            {
                Response.End();
            }
            qrcondeUrl = bllDis.GetDistributionWxQrcodeLimitUrl(channelUser.UserID, "channel");
            if (!string.IsNullOrEmpty(config.DistributionQRCodeIcon) && !string.IsNullOrEmpty(qrcondeUrl))
            {
                qrcondeUrl = bllWeixin.GetQRCodeImg(qrcondeUrl, config.DistributionQRCodeIcon);
            }
            pageTitle = bllUser.GetUserDispalyName(channelUser) + "邀请您关注 " + website.WXMallName;
        }