Example #1
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID");
            cardID = TranslateUtils.ToInt(GetQueryString("CardID"));

            if (!IsPostBack)
            {
                var pageTitle = "领取会员卡";
                BreadCrumb(AppManager.WeiXin.LeftMenu.ID_Function, AppManager.WeiXin.LeftMenu.Function.ID_Card, pageTitle, AppManager.WeiXin.Permission.WebSite.Card);
                ltlPageTitle.Text = pageTitle;

                if (cardID > 0)
                {
                }
                ltlSelectUser.Text =
                    $@"&nbsp;<a href=""javascript:;"" onclick=""{BaiRong.BackgroundPages.Modal.UserSelect
                        .GetOpenWindowString(tbUserNameList.ClientID)}"" style=""vertical-align:bottom"">选择</a>";

                btnReturn.Attributes.Add("onclick",
                                         $@"location.href=""{BackgroundCardSN.GetRedirectUrl(PublishmentSystemID, cardID,
                        string.Empty, string.Empty, string.Empty, false)}"";return false");
            }
        }
Example #2
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var CardInfo = new CardInfo(e.Item.DataItem);

                var ltlItemIndex  = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlTitle      = e.Item.FindControl("ltlTitle") as Literal;
                var ltlCardTitle  = e.Item.FindControl("ltlCardTitle") as Literal;
                var ltlKeywords   = e.Item.FindControl("ltlKeywords") as Literal;
                var ltlPVCount    = e.Item.FindControl("ltlPVCount") as Literal;
                var ltlIsEnabled  = e.Item.FindControl("ltlIsEnabled") as Literal;
                var ltlUserUrl    = e.Item.FindControl("ltlUserUrl") as Literal;
                var ltlPreviewUrl = e.Item.FindControl("ltlPreviewUrl") as Literal;
                var ltlEditUrl    = e.Item.FindControl("ltlEditUrl") as Literal;
                var ltlOperator   = e.Item.FindControl("ltlOperator") as Literal;

                ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString();
                ltlTitle.Text     = CardInfo.Title;
                ltlCardTitle.Text = CardInfo.CardTitle;
                ltlKeywords.Text  = DataProviderWX.KeywordDAO.GetKeywords(CardInfo.KeywordID);
                ltlPVCount.Text   = CardInfo.PVCount.ToString();

                ltlIsEnabled.Text = StringUtils.GetTrueOrFalseImageHtml(!CardInfo.IsDisabled);

                var urlCardSN = BackgroundCardSN.GetRedirectUrl(PublishmentSystemID, CardInfo.ID, string.Empty, string.Empty, string.Empty, false);

                ltlUserUrl.Text = $@"<a href=""{urlCardSN}"">会员卡</a>";

                var urlPreview = CardManager.GetCardUrl(CardInfo, string.Empty);
                urlPreview         = BackgroundPreview.GetRedirectUrlToMobile(urlPreview);
                ltlPreviewUrl.Text = $@"<a href=""{urlPreview}"" target=""_blank"">预览</a>";

                var urlEdit = BackgroundCardAdd.GetRedirectUrl(PublishmentSystemID, CardInfo.ID);
                ltlEditUrl.Text = $@"<a href=""{urlEdit}"">编辑</a>";

                ltlOperator.Text =
                    $@"<a href=""javascript:;"" onclick=""{Modal.CardOperatorAdd.GetOpenWindowStringToAdd(
                        PublishmentSystemID, CardInfo.ID)}"">操作员</a>";
            }
        }