本文整理汇总了C#中ActivityInfo类的典型用法代码示例。如果您正苦于以下问题:C# ActivityInfo类的具体用法?C# ActivityInfo怎么用?C# ActivityInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActivityInfo类属于命名空间,在下文中一共展示了ActivityInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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
};
}
示例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();
}