• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ActivityInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ActivityInfo的典型用法代码示例。如果您正苦于以下问题:C# ActivityInfo类的具体用法?C# ActivityInfo怎么用?C# ActivityInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ActivityInfo类属于命名空间,在下文中一共展示了ActivityInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleManager.IsModuleLoaded(ModuleName.POLLS) || (ai.ActivityType != PredefinedActivityType.POLL_VOTING))
        {
            return false;
        }

        GeneralizedInfo ipollinfo = ModuleCommands.PollsGetPollInfo(ai.ActivityItemID);
        if (ipollinfo != null)
        {
            string pollQuestion = ValidationHelper.GetString(ipollinfo.GetValue("PollQuestion"), null);
            ucDetails.AddRow("om.activitydetails.pollquestion", pollQuestion);
        }

        if (ai.ActivityValue != null)
        {
            string[] answerIDs = ai.ActivityValue.Split(new[] { ActivityPollVoting.POLL_ANSWER_SEPARATOR }, StringSplitOptions.RemoveEmptyEntries);
            StringBuilder answers = new StringBuilder();
            foreach (string id in answerIDs)
            {
                GeneralizedInfo iansinfo = ModuleCommands.PollsGetPollAnswerInfo(ValidationHelper.GetInteger(id, 0));
                if (iansinfo != null)
                {
                    answers.Append("<div>");
                    answers.Append(HTMLHelper.HTMLEncode(ValidationHelper.GetString(iansinfo.GetValue("AnswerText"), null)));
                    answers.Append("</div>");
                }
            }
            ucDetails.AddRow("om.activitydetails.pollanswer", answers.ToString(), false);
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:33,代码来源:PollVoting.ascx.cs


示例2: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleManager.IsModuleLoaded(ModuleName.COMMUNITY))
        {
            return false;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.JOIN_GROUP:
            case PredefinedActivityType.LEAVE_GROUP:
                break;
            default:
                return false;
        }

        if (ai.ActivityItemID > 0)
        {
            BaseInfo binfo = ModuleCommands.CommunityGetGroupInfo(ai.ActivityItemID);
            if (binfo != null)
            {
                string groupDisplayName = binfo.GetStringValue("GroupDisplayName", GetString("general.na"));
                ucDetails.AddRow("om.activitydetails.groupname", groupDisplayName);
            }
        }

        return true;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:28,代码来源:JoinGroup.ascx.cs


示例3: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleEntry.IsModuleLoaded(ModuleEntry.NEWSLETTER) || (ai.ActivityType != PredefinedActivityType.NEWSLETTER_CLICKTHROUGH))
        {
            return false;
        }

        // Get newsletter name
        int nesletterId = ai.ActivityItemID;
        GeneralizedInfo iinfo = ModuleCommands.NewsletterGetNewsletterInfo(nesletterId);
        if (iinfo != null)
        {
            string subject = ValidationHelper.GetString(iinfo.GetValue("NewsletterDisplayName"), null);
            ucDetails.AddRow("om.activitydetails.newsletter", subject);
        }

        // Get issue subject
        int issueId = ai.ActivityItemDetailID;
        iinfo = ModuleCommands.NewsletterGetNewsletterIssueInfo(issueId);
        if (iinfo != null)
        {
            string subject = ValidationHelper.GetString(iinfo.GetValue("IssueSubject"), null);
            ucDetails.AddRow("om.activitydetails.newsletterissue", MacroResolver.RemoveSecurityParameters(subject, true, null));
        }

        string targetLink = ai.ActivityURL;
        ucDetails.AddRow("om.activitydetails.newstargetlink", GetLink(targetLink, targetLink), false);

        return ucDetails.IsDataLoaded;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:30,代码来源:NewsletterClickThrough.ascx.cs


