protected void Page_Load(object sender, EventArgs e) { if (SubjectId == 0) ltSubject.Text = Localization.GetString("NoSubject", LocalResourceFile); else { BaseHandler bh = new BaseHandler(); var SubList = bh.GetSubjectsAsFlatList(CultureCode); ltSubject.Text = bh.GetSubjectString(CultureCode, SubjectId); } if (Case == EControlCase.ViewAllowEdit) { phEdit.Visible = true; hlEdit.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL(TabId, "", "edit=" + ControlOrder, AttachQS); } if (Case == EControlCase.Edit) { btnSave.Visible = true; btnCancel.Visible = true; phSelect.Visible = true; ltTheTree.Visible = true; ltTheTree.Text = "<div class=\"tree\"><div id=\"tree2\"></div></div><br />"; BaseHandler bh = new BaseHandler(); var tree = bh.GetSubjectsAsTree(CultureCode); JavaScriptSerializer TheSerializer = new JavaScriptSerializer(); hdnTreeData.Value = TheSerializer.Serialize(tree); } }
public string getSubjectByID(int subjectId) { if (subjectId == 0 || subjectId == -1) return "No subject"; BaseHandler bh = new BaseHandler(); return bh.GetSubjectString("en-US", subjectId); }