本文整理汇总了C#中DotNetNuke.Common.Lists.ListController.GetListInfoCollection方法的典型用法代码示例。如果您正苦于以下问题:C# ListController.GetListInfoCollection方法的具体用法?C# ListController.GetListInfoCollection怎么用?C# ListController.GetListInfoCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Common.Lists.ListController
的用法示例。
在下文中一共展示了ListController.GetListInfoCollection方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindTree
private void BindTree()
{
var ctlLists = new ListController();
var colLists = ctlLists.GetListInfoCollection(string.Empty, string.Empty, PortalSettings.ActiveTab.PortalID);
var indexLookup = new Hashtable();
listTree.Nodes.Clear();
foreach (ListInfo list in colLists)
{
String filteredNode;
if (list.DisplayName.Contains(":"))
{
var finalPeriod = list.DisplayName.LastIndexOf(".", StringComparison.InvariantCulture);
filteredNode = list.DisplayName.Substring(finalPeriod + 1);
}
else
{
filteredNode = list.DisplayName;
}
var node = new DnnTreeNode { Text = filteredNode };
{
node.Value = list.Key;
node.ToolTip = String.Format(LocalizeString("NoEntries"), list.EntryCount);
node.ImageUrl = IconController.IconURL("Folder");
}
if (list.Level == 0)
{
listTree.Nodes.Add(node);
}
else
{
if (indexLookup[list.ParentList] != null)
{
var parentNode = (DnnTreeNode) indexLookup[list.ParentList];
parentNode.Nodes.Add(node);
}
}
//Add index key here to find it later, should suggest with Joe to add it to DNNTree
if (indexLookup[list.Key] == null)
{
indexLookup.Add(list.Key, node);
}
}
}
示例2: BindTree
private void BindTree()
{
var ctlLists = new ListController();
var colLists = ctlLists.GetListInfoCollection(string.Empty, string.Empty, PortalSettings.ActiveTab.PortalID);
var indexLookup = new Hashtable();
listTree.Nodes.Clear();
foreach (ListInfo list in colLists)
{
var node = new DnnTreeNode { Text = list.DisplayName.Replace(list.ParentList + ".", "") };
{
node.Value = list.Key;
node.ToolTip = String.Format(LocalizeString("NoEntries"), list.EntryCount);
node.ImageUrl = IconController.IconURL("Folder");
}
if (list.Level == 0)
{
listTree.Nodes.Add(node);
}
else
{
if (indexLookup[list.ParentList] != null)
{
var parentNode = (DnnTreeNode) indexLookup[list.ParentList];
parentNode.Nodes.Add(node);
}
}
//Add index key here to find it later, should suggest with Joe to add it to DNNTree
if (indexLookup[list.Key] == null)
{
indexLookup.Add(list.Key, node);
}
}
}
示例3: BindListInfo
/// <summary>
/// Loads top level entry list
/// </summary>
private void BindListInfo()
{
lblListName.Text = ListName;
lblListParent.Text = ParentKey;
rowListParent.Visible = (!String.IsNullOrEmpty(ParentKey));
chkEnableSortOrder.Checked = EnableSortOrder;
if (!SystemList && ShowDelete)
{
cmdDeleteList.Visible = true;
ClientAPI.AddButtonConfirm(cmdDeleteList, Localization.GetString("DeleteItem"));
}
else
{
cmdDeleteList.Visible = false;
}
switch (Mode)
{
case "ListEntries":
EnableView(true);
break;
case "EditEntry":
EnableView(false);
EnableEdit(false);
break;
case "AddEntry":
EnableView(false);
EnableEdit(false);
if (SelectedList != null)
{
txtParentKey.Text = SelectedList.ParentKey;
}
else
{
rowEnableSortOrder.Visible = true;
}
txtEntryName.Text = ListName;
rowListName.Visible = false;
txtEntryValue.Text = "";
txtEntryText.Text = "";
cmdSaveEntry.CommandName = "SaveEntry";
break;
case "AddList":
EnableView(false);
EnableEdit(true);
rowListName.Visible = true;
txtParentKey.Text = "";
txtEntryName.Text = "";
txtEntryValue.Text = "";
txtEntryText.Text = "";
txtEntryName.ReadOnly = false;
cmdSaveEntry.CommandName = "SaveList";
var ctlLists = new ListController();
ddlSelectList.Enabled = true;
ddlSelectList.DataSource = ctlLists.GetListInfoCollection(string.Empty, string.Empty, PortalSettings.ActiveTab.PortalID);
ddlSelectList.DataTextField = "DisplayName";
ddlSelectList.DataValueField = "Key";
ddlSelectList.DataBind();
//ddlSelectList.Items.Insert(0, new ListItem(Localization.GetString("None_Specified"), ""));
ddlSelectList.InsertItem(0, Localization.GetString("None_Specified"), "");
//Reset dropdownlist
ddlSelectParent.ClearSelection();
ddlSelectParent.Enabled = false;
break;
}
}
示例4: BindTree
/// -----------------------------------------------------------------------------
/// <summary>
/// Loads top level entry list into DNNTree
/// </summary>
/// <remarks>
/// </remarks>
/// <history>
/// [tamttt] 20/10/2004 Created
/// </history>
/// -----------------------------------------------------------------------------
private void BindTree()
{
var ctlLists = new ListController();
var colLists = ctlLists.GetListInfoCollection();
var indexLookup = new Hashtable();
DNNtree.TreeNodes.Clear();
foreach (ListInfo list in colLists)
{
var node = new TreeNode(list.DisplayName);
{
node.Key = list.Key;
node.ToolTip = list.EntryCount + " entries";
node.ImageIndex = (int) eImageType.Folder;
}
if (list.Level == 0)
{
DNNtree.TreeNodes.Add(node);
}
else
{
if (indexLookup[list.ParentList] != null)
{
var parentNode = (TreeNode) indexLookup[list.ParentList];
parentNode.TreeNodes.Add(node);
}
}
//Add index key here to find it later, should suggest with Joe to add it to DNNTree
if (indexLookup[list.Key] == null)
{
indexLookup.Add(list.Key, node);
}
}
}
示例5: BindTree
/// <summary>
/// Loads top level entry list into DNNTree
/// </summary>
/// <history>
/// [tamttt] 20/10/2004 Created
/// </history>
private void BindTree()
{
ListController ctlLists = new ListController();
ListInfoCollection colLists = ctlLists.GetListInfoCollection();
Hashtable indexLookup = new Hashtable();
DNNtree.TreeNodes.Clear();
foreach (ListInfo Lists in colLists)
{
TreeNode node = new TreeNode(Lists.DisplayName);
node.Key = Lists.Key;
node.ToolTip = Lists.EntryCount + " entries";
node.ImageIndex = (int)eImageType.Folder;
//.Target = Lists.DefinitionID.ToString & ":" & Lists.EnableSortOrder.ToString ' borrow this property to store this value
if (Lists.Level == 0)
{
DNNtree.TreeNodes.Add(node);
}
else
{
if (indexLookup[Lists.ParentList] != null)
{
TreeNode parentNode = (TreeNode)(indexLookup[Lists.ParentList]);
parentNode.TreeNodes.Add(node);
}
}
// Add index key here to find it later, should suggest with Joe to add it to DNNTree
if (indexLookup[Lists.Key] == null)
{
indexLookup.Add(Lists.Key, node);
}
}
}
示例6: cmdAddList_Click
/// <summary>
/// Handles Add New List command
/// </summary>
/// <remarks>
/// Using "CommandName" property of cmdSaveEntry to determine this is a new list
/// </remarks>
/// <history>
/// [tamttt] 20/10/2004 Created
/// </history>
protected void cmdAddList_Click( object sender, EventArgs e )
{
EnableView(false);
EnableEdit(true);
this.txtParentKey.Text = "";
this.txtEntryName.Text = "";
this.txtEntryValue.Text = "";
this.txtEntryText.Text = "";
this.txtEntryName.ReadOnly = false;
this.cmdSaveEntry.CommandName = "SaveList";
ListController ctlLists = new ListController();
ddlSelectList.DataSource = ctlLists.GetListInfoCollection();
ddlSelectList.DataTextField = "DisplayName";
ddlSelectList.DataValueField = "Key";
ddlSelectList.DataBind();
ddlSelectList.Items.Insert(0, new ListItem(Localization.GetString("None_Specified"), ""));
// Reset dropdownlist
ddlSelectParent.ClearSelection();
ddlSelectParent.Enabled = false;
}