示例4: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if (ai == null)
        {
            return false;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.EXTERNAL_SEARCH:
            case PredefinedActivityType.INTERNAL_SEARCH:
                break;
            default:
                return false;
        }

        // Load additional info
        SearchInfo si = SearchInfoProvider.GetSearchInfoByActivityID(ai.ActivityID);
        if (si == null)
        {
            return false;
        }

        ucDetails.AddRow("om.activitydetails.keywords", si.SearchKeywords);
        if (ai.ActivityType == PredefinedActivityType.EXTERNAL_SEARCH)
        {
            ucDetails.AddRow("om.activitydetails.provider", si.SearchProvider);
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:puentepr,项目名称:kentico-site-example,代码行数:31,代码来源:ExternalSearch.ascx.cs


示例5: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleEntry.IsModuleLoaded(ModuleEntry.BLOGS))
        {
            return false;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.BLOG_COMMENT:
            case PredefinedActivityType.SUBSCRIPTION_BLOG_POST:
                break;
            default:
                return false;
        }

        int nodeId = ai.ActivityNodeID;
        lblDocIDVal.Text = GetLinkForDocument(nodeId, ai.ActivityCulture);

        if (ai.ActivityType == PredefinedActivityType.BLOG_COMMENT)
        {
            GeneralizedInfo iinfo = ModuleCommands.BlogsGetBlogCommentInfo(ai.ActivityItemID);
            if (iinfo != null)
            {
                plcComment.Visible = true;
                txtComment.Text = ValidationHelper.GetString(iinfo.GetValue("CommentText"), null);
            }
        }

        return true;
    }
开发者ID:puentepr,项目名称:kentico-site-example,代码行数:31,代码来源:BlogComment.ascx.cs


