Exemple #1
0
        public void BindTree()
        {
            BaseHandler bh   = new BaseHandler();
            var         tree = bh.GetCoursePluggsAsTree(CourseId, Language);

            if (tree.Count() == 0)
            {
                if (Page.Request.QueryString["edit"] == "add")
                {
                    btnAddAfter.Visible  = false;
                    btnAddBefore.Visible = false;
                    btnAddChild.Visible  = false;
                    btnAdd.Visible       = true;
                }
                else
                {
                    lblNoCP.Visible         = true;
                    btnRemovePluggs.Enabled = false;
                    btnReorder.Enabled      = false;
                }
            }
            //JavaScriptSerializer TheSerializer = new JavaScriptSerializer();
            //hdnTreeData.Value = TheSerializer.Serialize(tree);
            hdnTreeData.Value = Newtonsoft.Json.JsonConvert.SerializeObject(tree);
        }