Пример #1
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var searchInfo = new SearchInfo(e.Item.DataItem);

                var ltlItemIndex  = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlTitle      = e.Item.FindControl("ltlTitle") 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 ltlPreviewUrl = e.Item.FindControl("ltlPreviewUrl") as Literal;
                var ltlEditUrl    = e.Item.FindControl("ltlEditUrl") as Literal;

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

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

                var urlPreview = SearchManager.GetSearchUrl(searchInfo);
                urlPreview         = BackgroundPreview.GetRedirectUrlToMobile(urlPreview);
                ltlPreviewUrl.Text = $@"<a href=""{urlPreview}"" target=""_blank"">预览</a>";

                var urlEdit = BackgroundSearchAdd.GetRedirectUrl(PublishmentSystemID, searchInfo.ID);

                ltlEditUrl.Text = $@"<a href=""{urlEdit}"">编辑</a>";
            }
        }
Пример #2
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var actInfo = new CouponActInfo(e.Item.DataItem);

                var ltlItemIndex  = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlTitle      = e.Item.FindControl("ltlTitle") as Literal;
                var ltlKeywords   = e.Item.FindControl("ltlKeywords") as Literal;
                var ltlStartDate  = e.Item.FindControl("ltlStartDate") as Literal;
                var ltlEndDate    = e.Item.FindControl("ltlEndDate") as Literal;
                var ltlUserCount  = e.Item.FindControl("ltlUserCount") as Literal;
                var ltlPVCount    = e.Item.FindControl("ltlPVCount") as Literal;
                var ltlIsEnabled  = e.Item.FindControl("ltlIsEnabled") as Literal;
                var ltlCoupons    = e.Item.FindControl("ltlCoupons") as Literal;
                var ltlRelate     = e.Item.FindControl("ltlRelate") as Literal;
                var ltlPreviewUrl = e.Item.FindControl("ltlPreviewUrl") as Literal;
                var ltlEditUrl    = e.Item.FindControl("ltlEditUrl") as Literal;

                ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString();
                ltlTitle.Text     = actInfo.Title;
                ltlKeywords.Text  = DataProviderWX.KeywordDAO.GetKeywords(actInfo.KeywordID);
                ltlStartDate.Text = DateUtils.GetDateAndTimeString(actInfo.StartDate);
                ltlEndDate.Text   = DateUtils.GetDateAndTimeString(actInfo.EndDate);
                ltlUserCount.Text = actInfo.UserCount.ToString();
                ltlPVCount.Text   = actInfo.PVCount.ToString();

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

                var couponInfoList = DataProviderWX.CouponDAO.GetCouponInfoList(PublishmentSystemID, actInfo.ID);
                foreach (var couponInfo in couponInfoList)
                {
                    ltlCoupons.Text +=
                        $@"<a href=""{BackgroundCouponSN.GetRedirectUrl(PublishmentSystemID, couponInfo.ID,
                            GetRedirectUrl(PublishmentSystemID))}"">{couponInfo.Title}</a>&nbsp;&nbsp;" +
                        ",";
                }
                if (ltlCoupons.Text.Length > 0)
                {
                    ltlCoupons.Text = ltlCoupons.Text.Substring(0, ltlCoupons.Text.Length - 1);
                }
                ltlRelate.Text =
                    $@"<a href=""javascript:;"" onclick=""{Modal.CouponRelated.GetOpenWindowString(
                        PublishmentSystemID, actInfo.ID)}"">关联优惠劵</a>";

                if (couponInfoList.Count > 0)
                {
                    var urlPreview = CouponManager.GetCouponHoldUrl(PublishmentSystemInfo, actInfo.ID);
                    urlPreview         = BackgroundPreview.GetRedirectUrlToMobile(urlPreview);
                    ltlPreviewUrl.Text = $@"<a target=""_blank"" href=""{urlPreview}"">预览</a>";
                }

                var urlEdit = BackgroundCouponActAdd.GetRedirectUrl(PublishmentSystemID, actInfo.ID);
                ltlEditUrl.Text = $@"<a href=""{urlEdit}"">编辑</a>";
            }
        }
Пример #3
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        if (parallaxBackground.GetComponent <SpriteRenderer>() != null)
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(tileX);
            EditorGUILayout.PropertyField(tileY);
            EditorGUILayout.PropertyField(tileXAmount);
            EditorGUILayout.PropertyField(tileYAmount);

            serializedObject.ApplyModifiedProperties();
        }

        if (GUILayout.Button("Preview"))
        {
            CancelAllPreviews();
            previewItems                       = new BackgroundPreview[] { new BackgroundPreview() };
            previewItems[0].obj                = (ParallaxBackground2)target;
            previewItems[0].startPosition      = previewItems[0].obj.transform.position;
            previewItems[0].obj.editorShowMesh = true;
        }
        if (GUILayout.Button("Preview All"))
        {
            CancelAllPreviews();
            ParallaxBackground2[] allBackgrounds = FindObjectsOfType <ParallaxBackground2>();
            previewItems                       = new BackgroundPreview[allBackgrounds.Length];
            previewItems[0]                    = new BackgroundPreview();
            previewItems[0].obj                = (ParallaxBackground2)target;
            previewItems[0].startPosition      = previewItems[0].obj.transform.position;
            previewItems[0].obj.editorShowMesh = true;
            int ii = 1;
            for (int i = 0; i < allBackgrounds.Length; i++)
            {
                if (allBackgrounds[i] != previewItems[0].obj)
                {
                    previewItems[ii]                    = new BackgroundPreview();
                    previewItems[ii].obj                = allBackgrounds[i];
                    previewItems[ii].startPosition      = allBackgrounds[i].transform.position;
                    previewItems[ii].obj.editorShowMesh = true;
                    ii++;
                }
            }
        }
        if (previewItems != null && GUILayout.Button("Cancel Preview"))
        {
            CancelAllPreviews();
        }
    }
