本文整理汇总了C#中ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法的典型用法代码示例。如果您正苦于以下问题:C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法的具体用法?C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser怎么用?C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentAPI
的用法示例。
在下文中一共展示了ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadToolBar
protected void LoadToolBar()
{
UserAPI m_refUserApi = new UserAPI();
string AppImgPath = m_refUserApi.AppImgPath;
ContentAPI refContentAPI = new ContentAPI();
string AppPath = refContentAPI.AppPath;
System.Text.StringBuilder result = new System.Text.StringBuilder();
try
{
divTitleBar.InnerHtml = m_refStyle.GetTitleBar(GetMessage("lbl messages"));
result.Append("<table><tr>");
// Back button
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/back.png", (string)("CommunityMessaging.aspx?action=" + (SentMode ? "viewallsent" : "viewall")), GetMessage("btn back"), GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true));
if (m_sentMode == false)
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailAdd.png", "CommunityMessaging.aspx?action=editmsg", GetMessage("lbl compose a message"), GetMessage("lbl compose a message"), "", StyleHelper.AddEmailButtonCssClass, true));
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailDelete.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&mode=del&id=" + m_id), GetMessage("btn delete"), GetMessage("btn delete"), "", StyleHelper.DeleteEmailButtonCssClass));
if (m_bCanReply)
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailReply.png", (string) ("CommunityMessaging.aspx?action=editmsg&id=" + m_id), GetMessage("lbl reply message"), GetMessage("lbl reply message"), "", StyleHelper.ReplyToEmailButtonCssClass));
}
}
else
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailDelete.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&mode=del&id=" + m_id), GetMessage("btn delete"), GetMessage("btn delete"), "", StyleHelper.DeleteEmailButtonCssClass, true));
}
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailForward.png", (string) ("CommunityMessaging.aspx?action=editmsg&mode=fwd&id=" + m_id + "&userid=" + m_msgUserId), GetMessage("lbl forward message"), GetMessage("lbl forward message"), "", StyleHelper.ForwardEmailButtonCssClass));
long previousMsgID = 0;
long nextMsgID = 0;
refContentAPI.GetAjacentPrivateMessagesForCurrentUser(Convert.ToInt64(m_id), System.Convert.ToBoolean(!(SentMode)), ref previousMsgID, ref nextMsgID);
if (previousMsgID > 0)
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowLeft.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&id=" + previousMsgID.ToString() + "&userid=" + m_msgUserId.ToString()), GetMessage("lbl previous message"), GetMessage("lbl previous message"), "", StyleHelper.PreviousButtonCssClass));
}
else
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowLeftOff.png", "#", GetMessage("lbl previous message"), GetMessage("lbl previous message"), "", StyleHelper.PreviousDisabledButtonCssClass));
}
if (nextMsgID > 0)
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowRight.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&id=" + nextMsgID.ToString() + "&userid=" + m_msgUserId.ToString()), GetMessage("lbl next message"), GetMessage("lbl next message"), "", StyleHelper.NextButtonCssClass));
}
else
{
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowRightOff.png", "#", GetMessage("lbl next message"), GetMessage("lbl next message"), "", StyleHelper.NextDisabledButtonCssClass));
}
//CommunityMessaging.aspx?action=" + IIf(SentMode, "viewsentmsg", "viewmsg") + "&id=" + aMessages(idx).ID.ToString()
result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/print.png", "javascript:window.print();", GetMessage("lbl print message"), GetMessage("lbl print message"), "", StyleHelper.PrintButtonCssClass));
result.Append(StyleHelper.ActionBarDivider);
result.Append("<td>");
if (SentMode)
{
result.Append(m_refStyle.GetHelpButton("view_sent_msg", ""));
}
else
{
result.Append(m_refStyle.GetHelpButton("view_msg", ""));
}
result.Append("</td>");
result.Append("</tr></table>");
divToolBar.InnerHtml = result.ToString();
result = null;
}
catch (Exception ex)
{
Utilities.ShowError(ex.Message);
}
finally
{
refContentAPI = null;
}
}