예제 #1
0
        private void SelectedBindBlock(int depth, int level)
        {
            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 (depth == Convert.ToInt32(theDR1["ChapterId"]))
                        {
                            if (Convert.ToInt32(theDR1["ChapterId"]) == Convert.ToInt32(theDR2["ChapterId"]) && level == 0)
                            {
                                ICDBlockCode       = new TreeNode();
                                ICDBlockCode.Text  = theDR2["BlockCode"] + " " + theDR2["BlockName"];
                                ICDBlockCode.Value = theDR2["BlockId"].ToString();
                                ICDChapterCode.ChildNodes.Add(ICDBlockCode);
                            }
                            ICDChapterCode.Expand();
                        }
                    }
                    TVICD10.Nodes.Add(ICDChapterCode);
                }
                TVICD10.ShowLines  = true;
                TVICD10.NodeIndent = 5;
                TVICD10.ExpandAll();
            }
            catch { }

            finally { }
        }
예제 #2
0
    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 { }
    }
예제 #3
0
        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();
        }
예제 #4
0
        private void FindNodeInHierarchy(TreeNodeCollection nodes, string strSearchValue)
        {
            //  Boolean m_bNodeFound = false;
            for (int iCount = 0; iCount < nodes.Count; iCount++)
            {
                if (nodes[iCount].Text.ToUpper().Contains(strSearchValue.ToUpper()))
                {
                    TVICD10.SelectedNode = nodes[iCount];
                    TVICD10.Select();
                    //m_bNodeFound = true;
                    return;
                }
                else
                {
                    // m_bNodeFound = false;
                }

                //nodes[iCount].Expand();
                ////Recursively search the text in the child nodes
                //FindNodeInHierarchy(nodes[iCount].Nodes, strSearchValue);
                //if (m_bNodeFound)
                //{
                //    return;
                //}
                ////collapses the nodes
                //nodes[iCount].Collapse();
                ////return;
            }
        }
예제 #5
0
        private void GetSelectedBindICDCodes(int SelectedValue, int Current_level, int BlockId, int ChapterId)
        {
            try
            {
                int         level_0       = 0;
                int         level_1       = 1;
                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"]) && ChapterId == Convert.ToInt32(theDR2["ChapterId"]) && level_0 == 0)
                        {
                            ICDBlockCode       = new TreeNode();
                            ICDBlockCode.Text  = theDR2["BlockCode"] + " " + theDR2["BlockName"];
                            ICDBlockCode.Value = theDR2["BlockId"].ToString();
                            foreach (DataRow theDR3 in theDSList.Tables[2].Rows)
                            {
                                if (Convert.ToInt32(ICDBlockCode.Value) == Convert.ToInt32(theDR3["BlockId"]) && BlockId == Convert.ToInt32(ICDBlockCode.Value) && level_1 == 1)
                                {
                                    ICDSubBlockCode       = new TreeNode();
                                    ICDSubBlockCode.Text  = theDR3["SubBlockCode"] + " " + theDR3["SubBlockName"];
                                    ICDSubBlockCode.Value = Convert.ToString(theDR3["SubBlockId"]);
                                    foreach (DataRow theDR4 in theDSList.Tables[3].Rows)
                                    {
                                        ICDCode10       = new TreeNode();
                                        ICDCode10.Text  = theDR4["ICDCode"] + " " + theDR4["ICDCodeName"];
                                        ICDCode10.Value = Convert.ToString(theDR4["ID"] + "-" + theDR4["ICDCode"] + " " + theDR4["ICDCodeName"]);
                                        //ICDCode10.Value = Convert.ToString(theDR4["ID"]);
                                        if (Convert.ToInt32(ICDSubBlockCode.Value) == Convert.ToInt32(theDR4["SubBlockId"]) && SelectedValue == Convert.ToInt32(theDR4["ID"]) && Current_level == 2)
                                        {
                                            ICDCode10.Selected = true;
                                            ICDSubBlockCode.ChildNodes.Add(ICDCode10);
                                        }
                                    }
                                    ICDBlockCode.ChildNodes.Add(ICDSubBlockCode);
                                }
                            }
                            ICDChapterCode.ChildNodes.Add(ICDBlockCode);
                        }
                    }
                    TVICD10.Nodes.Add(ICDChapterCode);
                }
                TVICD10.SelectedNodeStyle.Font.Underline = true;
                TVICD10.SelectedNodeStyle.ForeColor      = System.Drawing.Color.Red;
                TVICD10.ShowLines  = true;
                TVICD10.NodeIndent = 5;
                TVICD10.ExpandAll();
            }
            catch { }

            finally { }
        }