示例6: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || (ai.ActivityType != PredefinedActivityType.NEWSLETTER_UNSUBSCRIBING_FROM_ALL))
        {
            return false;
        }

        // Get issue subject
        int issueId = ai.ActivityItemID;
        var issueInfo = IssueInfoProvider.GetIssueInfo(issueId);
        if (issueInfo != null)
        {
            // Get newsletter name
            var newsletterInfo = NewsletterInfoProvider.GetNewsletterInfo(issueInfo.IssueNewsletterID);
            if (newsletterInfo != null)
            {
                ucDetails.AddRow("om.activitydetails.newsletter", newsletterInfo.NewsletterDisplayName);
            }

            var issueSubject = MacroSecurityProcessor.RemoveSecurityParameters(issueInfo.IssueSubject, true, null);
            ucDetails.AddRow("om.activitydetails.newsletterissue", issueSubject);
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:25,代码来源:NewsletterUnsubscriptionFromAll.ascx.cs


示例7: LoadData

    /// <summary>
    /// Loads activity info data.
    /// </summary>
    /// <param name="ai">ActivityInfo object</param>
    public override bool LoadData(ActivityInfo ai)
    {
        if (ai == null)
        {
            return false;
        }

        string mvtComb = null;
        string queryString = null;
        string abVariant = null;

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.LANDING_PAGE:
            case PredefinedActivityType.PAGE_VISIT:
                PageVisitInfo pvi = PageVisitInfoProvider.GetPageVisitInfoByActivityID(ai.ActivityID);
                if (pvi == null)
                {
                    return false;
                }

                mvtComb = pvi.PageVisitMVTCombinationName;
                queryString = pvi.PageVisitDetail;
                abVariant = pvi.PageVisitABVariantName;
                break;
        }

        // Loads data to grid
        ucDetails.AddRow("om.activitydetails.query", queryString);
        ucDetails.AddRow("om.activitydetails.abvariant", abVariant);
        ucDetails.AddRow("om.activitydetails.mvtcomb", mvtComb);
        return ucDetails.IsDataLoaded;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:37,代码来源:PageVisit.ascx.cs


示例8: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleEntry.IsModuleLoaded(ModuleEntry.ECOMMERCE))
        {
            return false;
            ;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.PURCHASEDPRODUCT:
                break;
            default:
                return false;
        }

        GeneralizedInfo iinfo = ModuleCommands.ECommerceGetSKUInfo(ai.ActivityItemID);
        if (iinfo != null)
        {
            string productName = ValidationHelper.GetString(iinfo.GetValue("SKUName"), null);
            ucDetails.AddRow("om.activitydetails.product", productName);
            ucDetails.AddRow("om.activitydetails.productunits", ai.ActivityValue);
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:26,代码来源:PurchasedProduct.ascx.cs


示例9: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || (ai.ActivityType != PredefinedActivityType.NEWSLETTER_OPEN))
        {
            return false;
        }

        // Get newsletter name
        int newsletterId = ai.ActivityItemID;
        NewsletterInfo newsletterInfo = NewsletterInfoProvider.GetNewsletterInfo(newsletterId);
        if (newsletterInfo != null)
        {
            string subject = ValidationHelper.GetString(newsletterInfo.NewsletterDisplayName, null);
            ucDetails.AddRow("om.activitydetails.newsletter", subject);
        }

        // Get issue subject
        int issueId = ai.ActivityItemDetailID;
        IssueInfo issueInfo = IssueInfoProvider.GetIssueInfo(issueId);
        if (issueInfo != null)
        {
            string subject = ValidationHelper.GetString(issueInfo.IssueSubject, null);
            ucDetails.AddRow("om.activitydetails.newsletterissue", MacroSecurityProcessor.RemoveSecurityParameters(subject, true, null));
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:27,代码来源:NewsletterOpen.ascx.cs


示例10: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleEntry.IsModuleLoaded(ModuleEntry.NEWSLETTER) || (ai.ActivityType != PredefinedActivityType.NEWSLETTER_OPEN))
        {
            return false;
        }

        // Get newsletter name
        int nesletterId = ai.ActivityItemID;
        GeneralizedInfo iinfo = ModuleCommands.NewsletterGetNewsletterInfo(nesletterId);
        if (iinfo != null)
        {
            string subject = ValidationHelper.GetString(iinfo.GetValue("NewsletterDisplayName"), null);
            ucDetails.AddRow("om.activitydetails.newsletter", subject);
        }

        // Get issue subject
        int issueId = ai.ActivityItemDetailID;
        iinfo = ModuleCommands.NewsletterGetNewsletterIssueInfo(issueId);
        if (iinfo != null)
        {
            string subject = ValidationHelper.GetString(iinfo.GetValue("IssueSubject"), null);
            ucDetails.AddRow("om.activitydetails.newsletterissue", subject);
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:puentepr,项目名称:kentico-site-example,代码行数:27,代码来源:NewsletterOpen.ascx.cs


示例11: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleManager.IsModuleLoaded(ModuleName.ECOMMERCE))
        {
            return false;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.PRODUCT_ADDED_TO_WISHLIST:
            case PredefinedActivityType.PRODUCT_ADDED_TO_SHOPPINGCART:
            case PredefinedActivityType.PRODUCT_REMOVED_FROM_SHOPPINGCART:
                break;
            default:
                return false;
        }

        GeneralizedInfo sku = BaseAbstractInfoProvider.GetInfoById(PredefinedObjectType.SKU, ai.ActivityItemID);
        if (sku != null)
        {
            string productName = ValidationHelper.GetString(sku.GetValue("SKUName"), null);
            ucDetails.AddRow("om.activitydetails.product", productName);

            if (ai.ActivityType != PredefinedActivityType.PRODUCT_ADDED_TO_WISHLIST)
            {
                ucDetails.AddRow("om.activitydetails.productunits", ai.ActivityValue);
            }
        }

        return ucDetails.IsDataLoaded;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:31,代码来源:ProductAddedToShoppingCart.ascx.cs


