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(); }
public DataTable BindICD10Table(DataTable dt) { 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; } DataTable theDTICD10 = new DataTable(); theDTICD10.Columns.Add("BlockId", typeof(int)); theDTICD10.Columns.Add("SubBlockId", typeof(int)); theDTICD10.Columns.Add("CodeId", typeof(int)); theDTICD10.Columns.Add("ICD10Name", typeof(string)); theDTICD10.Columns.Add("Deleteflag", typeof(int)); theDTICD10.Columns.Add("ChapterId", typeof(int)); foreach (DataRow r in dt.Rows) { foreach (DataRow theDR1 in theDSTV.Tables[0].Rows) { foreach (DataRow theDR2 in theDSTV.Tables[1].Rows) { if (Convert.ToInt32(theDR1["ChapterId"]) == Convert.ToInt32(r["ChapterId"])) { theDTICD10.Rows.Add(Convert.ToInt32(theDR2["BlockId"].ToString()), 0, 0, theDR2["BlockName"].ToString().Replace("'", "''"), 0); theDTICD10.AcceptChanges(); } } } } return(theDTICD10); }