本文整理汇总了C#中EkMessageHelper.GetMessageForLanguage方法的典型用法代码示例。如果您正苦于以下问题:C# EkMessageHelper.GetMessageForLanguage方法的具体用法?C# EkMessageHelper.GetMessageForLanguage怎么用?C# EkMessageHelper.GetMessageForLanguage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EkMessageHelper
的用法示例。
在下文中一共展示了EkMessageHelper.GetMessageForLanguage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBodyText
private string GetBodyText(EkMessageHelper messageHelper, ContentData myContentData, FolderData myFolderData, string userFromFirstName, string userFromLastName)
{
StringBuilder bodyText = new StringBuilder();
bodyText.Append(messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInMessagePart1", this.LanguageId));
bodyText.Append(Environment.NewLine);
bodyText.Append(messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInMessagePart2", this.LanguageId));
bodyText.Append(@": " + myContentData.Title);
bodyText.Append(Environment.NewLine);
bodyText.Append(messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInMessagePart3", this.LanguageId));
bodyText.Append(@": " + myFolderData.Name);
bodyText.Append(Environment.NewLine);
bodyText.Append(messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInMessagePart4", this.LanguageId));
bodyText.Append(@": " + userFromFirstName + @" " + userFromLastName);
return bodyText.ToString();
}
示例2: Page_PreInit
protected void Page_PreInit(object sender, System.EventArgs e)
{
m_refMsg = m_refUserApi.EkMsgRef;
m_PleaseLoginMsg = m_refMsg.GetMessage("lbl logged in refresh");
LoginBtn.Attributes.Add("style", "padding:0.4em 1em 0.4em 20px;position:relative;text-decoration:none;");
LoginBtn.ToolTip = m_refMsg.GetMessageForLanguage("click here to log in", iSiteLanguage);
loginLoginText.Text = m_refMsg.GetMessageForLanguage("generic login msg", iSiteLanguage);
loginCancelText.Text = m_refMsg.GetMessageForLanguage("generic cancel", iSiteLanguage);
LogoutBtn.Attributes.Add("onclick", "clearAuth()");
LogoutBtn.Attributes.Add("style", "padding:0.4em 1em 0.4em 20px;position:relative;text-decoration:none;");
litLogoutButtonText.Text = m_refMsg.GetMessage("generic logout msg");
loginCancel.Attributes.Add("style", "padding:0.4em 1em 0.4em 20px;position:relative;text-decoration:none;");
logoutCancel.Attributes.Add("style", "padding:0.4em 1em 0.4em 20px;position:relative;text-decoration:none;");
logoutCancelText.Text = loginCancelText.Text;
changePasswordBtn.Attributes.Add("style", "padding:0.4em 1em 0.4em 20px;position:relative;text-decoration:none;");
changePasswordCancel.Attributes.Add("style", "padding:0.4em 1em 0.4em 20px;position:relative;text-decoration:none;");
changePasswordBtn.ToolTip = m_refMsg.GetMessage("lbl change password alt");
changePasswordText.Text = m_refMsg.GetMessage("lbl change password");
changePasswordCancelText.Text = m_refMsg.GetMessage("generic cancel");
changePasswordCancel.Text = m_refMsg.GetMessage("generic cancel");
changePasswordCancel.ToolTip = changePasswordCancel.Text;
}
示例3: RequestCheckIn
protected void RequestCheckIn()
{
#region Instantiate Local Variables
long userIdFrom = Convert.ToInt64(Request.QueryString["userIdFrom"]);
long userIdTo = Convert.ToInt64(Request.QueryString["userIdTo"]);
ContentData myContentData = new ContentData();
Folder myFolder = new Folder();
FolderData myFolderData = new FolderData();
myContentData = m_ContentApi.GetContentById(this.ContentId, ContentAPI.ContentResultType.Published);
myFolderData = myFolder.GetFolder(myContentData.FolderId);
#endregion
#region Retrieve User Data
UserData userFromData = new UserData();
UserData userToData = new UserData();
UserAPI myUserApi = new UserAPI();
ContentAPI contAPI = new ContentAPI();
userFromData = myUserApi.GetUserById(userIdFrom, true, true);
//Calling EkUserRw instead of UserApi to skip permissions check
Ektron.Cms.DataIO.EkUserRW usrObj = new Ektron.Cms.DataIO.EkUserRW(contAPI.RequestInformationRef);
Microsoft.VisualBasic.Collection uCol = usrObj.GetUserByIDv2_6(userIdTo, true, true);
userToData = usrObj.ConvertUserData(uCol);
#endregion
#region Send "Request Check-In" Email Message
EkMessageHelper messageHelper = new EkMessageHelper(m_ContentApi.RequestInformationRef);
EkMailService mail = new EkMailService(m_ContentApi.RequestInformationRef);
if (userFromData.Email != String.Empty && userToData.Email != String.Empty)
{
try
{
mail.MailFrom = userFromData.Email;
mail.MailCC = userFromData.Email;
mail.MailSubject = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInSubject", this.LanguageId) + @": " + myContentData.Title;
mail.MailBodyText = this.GetBodyText(messageHelper, myContentData, myFolderData, userFromData.FirstName, userFromData.LastName);
mail.MailTo = userToData.Email;
mail.SendMail();
DmsMenuActionsRepsonse.Text = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInSucceeded", this.LanguageId) + @" " + userToData.FirstName + @" " + userToData.LastName + @" (" + userToData.Email + @")";
}
catch
{
DmsMenuActionsRepsonse.Text = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInFailed", this.LanguageId);
}
}
else
{
DmsMenuActionsRepsonse.Text = messageHelper.GetMessageForLanguage("DmsMenuRequestCheckInFailedNoEmail", this.LanguageId);
}
#endregion
}