本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.ToList方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.ToList方法的具体用法?C# TabController.ToList怎么用?C# TabController.ToList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Tabs.TabController
的用法示例。
在下文中一共展示了TabController.ToList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindRedirection
private void BindRedirection(int redirectId)
{
// Populating existing redirection settings
if (redirectId != Null.NullInteger)
{
var redirectController = new RedirectionController();
var redirect = redirectController.GetRedirectionById(ModuleContext.PortalId, redirectId);
txtRedirectName.Text = redirect.Name;
chkEnable.Checked = redirect.Enabled;
chkChildPages.Checked = redirect.IncludeChildTabs;
var tabs = new TabController().GetTabsByPortal(ModuleContext.PortalId).AsList().Where(IsVisible);
var tabInfos = tabs as IList<TabInfo> ?? tabs.ToList();
if (redirect.SourceTabId != -1)
{
optRedirectSource.SelectedValue = "Tab";
cboSourcePage.SelectedPage = tabInfos.SingleOrDefault(t => t.TabID == redirect.SourceTabId);
}
else
{
optRedirectSource.SelectedValue = "Portal";
}
if (IsSmartPhoneRedirect(redirect))
{
optRedirectType.SelectedValue = "SmartPhone";
}
else
{
optRedirectType.SelectedValue = redirect.Type.ToString();
}
optRedirectTarget.SelectedValue = redirect.TargetType.ToString();
//Other, populate Capabilities
if (redirect.Type == RedirectionType.Other)
{
BindRedirectionCapabilties();
}
switch (redirect.TargetType)
{
case TargetType.Portal:
if (cboPortal.Items.Count < 1) optRedirectTarget.SelectedValue = "Tab";
else
cboPortal.Select(redirect.TargetValue.ToString(), false);
break;
case TargetType.Tab:
int redirectTargetInt;
if(int.TryParse(redirect.TargetValue.ToString(), out redirectTargetInt))
cboTargetPage.SelectedPage = tabInfos.SingleOrDefault(t => t.TabID == redirectTargetInt);
break;
case TargetType.Url:
txtTargetUrl.Text = redirect.TargetValue.ToString();
break;
}
}
}