private void BindList() { try { ICustomList CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration"); DataSet theDSList = CustomManager.GetICDList(); foreach (DataRow theDR1 in theDSList.Tables[0].Rows) { ICDChapterCode = new TreeNode(); ICDChapterCode.Text = Convert.ToString(theDR1["ChapterName"]); ICDChapterCode.Value = Convert.ToString(theDR1["ChapterCode"]); //foreach (DataRow theDR2 in theDSList.Tables[1].Rows) //{ // if (Convert.ToInt32(theDR1["ChapterId"]) == Convert.ToInt32(theDR2["ChapterId"])) // { // ICDBlockCode = new TreeNode(); // ICDBlockCode.Text = theDR2["BlockCode"] + " " + theDR2["BlockName"]; // ICDBlockCode.Value = theDR2["BlockId"].ToString(); // ICDChapterCode.ChildNodes.Add(ICDBlockCode); // } //} TVICD10.Nodes.Add(ICDChapterCode); } TVICD10.ShowLines = true; TVICD10.NodeIndent = 5; TVICD10.CollapseAll(); } catch { } finally { } }
private void BindTreeViewOther() { IFieldDetail objFieldDetail = (IFieldDetail)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BFieldDetails,BusinessProcess.FormBuilder"); DataSet theDSTV = new DataSet(); if (GblIQCare.dsTreeView == null) { theDSTV = objFieldDetail.GetICDList(); GblIQCare.dsTreeView = theDSTV; } else { theDSTV = GblIQCare.dsTreeView; } foreach (DataRow theDR1 in theDSTV.Tables[0].Rows) { TVICD10.CheckBoxes = true; ICDChapterCode = new TreeNode(); ICDChapterCode.Text = Convert.ToString(theDR1["ChapterName"].ToString().Replace("<br/>", "")); ICDChapterCode.Tag = Convert.ToString(theDR1["ChapterCode"]); TVICD10.Nodes.Add(ICDChapterCode); } TVICD10.ShowLines = true; TVICD10.CollapseAll(); }
private void BindTreeView() { IFieldDetail objFieldDetail = (IFieldDetail)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BFieldDetails,BusinessProcess.FormBuilder"); DataSet theDSTV = new DataSet(); if (GblIQCare.dsTreeView == null) { theDSTV = objFieldDetail.GetICDList(); GblIQCare.dsTreeView = theDSTV; } else { theDSTV = GblIQCare.dsTreeView; } foreach (DataRow theDR1 in theDSTV.Tables[0].Rows) { ICDChapterCode = new TreeNode(); ICDChapterCode.Text = Convert.ToString(theDR1["ChapterName"].ToString().Replace("<br/>", "")); ICDChapterCode.Tag = Convert.ToString(theDR1["ChapterCode"]); foreach (DataRow theDR2 in theDSTV.Tables[1].Rows) { if (Convert.ToInt32(theDR1["ChapterId"]) == Convert.ToInt32(theDR2["ChapterId"])) { ICDBlockCode = new TreeNode(); ICDBlockCode.Text = theDR2["BlockCode"] + " " + theDR2["BlockName"].ToString().Replace("<br/>", ""); ICDBlockCode.Tag = theDR2["BlockId"].ToString(); ICDChapterCode.Nodes.Add(ICDBlockCode); foreach (DataRow theDR3 in theDSTV.Tables[2].Rows) { if (Convert.ToInt32(theDR2["BlockId"]) == Convert.ToInt32(theDR3["BlockId"])) { ICDSubBlockCode = new TreeNode(); ICDSubBlockCode.Text = theDR3["SubBlockCode"] + " " + theDR3["SubBlockName"].ToString().Replace("<br/>", ""); ICDSubBlockCode.Tag = theDR3["SubBlockId"].ToString(); ICDBlockCode.Nodes.Add(ICDSubBlockCode); foreach (DataRow theDR4 in theDSTV.Tables[3].Rows) { if (Convert.ToInt32(theDR3["SubBlockId"]) == Convert.ToInt32(theDR4["SubBlockId"])) { ICDCode = new TreeNode(); ICDCode.Text = theDR4["ICDCode"] + " " + theDR4["ICDCodeName"].ToString().Replace("<br/>", ""); ICDCode.Tag = theDR4["Id"].ToString(); ICDSubBlockCode.Nodes.Add(ICDCode); } } } } } } TVICD10.Nodes.Add(ICDChapterCode); } TVICD10.ShowLines = true; TVICD10.CollapseAll(); }