//private void GetRootNodes(int vtId, int dId) private void GetRootNodes() { contentTV.Nodes.Clear(); PatientEducationDa da = new PatientEducationDa(); //DataTable dt = da.GetSectionsByVisitTypeAndDiseaseId(vtId, dId); DataTable dt = da.GetAllSections(); foreach (DataRow row in dt.Rows) { TreeNode node = new TreeNode(); string sectionName = row[PatientEdSection.SectionName].ToString(); node.Text = "<span onclick='return false;' style='cursor:default;'>" + sectionName + "</span>"; node.Value = row[PatientEdSection.SectionId].ToString(); node.ToolTip = sectionName; node.ImageToolTip = sectionName; node.Expanded = false; node.PopulateOnDemand = true; node.SelectAction = TreeNodeSelectAction.SelectExpand; node.ShowCheckBox = false; node.Expand(); contentTV.Nodes.Add(node); } }
private void GetRootNodes() { contentTV.Nodes.Clear(); PatientEducationDa da = new PatientEducationDa(); DataTable dt = da.GetAllSections(); //will eventually use GetAll() from BusinessObject foreach (DataRow row in dt.Rows) { TreeNode node = new TreeNode(); string sectionId = row[PatientEdSection.SectionId].ToString(); string sectionName = row[PatientEdSection.SectionName].ToString(); node.Value = sectionId; node.ToolTip = sectionName; node.ImageToolTip = sectionName; if (PageMode == PageModes.Single.ToString()) { node.Text = PatientEdUtil.GetFriendlyJavascriptTitle(sectionName, sectionId, sectionName, string.Empty, string.Empty, string.Empty, string.Empty, "Section"); } else { node.Text = "<span onclick='return false;' style='cursor:default;'>" + sectionName + "</span>"; } if (PageMode == PageModes.Single.ToString()) { if (!(topicBiz != null && topicBiz[PatientEdTopic.SectionId].ToString() == sectionId)) { if (sectionBiz != null && sectionBiz[PatientEdSection.SectionId].ToString() == sectionId) { SetContentDetailSrc("1", sectionId, sectionName); } } node.NavigateUrl = "ManageContentDetail.aspx?type=1&id=" + node.Value; } node.PopulateOnDemand = true; node.SelectAction = TreeNodeSelectAction.SelectExpand; node.ShowCheckBox = false; node.Expand(); if (!String.IsNullOrEmpty(PreloadedContentType)) { if (sectionBiz != null && topicBiz == null && subTopicBiz == null && sectionBiz[PatientEdSection.SectionId].ToString() == sectionId) { node.Selected = true; } } contentTV.Nodes.Add(node); } }