コード例 #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 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 { }
        }
コード例 #3
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 { }
        }
    }
コード例 #4
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 { }
    }