示例12: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleEntry.IsModuleLoaded(ModuleEntry.MESSAGEBOARD))
        {
            return false;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.MESSAGE_BOARD_COMMENT:
            case PredefinedActivityType.SUBSCRIPTION_MESSAGE_BOARD:
                break;
            default:
                return false;
        }

        int nodeId = ai.ActivityNodeID;
        lblDocIDVal.Text = GetLinkForDocument(nodeId, ai.ActivityCulture);

        if (ai.ActivityType == PredefinedActivityType.MESSAGE_BOARD_COMMENT)
        {
            plcComment.Visible = true;
            GeneralizedInfo iinfo = ModuleCommands.MessageBoardGetBoardMessageInfo(ai.ActivityItemDetailID);
            if (iinfo != null)
            {
                txtComment.Text = ValidationHelper.GetString(iinfo.GetValue("MessageText"), null);
            }
        }

        return true;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:31,代码来源:MessageBoardComment.ascx.cs


示例13: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || !ModuleEntry.IsModuleLoaded(ModuleEntry.FORUMS))
        {
            return false;
        }

        switch (ai.ActivityType)
        {
            case PredefinedActivityType.FORUM_POST:
            case PredefinedActivityType.SUBSCRIPTION_FORUM_POST:
                break;
            default:
                return false;
        }

        int nodeId = ai.ActivityNodeID;
        lblDocIDVal.Text = GetLinkForDocument(nodeId, ai.ActivityCulture);

        if (ai.ActivityType == PredefinedActivityType.FORUM_POST)
        {
            GeneralizedInfo iinfo = ModuleCommands.ForumsGetForumPostInfo(ai.ActivityItemDetailID);
            if (iinfo != null)
            {
                plcComment.Visible = true;
                lblPostSubjectVal.Text = HTMLHelper.HTMLEncode(ValidationHelper.GetString(iinfo.GetValue("PostSubject"), null));
                txtPost.Text = ValidationHelper.GetString(iinfo.GetValue("PostText"), null);
            }
        }

        return true;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:32,代码来源:ForumPost.ascx.cs


示例14: CreateNewBadgeAward

 private static BadgeAwardDTO CreateNewBadgeAward(ActivityInfo activity, BadgeEditDTO potentialBadge)
 {
     return new BadgeAwardDTO
     {
         BadgeId = potentialBadge.Id,
         AwardAmount = potentialBadge.AwardValueAmount,
         EmployeeId = activity.EmployeeId,
         AwardDate = DateTime.UtcNow
     };
 }
开发者ID:jpeterson7755,项目名称:Badge-Application,代码行数:10,代码来源:AwardBadges.cs


示例15: JobActivityGroupViewModel

 public JobActivityGroupViewModel(JobContainerViewModel container, ActivityInfo activityInfo, Model.ImageDownloader[] imageDownloader)
 {
     NoticeText = activityInfo.PostUser.Name;
     NoticeIcon = new System.Windows.Media.Imaging.BitmapImage();
     NoticeIcon.BeginInit();
     NoticeIcon.DecodePixelWidth = 25;
     NoticeIcon.UriSource = activityInfo.PostUser.IconImageUrl;
     NoticeIcon.EndInit();
     ActivityUrl = activityInfo.PostUrl;
     DownloadImageJobs = imageDownloader.Select(
         downloader => (JobViewModelBase)new JobViewModel(container, downloader)).ToList();
 }
开发者ID:namoshika,项目名称:GPlusAutoImageDownloader,代码行数:12,代码来源:JobActivityGroupViewModel.cs


示例16: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || (ai.ActivityType != PredefinedActivityType.RATING))
        {
            return false;
        }

        // Load data to control
        int nodeId = ai.ActivityNodeID;
        ucDetails.AddRow("om.activitydetails.documenturl", GetLinkForDocument(nodeId, ai.ActivityCulture), false);
        ucDetails.AddRow("om.activitydetails.ratingvalue", String.Format("{0:00.0}", ai.ActivityValue));

        return ucDetails.IsDataLoaded;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:14,代码来源:Rating.ascx.cs


