Example #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);
 }
Example #2
0
 ///<summary>
 /// Loads all the Pluggs in the CultureCode language from DB. You must set CourseId and CultureCode to get the Pluggs
 ///</summary>
 public void LoadPluggs()
 {
     BaseHandler bh = new BaseHandler();
     ThePluggs = bh.GetCoursePluggsAsTree(TheCourse.CourseId, CultureCode);
 }