本文整理汇总了C#中CmsData.Person.ComputeTitle方法的典型用法代码示例。如果您正苦于以下问题:C# Person.ComputeTitle方法的具体用法?C# Person.ComputeTitle怎么用?C# Person.ComputeTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsData.Person
的用法示例。
在下文中一共展示了Person.ComputeTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoReplaceCode
//.........这里部分代码省略.........
return GetOrgInfo(emailqueueto).Name;
case "{orgmembercount}":
return GetOrgInfo(emailqueueto).Count;
case "{paylink}":
if (pi != null && pi.PayLink.HasValue())
return $"<a href=\"{pi.PayLink}\">Click this link to make a payment and view your balance.</a>";
break;
case "{peopleid}":
return p.PeopleId.ToString();
case "{salutation}":
if (emailqueueto != null)
return db.GoerSupporters.Where(ee => ee.Id == emailqueueto.GoerSupportId).Select(ee => ee.Salutation).SingleOrDefault();
break;
case "{state}":
return p.PrimaryState;
case "{email}":
case "{toemail}":
if (ListAddresses.Count > 0)
return ListAddresses[0].Address;
break;
case "{today}":
return DateTime.Today.ToShortDateString();
case "{title}":
if (p.TitleCode.HasValue())
return p.TitleCode;
return p.ComputeTitle();
case "{track}":
if (emailqueueto != null)
return emailqueueto.Guid.HasValue ?
$"<img src=\"{db.ServerLink("/Track/Key/" + emailqueueto.Guid.Value.GuidToQuerystring())}\" />"
: "";
break;
case "{unsubscribe}":
if (emailqueueto != null)
return UnSubscribeLink(emailqueueto);
break;
default:
if (emailqueueto == null)
emailqueueto = new EmailQueueTo()
{
PeopleId = p.PeopleId,
OrgId = db.CurrentOrgId0
};
if (code.StartsWith("{addsmallgroup:", StringComparison.OrdinalIgnoreCase))
return AddSmallGroup(code, emailqueueto);
if (code.StartsWith("{extra", StringComparison.OrdinalIgnoreCase))
return ExtraValue(code, emailqueueto);
if (registerLinkRe.IsMatch(code))
return RegisterLink(code, emailqueueto);
if (registerHrefRe.IsMatch(code))
return RegisterLinkHref(code, emailqueueto);