示例17: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || (ai.ActivityType != PredefinedActivityType.PURCHASE))
        {
            return false;
        }

        int orderId = ai.ActivityItemID;
        string qs = String.Format("?orderid={0}", orderId);
        qs = URLHelper.AddUrlParameter(qs, "hash", QueryHelper.GetHash(qs));
        btnView.Visible = true;
        btnView.OnClientClick = "DisplayOrderDetails('" + qs + "'); return false;";

        return true;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:15,代码来源:Purchase.ascx.cs


示例18: LoadData

    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || ai.ActivityType != PredefinedActivityType.ABUSE_REPORT)
        {
            return false;
        }

        int nodeId = ai.ActivityNodeID;
        lblDocIDVal.Text = GetLinkForDocument(nodeId, ai.ActivityCulture);

        AbuseReportInfo ari = AbuseReportInfoProvider.GetAbuseReportInfo(ai.ActivityItemID);
        if (ari != null)
        {
            txtComment.Text = ari.ReportComment;
        }

        return true;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:18,代码来源:AbuseReport.ascx.cs


示例19: LoadData

    /// <summary>
    /// Loads data
    /// </summary>
    /// <param name="ai">Activity info</param>
    public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || (ai.ActivityType != PredefinedActivityType.CUSTOM_TABLE_SUBMIT))
        {
            return false;
        }

        DataClassInfo customTable = DataClassInfoProvider.GetDataClassInfo(ai.ActivityItemID);
        if (customTable == null)
        {
            return false;
        }

        string qs = String.Format("?tableid={0}&itemid={1}", ai.ActivityItemID, ai.ActivityItemDetailID);
        qs = URLHelper.AddUrlParameter(qs, "hash", QueryHelper.GetHash(qs));
        btnView.Visible = true;
        btnView.OnClientClick = "DisplayCustomTableItemDetails('" + qs + "'); return false;";
        return true;
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:23,代码来源:CustomTableSubmit.ascx.cs


示例20: ActivityLinkedToObject

    /// <summary>
    /// Returns if activity is linked to object of type given in parameter and codename given in second parameter.
    /// </summary>
    /// <param name="activityInfo">Activity that should be checked</param>
    /// <param name="objectType">Object type</param>
    /// <param name="identifier">Code name or GUID of object</param>
    public static bool ActivityLinkedToObject(ActivityInfo activityInfo, string objectType, string identifier)
    {
        if (activityInfo == null)
        {
            return false;
        }

        int id = 0;
        switch (objectType)
        {

            case PredefinedObjectType.POLL:
            case PredefinedObjectType.NEWSLETTER:
            case PredefinedObjectType.BIZFORM:
            case PredefinedObjectType.FORUM:
            case PredefinedObjectType.GROUPMEMBER:
            case PredefinedObjectType.BOARDMESSAGE:
            case PredefinedObjectType.BOARD:
            case PredefinedObjectType.SKU:
                id = activityInfo.ActivityItemID;
                break;
            case PredefinedObjectType.NEWSLETTERISSUE:
                var issue = IssueInfoProvider.GetOriginalIssue(activityInfo.ActivityItemDetailID);
                if (issue != null)
                {
                    id = issue.IssueID;
                }
                break;
            case PredefinedObjectType.BLOGDOCUMENT:
                id = activityInfo.ActivityItemDetailID;
                objectType = PredefinedObjectType.NODE;
                break;
            case PredefinedObjectType.DOCUMENT:
            case PredefinedObjectType.NODE:
                id = activityInfo.ActivityNodeID;
                break;
            default:
                id = activityInfo.ActivityItemID;
                break;
        }

        return (id == ValidationHelper.GetInteger(CMSMacroMethods.GetObjectID(objectType, identifier, CMSContext.CurrentSiteName, true), -1));
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:49,代码来源:OnlineMarketingFunctions.cs



注:本文中的ActivityInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ActivityInstance类代码示例发布时间:2022-05-24
下一篇:
C# ActivityExecutor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap