private void LoadTab(int _tabfw) { this.ddlTabFw.Items.Clear(); // hien thi các tab không phải admin trong portal này DotNetNuke.Entities.Tabs.TabController tc = new DotNetNuke.Entities.Tabs.TabController(); DotNetNuke.Entities.Tabs.TabCollection tabs = tc.GetTabsByPortal(PortalId); System.Collections.Generic.List <ListItem> list = new System.Collections.Generic.List <ListItem>(); //kiem? tra neu portal nay co nhieu hon 1 ngon ngu //thi chi chon danh sach cac tab thuoc ngon ngu dang chon //neu cos 1 ngon ngu thi tai ca //get current culturecode in combobox language foreach (var tab in tabs.Values) { if (!tab.TabPath.StartsWith("//Admin") && !tab.TabPath.StartsWith("//Host") && !tab.IsSecure && !tab.IsDeleted) { list.Add(new ListItem { Value = tab.TabID.ToString(), Text = tab.TabName, Selected = (tab.TabID == _tabfw) }); } } this.ddlTabFw.Items.AddRange(list.ToArray()); this.ddlTabFw.DataBind(); }
private void LoadTab(int _tabfw) { this.ddlTabFw.Items.Clear(); DotNetNuke.Entities.Tabs.TabController tc = new DotNetNuke.Entities.Tabs.TabController(); DotNetNuke.Entities.Tabs.TabCollection tabs = tc.GetTabsByPortal(PortalId); System.Collections.Generic.List <ListItem> list = new System.Collections.Generic.List <ListItem>(); foreach (var tab in tabs.Values) { if (!tab.TabPath.StartsWith("//Admin") && !tab.TabPath.StartsWith("//Host") && !tab.IsSecure && !tab.IsDeleted) { list.Add(new ListItem { Value = tab.TabID.ToString(), Text = tab.TabName, Selected = (tab.TabID == _tabfw) }); } } this.ddlTabFw.Items.AddRange(list.ToArray()); this.ddlTabFw.DataBind(); }