예제 #6
0
        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();
        }
예제 #7
0
        private void FindNodeInHierarchy(TreeNodeCollection nodes, string strSearchValue)
        {
            Boolean m_bNodeFound = false;

            for (int iCount = 0; iCount < nodes.Count; iCount++)
            {
                if (nodes[iCount].Text.ToUpper().Contains(strSearchValue.ToUpper()))
                {
                    TVICD10.SelectedNode = nodes[iCount];
                    TVICD10.Select();
                    m_bNodeFound = true;
                    return;
                }
                else
                {
                    m_bNodeFound = false;
                }
            }
        }
예제 #8
0
    private void SelectedBindBlock(int depth, int level)
    {
        if (blnfullsearch)
        {
            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 (depth == Convert.ToInt32(theDR1["ChapterId"]))
                        {
                            if (Convert.ToInt32(theDR1["ChapterId"]) == Convert.ToInt32(theDR2["ChapterId"]) && level == 0)
                            {
                                ICDBlockCode       = new TreeNode();
                                ICDBlockCode.Text  = theDR2["BlockCode"] + " " + theDR2["BlockName"];
                                ICDBlockCode.Value = theDR2["BlockId"] + "^" + theDR2["BlockCode"] + " " + theDR2["BlockName"];//theDR2["BlockId"].ToString();
                                ICDChapterCode.ChildNodes.Add(ICDBlockCode);
                            }
                            ICDChapterCode.Expand();
                        }
                    }
                    TVICD10.Nodes.Add(ICDChapterCode);
                }
                TVICD10.ShowLines  = true;
                TVICD10.NodeIndent = 5;
                //TVICD10.SelectedNodeStyle.Font.Underline = true;
                //TVICD10.SelectedNodeStyle.ForeColor = System.Drawing.Color.Red;
                TVICD10.ParentNodeStyle.BackColor   = System.Drawing.Color.Crimson;
                TVICD10.ParentNodeStyle.ForeColor   = System.Drawing.Color.Snow;
                TVICD10.ParentNodeStyle.BorderWidth = 1;
                TVICD10.ParentNodeStyle.BorderColor = System.Drawing.Color.HotPink;
                TVICD10.ParentNodeStyle.Font.Italic = true;
                TVICD10.ExpandAll();
            }
            catch { }

            finally { }
        }
        if (blnPartialsearch)
        {
            try
            {
                ICustomList CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration");
                DataSet     theDSList     = CustomManager.GetICDList();
                DataRow[]   ChapterRow    = theDSList.Tables[4].Select("FieldId=" + Request.QueryString["Param"].Substring(4).ToString() + "");
                foreach (DataRow theDR1 in ChapterRow)
                {
                    ICDChapterCode       = new TreeNode();
                    ICDChapterCode.Text  = Convert.ToString(theDR1["ChapterName"]);
                    ICDChapterCode.Value = Convert.ToString(theDR1["ChapterCode"]);
                    foreach (DataRow theDR2 in theDSList.Tables[1].Rows)
                    {
                        if (depth == Convert.ToInt32(theDR1["ChapterId"]))
                        {
                            if (Convert.ToInt32(theDR1["ChapterId"]) == Convert.ToInt32(theDR2["ChapterId"]) && level == 0)
                            {
                                ICDBlockCode       = new TreeNode();
                                ICDBlockCode.Text  = theDR2["BlockCode"] + " " + theDR2["BlockName"];
                                ICDBlockCode.Value = theDR2["BlockId"] + "^" + theDR2["BlockCode"] + " " + theDR2["BlockName"];//theDR2["BlockId"].ToString();
                                ICDChapterCode.ChildNodes.Add(ICDBlockCode);
                            }
                            ICDChapterCode.Expand();
                        }
                    }
                    TVICD10.Nodes.Add(ICDChapterCode);
                }
                TVICD10.ShowLines  = true;
                TVICD10.NodeIndent = 5;
                //TVICD10.SelectedNodeStyle.Font.Underline = true;
                //TVICD10.SelectedNodeStyle.ForeColor = System.Drawing.Color.Red;
                TVICD10.ParentNodeStyle.BackColor   = System.Drawing.Color.Crimson;
                TVICD10.ParentNodeStyle.ForeColor   = System.Drawing.Color.Snow;
                TVICD10.ParentNodeStyle.BorderWidth = 1;
                TVICD10.ParentNodeStyle.BorderColor = System.Drawing.Color.HotPink;
                TVICD10.ParentNodeStyle.Font.Italic = true;
                TVICD10.ExpandAll();
            }
            catch { }

            finally { }
        }
    }
