Exemplo n.º 1
0
 private void PopulateTreeNodes(List<CourseItem> LstCourseItem, TreeNodeCollection RootNodes)
 {
     foreach (CourseItem ObjCourseItem in LstCourseItem)
     {
         TreeNode NodeToAdd = new TreeNode();
         if (ObjCourseItem.ItemType.ToString() == ECourseItemType.Plugg.ToString())
         {
             BaseHandler plugghandler = new BaseHandler();
             PluggContainer p = new PluggContainer();
             p.ThePlugg = plugghandler.GetPlugg(ObjCourseItem.ItemId);
             string curlan = (Page as PageBase).PageCulture.Name;
             p.CultureCode = curlan;
             p.LoadTitle();
             NodeToAdd.Text = "<a  style='text-decoration: underline;cursor: pointer; ' href='/" + ObjCourseItem.ItemId + "' >" + p.TheTitle.Text + "</a>";
         }
         else
         {
             NodeToAdd.Text = Convert.ToString(ObjCourseItem.label);
         }
         NodeToAdd.SelectAction = TreeNodeSelectAction.None;
         RootNodes.Add(NodeToAdd);
         if (ObjCourseItem.children != null)
             PopulateTreeNodes((List<CourseItem>)ObjCourseItem.children, NodeToAdd.ChildNodes);
     }
 }
Exemplo n.º 2
0
        private PluggContainer GetPluggContainer(string curlan)
        {
            BaseHandler plugghandler = new BaseHandler();
            int pluggid = Convert.ToInt32(((DotNetNuke.Framework.CDefault)this.Page).Title);

            PluggContainer p = new PluggContainer();
            p.ThePlugg = plugghandler.GetPlugg(pluggid);
            p.CultureCode = curlan;
            p.LoadTitle();
            return p;
        }