Пример #4
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var collectInfo = new CollectInfo(e.Item.DataItem);

                var ltlItemIndex  = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlTitle      = e.Item.FindControl("ltlTitle") as Literal;
                var ltlKeywords   = e.Item.FindControl("ltlKeywords") as Literal;
                var ltlStartDate  = e.Item.FindControl("ltlStartDate") as Literal;
                var ltlEndDate    = e.Item.FindControl("ltlEndDate") as Literal;
                var ltlUserCount  = e.Item.FindControl("ltlUserCount") as Literal;
                var ltlPVCount    = e.Item.FindControl("ltlPVCount") as Literal;
                var ltlIsEnabled  = e.Item.FindControl("ltlIsEnabled") as Literal;
                var ltlCollectUrl = e.Item.FindControl("ltlCollectUrl") as Literal;
                var ltlLogUrl     = e.Item.FindControl("ltlLogUrl") as Literal;
                var ltlPreviewUrl = e.Item.FindControl("ltlPreviewUrl") as Literal;
                var ltlEditUrl    = e.Item.FindControl("ltlEditUrl") as Literal;

                ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString();
                ltlTitle.Text     = collectInfo.Title;
                ltlKeywords.Text  = DataProviderWX.KeywordDAO.GetKeywords(collectInfo.KeywordID);
                ltlStartDate.Text = DateUtils.GetDateAndTimeString(collectInfo.StartDate);
                ltlEndDate.Text   = DateUtils.GetDateAndTimeString(collectInfo.EndDate);
                ltlUserCount.Text = collectInfo.UserCount.ToString();
                ltlPVCount.Text   = collectInfo.PVCount.ToString();

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

                var urlCollect = BackgroundCollectItem.GetRedirectUrl(PublishmentSystemID, collectInfo.ID, GetRedirectUrl(PublishmentSystemID));
                ltlCollectUrl.Text = $@"<a href=""{urlCollect}"">参赛记录</a>";

                var urlLog = BackgroundCollectLog.GetRedirectUrl(PublishmentSystemID, collectInfo.ID, GetRedirectUrl(PublishmentSystemID));
                ltlLogUrl.Text = $@"<a href=""{urlLog}"">投票记录</a>";

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

                var urlEdit = BackgroundCollectAdd.GetRedirectUrl(PublishmentSystemID, collectInfo.ID);
                ltlEditUrl.Text = $@"<a href=""{urlEdit}"">编辑</a>";
            }
        }
Пример #5
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>";
            }
        }
Пример #6
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var lotteryInfo = new LotteryInfo(e.Item.DataItem);

                var ltlItemIndex  = e.Item.FindControl("ltlItemIndex") as Literal;
                var ltlTitle      = e.Item.FindControl("ltlTitle") as Literal;
                var ltlKeywords   = e.Item.FindControl("ltlKeywords") as Literal;
                var ltlStartDate  = e.Item.FindControl("ltlStartDate") as Literal;
                var ltlEndDate    = e.Item.FindControl("ltlEndDate") as Literal;
                var ltlUserCount  = e.Item.FindControl("ltlUserCount") as Literal;
                var ltlPVCount    = e.Item.FindControl("ltlPVCount") as Literal;
                var ltlIsEnabled  = e.Item.FindControl("ltlIsEnabled") as Literal;
                var ltlWinner     = e.Item.FindControl("ltlWinner") as Literal;
                var ltlPreviewUrl = e.Item.FindControl("ltlPreviewUrl") as Literal;
                var ltlEditUrl    = e.Item.FindControl("ltlEditUrl") as Literal;

                ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString();
                ltlTitle.Text     = lotteryInfo.Title;
                ltlKeywords.Text  = DataProviderWX.KeywordDAO.GetKeywords(lotteryInfo.KeywordID);
                ltlStartDate.Text = DateUtils.GetDateAndTimeString(lotteryInfo.StartDate);
                ltlEndDate.Text   = DateUtils.GetDateAndTimeString(lotteryInfo.EndDate);
                ltlUserCount.Text = lotteryInfo.UserCount.ToString();
                ltlPVCount.Text   = lotteryInfo.PVCount.ToString();

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

                ltlWinner.Text =
                    $@"<a href=""{BackgroundLotteryWinner.GetRedirectUrl(PublishmentSystemID, lotteryType,
                        lotteryInfo.ID, 0, GetRedirectUrl(PublishmentSystemID, lotteryType))}"">查看获奖名单</a>";

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

                var urlEdit = string.Empty;
                if (lotteryType == ELotteryType.Scratch)
                {
                    urlEdit = BackgroundScratchAdd.GetRedirectUrl(PublishmentSystemID, lotteryInfo.ID);
                }
                else if (lotteryType == ELotteryType.BigWheel)
                {
                    urlEdit = BackgroundBigWheelAdd.GetRedirectUrl(PublishmentSystemID, lotteryInfo.ID);
                }
                else if (lotteryType == ELotteryType.GoldEgg)
                {
                    urlEdit = BackgroundGoldEggAdd.GetRedirectUrl(PublishmentSystemID, lotteryInfo.ID);
                }
                else if (lotteryType == ELotteryType.Flap)
                {
                    urlEdit = BackgroundFlapAdd.GetRedirectUrl(PublishmentSystemID, lotteryInfo.ID);
                }
                else if (lotteryType == ELotteryType.YaoYao)
                {
                    urlEdit = BackgroundYaoYaoAdd.GetRedirectUrl(PublishmentSystemID, lotteryInfo.ID);
                }

                ltlEditUrl.Text = $@"<a href=""{urlEdit}"">编辑</a>";
            }
        }