예제 #9
0
    private void SelectedBindSubBlock(int SelectedValue, int Current_level, int ChapterId)
    {
        try
        {
            int         level_0       = 0;
            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"]) && ChapterId == Convert.ToInt32(theDR2["ChapterId"]) && level_0 == 0)
                    {
                        ICDBlockCode       = new TreeNode();
                        ICDBlockCode.Text  = theDR2["BlockCode"] + " " + theDR2["BlockName"];
                        ICDBlockCode.Value = theDR2["BlockId"].ToString();
                        foreach (DataRow theDR3 in theDSList.Tables[2].Rows)
                        {
                            if (Convert.ToInt32(ICDBlockCode.Value) == Convert.ToInt32(theDR3["BlockId"]) && SelectedValue == Convert.ToInt32(ICDBlockCode.Value) && Current_level == 1)
                            {
                                ICDSubBlockCode       = new TreeNode();
                                ICDSubBlockCode.Text  = theDR3["SubBlockCode"] + " " + theDR3["SubBlockName"];
                                ICDSubBlockCode.Value = Convert.ToString(theDR3["SubBlockId"]);
                                ICDBlockCode.ChildNodes.Add(ICDSubBlockCode);
                            }
                        }
                        ICDChapterCode.ChildNodes.Add(ICDBlockCode);
                        ICDChapterCode.Expand();
                    }
                }
                TVICD10.Nodes.Add(ICDChapterCode);
            }
            TVICD10.ShowLines  = true;
            TVICD10.NodeIndent = 5;
            TVICD10.ExpandAll();
        }
        catch { }

        finally { }

        //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();
        //                foreach (DataRow theDR3 in theDSList.Tables[2].Rows)
        //                {
        //                    if (Convert.ToInt32(ICDBlockCode.Value) == Convert.ToInt32(theDR3["BlockId"]) && depth == Convert.ToInt32(ICDBlockCode.Value) && level == 1)
        //                    {
        //                        ICDSubBlockCode = new TreeNode();
        //                        ICDSubBlockCode.Text = theDR3["SubBlockCode"] + " " + theDR3["SubBlockName"];
        //                        ICDSubBlockCode.Value = Convert.ToString(theDR3["SubBlockId"]);
        //                        ICDBlockCode.ChildNodes.Add(ICDSubBlockCode);
        //                     }
        //                }
        //                ICDChapterCode.ChildNodes.Add(ICDBlockCode);
        //                ICDChapterCode.Expand();
        //            }
        //        }
        //        TVICD10.Nodes.Add(ICDChapterCode);
        //    }
        //    TVICD10.ShowLines = true;
        //    TVICD10.NodeIndent = 5;
        //    TVICD10.ExpandAll();
        //}
        //catch { }

        //finally { }
    }