示例#1
0
        private void BindTrainPostTree()
        {
            PostBLL      PostBLL = new PostBLL();
            IList <Post> posts   = PostBLL.GetPosts();

            Pub.BuildComponentArtTreeView(tvTrainPost, (IList)posts, "PostId",
                                          "ParentId", "PostName", "PostName", "PostId", null, null, null);
        }
示例#2
0
        private void BindPostTree()
        {
            PostBLL PostBLL = new PostBLL();
            IList <RailExam.Model.Post> posts = PostBLL.GetPosts();

            Pub.BuildComponentArtTreeView(tvPost, (IList)posts, "PostId", "ParentId", "PostName",
                                          "PostName", "PostId", null, null, null);
        }
示例#3
0
        private void BindtvPost()
        {
            PostBLL PostBLL = new PostBLL();
            IList <RailExam.Model.Post> posts = PostBLL.GetPosts(0, 0, 0, "", 0, "", "", 0, 0, "", String.Empty, 0, 200, "PostLevel, OrderIndex ASC");

            Pub.BuildComponentArtTreeView(tvPost, (IList)posts, "PostId", "ParentId", "PostName",
                                          "PostName", "PostId", null, null, null);
        }
示例#4
0
        private void BindTrainTypeTree()
        {
            TrainTypeBLL objTrainType = new TrainTypeBLL();

            IList <TrainType> train = objTrainType.GetTrainTypes();

            Pub.BuildComponentArtTreeView(tvTrainType, (IList)train, "TrainTypeID", "ParentID", "TypeName", "TypeName", "TrainTypeID", null, null, null);
        }
示例#5
0
        private void BindOrgTree()
        {
            OrganizationBLL organizationBLL = new OrganizationBLL();

            if (PrjPub.CurrentLoginUser.SuitRange == 1)
            {
                IList <RailExam.Model.Organization> organizationList = organizationBLL.GetOrganizations();

                Pub.BuildComponentArtTreeView(tvOrg, (IList)organizationList, "OrganizationId",
                                              "ParentId", "ShortName", "FullName", "OrganizationId", null, null, null);
            }
            else
            {
                int stationID = organizationBLL.GetStationOrgID(Convert.ToInt32(SessionSet.OrganizationID));
                IList <RailExam.Model.Organization> organizationList =
                    organizationBLL.GetOrganizations(stationID);

                if (organizationList.Count > 0)
                {
                    TreeViewNode tvn = null;

                    foreach (RailExam.Model.Organization organization in organizationList)
                    {
                        tvn         = new TreeViewNode();
                        tvn.ID      = organization.OrganizationId.ToString();
                        tvn.Value   = organization.IdPath.ToString();
                        tvn.Text    = organization.ShortName;
                        tvn.ToolTip = organization.FullName;

                        if (organization.ParentId == 1)
                        {
                            tvOrg.Nodes.Add(tvn);
                        }
                        else
                        {
                            try
                            {
                                tvOrg.FindNodeById(organization.ParentId.ToString()).Nodes.Add(tvn);
                            }
                            catch
                            {
                                tvOrg.Nodes.Clear();
                                SessionSet.PageMessage = "数据错误!";
                                return;
                            }
                        }
                    }
                }

                tvOrg.DataBind();
            }

            if (tvOrg.Nodes.Count > 0)
            {
                tvOrg.SelectedNode      = tvOrg.Nodes[0];
                tvOrg.Nodes[0].Expanded = true;
            }
        }
        private void BindKnowledgeTree()
        {
            KnowledgeBLL knowledgeBLL = new KnowledgeBLL();

            IList <RailExam.Model.Knowledge> knowledgeList = knowledgeBLL.GetKnowledges();

            Pub.BuildComponentArtTreeView(tvKnowledge, (IList)knowledgeList, "KnowledgeId",
                                          "ParentId", "KnowledgeName", "KnowledgeName", "IdPath", null, null, null);
        }
示例#7
0
        private void BindTree()
        {
            CoursewareTypeBLL coursewareTypeBLL = new CoursewareTypeBLL();

            IList <RailExam.Model.CoursewareType> coursewareTypeList = coursewareTypeBLL.GetCoursewareTypes(0, 0, "", 0, 0, "", "", "", 0, 4000, "LevelNum, OrderIndex ASC");

            Pub.BuildComponentArtTreeView(tvCoursewareType, (IList)coursewareTypeList,
                                          "CoursewareTypeId", "ParentId", "CoursewareTypeName", "CoursewareTypeName", "CoursewareTypeId", null, null, null);
        }
示例#8
0
        private void BindTrainTypeTree()
        {
            TrainTypeBLL trainTypeBLL = new TrainTypeBLL();

            IList <TrainType> trainTypes = trainTypeBLL.GetTrainTypes();

            Pub.BuildComponentArtTreeView(tvTrainType, (IList)trainTypes, "TrainTypeID", "ParentID", "TypeName", "TypeName",
                                          "IDPath", null, null, null);
        }
示例#9
0
        private void BindTrainTypeTree()
        {
            TrainTypeBLL objTrainType = new TrainTypeBLL();

            IList <TrainType> train = objTrainType.GetTrainTypes();

            Pub.BuildComponentArtTreeView(TreeView2, (IList)train, "TrainTypeID", "ParentID", "TypeName", "TypeName", "IDPath", null, null, null);
            //TreeView2.ExpandAll();
        }
示例#10
0
        private void BindAssistBookCategoryTree()
        {
            AssistBookCategoryBLL knowledgeBLL = new AssistBookCategoryBLL();

            IList <RailExam.Model.AssistBookCategory> knowledgeList = knowledgeBLL.GetAssistBookCategorys();

            Pub.BuildComponentArtTreeView(tvAssist, (IList)knowledgeList, "AssistBookCategoryId",
                                          "ParentId", "AssistBookCategoryName", "AssistBookCategoryName", "IdPath", null, null, null);
        }
示例#11
0
        private void BindCourseware()
        {
            CoursewareTypeBLL coursewareTypeBLL = new CoursewareTypeBLL();

            IList <CoursewareType> coursewareTypeList = coursewareTypeBLL.GetCoursewareTypes(0, 0, "", 0, 0, "", "", "", 0, 4000, "LevelNum, CoursewareTypeId ASC");

            Pub.BuildComponentArtTreeView(tvCourseware, (IList)coursewareTypeList,
                                          "CoursewareTypeId", "ParentId", "CoursewareTypeName", "CoursewareTypeName", "IdPath", null, null, null);
        }
        private void BindExamCategoryTree()
        {
            ExamCategoryBLL examCategoryBLL = new ExamCategoryBLL();

            IList <RailExam.Model.ExamCategory> examCategoryList = examCategoryBLL.GetExamCategories();

            Pub.BuildComponentArtTreeView(tvExamCategory, (IList)examCategoryList, "ExamCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "IdPath", null, null, null);
        }
示例#13
0
        private void BindTree()
        {
            CoursewareTypeBLL coursewareTypeBLL = new CoursewareTypeBLL();

            IList <CoursewareType> coursewareTypeList = coursewareTypeBLL.GetCoursewareTypes();

            Pub.BuildComponentArtTreeView(tvCourseware, (IList)coursewareTypeList, "CoursewareTypeId", "ParentId", "CoursewareTypeName", "CoursewareTypeName", "IdPath", null, null, null);

            //tvCourseware.ExpandAll();
        }
示例#14
0
        private void BindPostTree()
        {
            PostBLL postBLL = new PostBLL();
            IList <RailExam.Model.Post> postList = postBLL.GetPosts();

            Pub.BuildComponentArtTreeView(tvView, (IList)postList, "PostId",
                                          "ParentId", "PostName", "PostName", "IdPath", null, null, null);

            //tvView.ExpandAll();
        }
        private void BindOrgTree()
        {
            OrganizationBLL organizationBLL = new OrganizationBLL();
            IList <RailExam.Model.Organization> organizationList = organizationBLL.GetOrganizations(0, 0, "", 0, 0,
                                                                                                    "", "", "", "", "", "",
                                                                                                    "", "", "", "", 0, 100,
                                                                                                    "LevelNum,OrderIndex ASC");

            Pub.BuildComponentArtTreeView(tvOrg, (IList)organizationList, "OrganizationId",
                                          "ParentId", "ShortName", "FullName", "OrganizationId", null, null, null);
        }
示例#16
0
        private void BindAssistBookCategoryTree()
        {
            AssistBookCategoryBLL assistBookCategoryBLL = new AssistBookCategoryBLL();

            IList <RailExam.Model.AssistBookCategory> assistBookCategoryList = assistBookCategoryBLL.GetAssistBookCategorys();

            Pub.BuildComponentArtTreeView(tvAssistBookCategory, (IList)assistBookCategoryList, "AssistBookCategoryId",
                                          "ParentId", "AssistBookCategoryName", "AssistBookCategoryName", "AssistBookCategoryId", null, null, null);

            //tvAssistBookCategory.ExpandAll();
        }
示例#17
0
        private void BindItemCategoryTree()
        {
            ItemCategoryBLL itemCategoryBLL = new ItemCategoryBLL();
            IList <RailExam.Model.ItemCategory> itemCategorys = itemCategoryBLL.GetItemCategories(0, 0, string.Empty,
                                                                                                  0, 0, string.Empty, 0, string.Empty, 0,
                                                                                                  100, "LevelNum, OrderIndex");

            Pub.BuildComponentArtTreeView(tvItemCategory, (IList)itemCategorys, "ItemCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "ItemCategoryId", null, null, null);
            //tvItemCategory.ExpandAll();
        }
示例#18
0
        private void BindTrainTypeTree()
        {
            TrainTypeBLL trainTypeBLL = new TrainTypeBLL();

            IList <TrainType> trainTypeList = trainTypeBLL.GetTrainTypeInfo(0, 0, 0, "", 0, "", "", false, false, "", 0, 4000, "LevelNum, OrderIndex ASC");

            Pub.BuildComponentArtTreeView(tvTrainType, (IList)trainTypeList,
                                          "TrainTypeID", "ParentID", "TypeName", "TypeName", "IDPath", null, null, null);

            //tvTrainType.ExpandAll();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PostBLL postBLL = new PostBLL();
                IList <RailExam.Model.Post> postList = postBLL.GetPostsByWhereClause("id_path ||'/' not like '/1548/%' and post_level<3 ");

                Pub.BuildComponentArtTreeView(tvPost, (IList)postList, "PostId",
                                              "ParentId", "PostName", "PostName", "PostId", null, null, null);
            }
        }
示例#20
0
        private void BindRegulationCategoryTree()
        {
            RegulationCategoryBLL regulationCategoryBll = new RegulationCategoryBLL();

            IList <RegulationCategory> regulationCategoryList = regulationCategoryBll.GetRegulationCategories(
                0, 0, "", 0, 0, "", "", "", 0, 200, "RegulationCategoryID ASC");

            Pub.BuildComponentArtTreeView(tvRegulationCategory, (IList)regulationCategoryList, "RegulationCategoryID",
                                          "ParentID", "CategoryName", "CategoryName", "RegulationCategoryID", null, null, null);

            //tvRegulationCategory.ExpandAll();
        }
示例#21
0
        private void BindOtherKnowledgeTree()
        {
            OtherKnowledgeBLL otherKnowledgeBLL = new OtherKnowledgeBLL();

            IList <RailExam.Model.OtherKnowledge> otherKnowledgeList = otherKnowledgeBLL.GetOtherKnowledge(0, 0, "", 0, 0,
                                                                                                           "", "", "", 0, 4000, "LevelNum,OtherKnowledgeID ASC");

            Pub.BuildComponentArtTreeView(tvOtherKnowledge, (IList)otherKnowledgeList, "OtherKnowledgeID",
                                          "ParentID", "OtherKnowledgeName", "OtherKnowledgeName", "OtherKnowledgeID", null, null, null);

            //tvOtherKnowledge.ExpandAll();
        }
示例#22
0
        private void BindPaperCategoryTree()
        {
            PaperCategoryBLL paperCategoryBLL = new PaperCategoryBLL();

            //IList<RailExam.Model.PaperCategory> paperCategoryList = PaperCategoryBLL.GetPaperCategories();
            IList <RailExam.Model.PaperCategory> paperCategoryList = paperCategoryBLL.GetPaperCategories();

            Pub.BuildComponentArtTreeView(tvPaperCategory, (IList)paperCategoryList, "PaperCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "IdPath", null, null, null);

            //tvPaperCategory.ExpandAll();
        }
示例#23
0
        private void BindPostTree()
        {
            PostBLL PostBLL = new PostBLL();
            IList <RailExam.Model.Post> posts = PostBLL.GetPosts(0, 0, 0, "", 0, "", "", 0, 0, "", String.Empty, 0, 9000, "PostLevel, OrderIndex ASC");

            Pub.BuildComponentArtTreeView(tvPost, (IList)posts, "PostId", "ParentId", "PostName",
                                          "PostName", "IdPath", null, null, null);
            tvPost.SelectedNode = tvPost.Nodes[0];
            if (tvPost.Nodes.Count > 0)
            {
                tvPost.Nodes[0].Expanded = true;
            }
        }
示例#24
0
        private void BindChooseBookTree()
        {
            tvChooseBook.Nodes.Clear();

            TrainCourseBookBLL trainCourseBookBLL = new TrainCourseBookBLL();
            IList <RailExam.Model.TrainCourseBook> trainCourseBookList =
                trainCourseBookBLL.GetTrainCourseBookChapter(Convert.ToInt32(ViewState["CourseID"].ToString()), "order by a.Level_Num,a.order_index Asc,a.train_course_book_chapter_id");

            Pub.BuildComponentArtTreeView(tvChooseBook, (IList)trainCourseBookList, "TrainCourseBookChapterID", "ParentID", "ChapterName", "ChapterName", "TrainCourseBookChapterID", null, null, null);

            ShowCheckBox(tvChooseBook.Nodes);

            tvChooseBook.ExpandAll();
        }
示例#25
0
        private void BindExamCategoryTree()
        {
            ExamCategoryBLL examCategoryBLL = new ExamCategoryBLL();

            //IList<RailExam.Model.ExamCategory> examCategoryList = examCategoryBLL.GetExamCategories(
            //                                    0, 0, "", 0, 0, "", "", "", false, 0, 200, "ExamCategoryId ASC");

            IList <RailExam.Model.ExamCategory> examCategoryList = examCategoryBLL.GetExamCategories();

            Pub.BuildComponentArtTreeView(tvExamCategory, (IList)examCategoryList, "ExamCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "ExamCategoryId", null, null, null);

            //tvExamCategory.ExpandAll();
        }
示例#26
0
        private void BindPaperCategoryTree()
        {
            //string strCategoryID = Request.QueryString.Get("Op");

            PaperCategoryBLL paperCategoryBLL = new PaperCategoryBLL();

            //IList<RailExam.Model.PaperCategory> PaperCategoryList = PaperCategoryBLL.GetPaperCategories(int.Parse(strCategoryID));//选择考试试卷 PaperCategoryId=3
            IList <RailExam.Model.PaperCategory> paperCategoryList = paperCategoryBLL.GetPaperCategories();

            Pub.BuildComponentArtTreeView(tvPaperCategory, (IList)paperCategoryList, "PaperCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "IdPath", null, null, null);

            //tvPaperCategory.ExpandAll();
        }
        private void BindTree()
        {
            KnowledgeBLL knowledgeBLL = new KnowledgeBLL();

            IList <RailExam.Model.Knowledge> knowledgeList = new List <RailExam.Model.Knowledge>();

            if (!string.IsNullOrEmpty(Request.QueryString.Get("type")))
            {
                knowledgeList = knowledgeBLL.GetKnowledgesByWhereClause("id_path || '/' like '/790/%'", "LEVEL_NUM, ORDER_INDEX ASC");

                TreeViewNode tvn = null;

                foreach (RailExam.Model.Knowledge obj in knowledgeList)
                {
                    tvn         = new TreeViewNode();
                    tvn.ID      = obj.KnowledgeId.ToString();
                    tvn.Value   = obj.KnowledgeId.ToString();
                    tvn.Text    = obj.KnowledgeName;
                    tvn.ToolTip = obj.KnowledgeName;

                    if (obj.ParentId == 0)
                    {
                        tvKnowledge.Nodes.Add(tvn);
                    }
                    else
                    {
                        try
                        {
                            tvKnowledge.FindNodeById(obj.ParentId.ToString()).Nodes.Add(tvn);
                        }
                        catch
                        {
                            tvKnowledge.Nodes.Clear();
                            SessionSet.PageMessage = "数据错误!";
                            return;
                        }
                    }
                }
            }
            else
            {
                knowledgeList = knowledgeBLL.GetKnowledges();
                Pub.BuildComponentArtTreeView(tvKnowledge, (IList)knowledgeList, "KnowledgeId", "ParentId", "KnowledgeName", "KnowledgeName", "KnowledgeId", null, null, null);
            }
            //tvKnowledge.ExpandAll();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PostBLL PostBLL = new PostBLL();
                IList <RailExam.Model.Post> posts = PostBLL.GetPosts("POST_NEW");

                Pub.BuildComponentArtTreeView(tvPost, (IList)posts, "PostId", "ParentId", "PostName",
                                              "PostName", "PostId", null, null, null);

                OrganizationBLL organizationBLL = new OrganizationBLL();
                IList <RailExam.Model.Organization> organizationList =
                    organizationBLL.GetOrganizations("ORG_NEW");

                Pub.BuildComponentArtTreeView(tvOrganization, (IList)organizationList, "OrganizationId",
                                              "ParentId", "ShortName", "FullName", "OrganizationId", null, null, null);
                if (tvOrganization.Nodes.Count > 0)
                {
                    tvOrganization.Nodes[0].Expanded = true;
                }
            }
        }
示例#29
0
        private void BindItemCategoryTree()
        {
            OrganizationBLL organizationsBLL = new OrganizationBLL();

            int    railSystemID = 0;
            string strOwnIDs    = string.Empty;

            if (PrjPub.CurrentLoginUser != null || PrjPub.CurrentStudent != null)
            {
                railSystemID = PrjPub.GetRailSystemId();
                if (railSystemID != 0)
                {
                    IList <RailExam.Model.Organization> organizationList1 =
                        organizationsBLL.GetOrganizations(PrjPub.CurrentLoginUser.StationOrgID);
                    foreach (RailExam.Model.Organization organization in organizationList1)
                    {
                        strOwnIDs += strOwnIDs == string.Empty
                                         ? organization.OrganizationId.ToString()
                                         : "," + organization.OrganizationId;
                    }
                }
            }

            if (Request.QueryString.Get("Type") == "Station")
            {
                IList <RailExam.Model.Organization> organizations = organizationsBLL.GetOrganizationsByLevel(2);

                foreach (RailExam.Model.Organization organization in organizations)
                {
                    if (!organization.IsEffect)
                    {
                        continue;
                    }

                    if (organization.LevelNum == 1)
                    {
                        continue;
                    }

                    if ((organization.IdPath + "/").IndexOf("/1/") >= 0 && organization.LevelNum != 1 && railSystemID != 0 && railSystemID != organization.RailSystemID)
                    {
                        continue;
                    }

                    if (organization.LevelNum != 1 && strOwnIDs != string.Empty && (organization.IdPath + "/").IndexOf("/1/") < 0 && ("," + strOwnIDs + ",").IndexOf("," + organization.OrganizationId + ",") < 0)
                    {
                        continue;
                    }

                    TreeViewNode tvNode = new TreeViewNode();
                    tvNode.ID   = organization.OrganizationId.ToString();
                    tvNode.Text = organization.ShortName;
                    tvOrganization.Nodes.Add(tvNode);
                }
            }
            else if (Request.QueryString.Get("Type") == "Online")
            {
                IList <RailExam.Model.Organization> organizations = organizationsBLL.GetOrganizations();

                IList <RailExam.Model.Organization> organizationList = new List <Organization>();

                foreach (Organization organization in organizations)
                {
                    if (!organization.IsEffect)
                    {
                        continue;
                    }

                    organizationList.Add(organization);
                }

                Pub.BuildComponentArtTreeView(tvOrganization, (IList)organizationList, "OrganizationId",
                                              "ParentId", "ShortName", "FullName", "OrganizationId", null, null, null);
            }
            else
            {
                if (PrjPub.IsServerCenter && PrjPub.CurrentLoginUser.SuitRange == 1)
                {
                    IList <RailExam.Model.Organization> organizations = organizationsBLL.GetOrganizations();

                    foreach (RailExam.Model.Organization organization in organizations)
                    {
                        if (!organization.IsEffect)
                        {
                            continue;
                        }

                        if (organization.LevelNum != 1)
                        {
                            if ((organization.IdPath + "/").IndexOf("/1/") >= 0 && railSystemID != 0 && railSystemID != organization.RailSystemID)
                            {
                                continue;
                            }

                            if (strOwnIDs != string.Empty && (organization.IdPath + "/").IndexOf("/1/") < 0 && ("," + strOwnIDs + ",").IndexOf("," + organization.OrganizationId + ",") < 0)
                            {
                                continue;
                            }
                        }

                        TreeViewNode tvn = new TreeViewNode();
                        tvn.ID      = organization.OrganizationId.ToString();
                        tvn.Value   = organization.OrganizationId.ToString();
                        tvn.Text    = organization.ShortName;
                        tvn.ToolTip = organization.FullName;

                        if (organization.ParentId == 0)
                        {
                            tvn.Expanded = true;
                            tvOrganization.Nodes.Add(tvn);
                            continue;
                        }

                        try
                        {
                            tvOrganization.FindNodeById(organization.ParentId.ToString()).Nodes.Add(tvn);
                        }
                        catch
                        {
                            tvOrganization.Nodes.Clear();
                            SessionSet.PageMessage = "数据错误!";
                            return;
                        }
                    }
                }
                else
                {
                    string strOrgID;
                    if (PrjPub.IsServerCenter)
                    {
                        if (!string.IsNullOrEmpty(Request.QueryString.Get("OrgID")))
                        {
                            strOrgID = Request.QueryString.Get("OrgID");
                        }
                        else
                        {
                            strOrgID = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                        }
                    }
                    else
                    {
                        strOrgID = ConfigurationManager.AppSettings["StationID"].ToString();
                    }
                    int stationID = organizationsBLL.GetStationOrgID(Convert.ToInt32(strOrgID));
                    IList <RailExam.Model.Organization> organizationList =
                        organizationsBLL.GetOrganizations(stationID);

                    if (organizationList.Count > 0)
                    {
                        TreeViewNode tvn = null;

                        foreach (RailExam.Model.Organization organization in organizationList)
                        {
                            if (!organization.IsEffect)
                            {
                                continue;
                            }

                            tvn         = new TreeViewNode();
                            tvn.ID      = organization.OrganizationId.ToString();
                            tvn.Value   = organization.IdPath.ToString();
                            tvn.Text    = organization.ShortName;
                            tvn.ToolTip = organization.FullName;

                            if (organization.ParentId == 1)
                            {
                                tvOrganization.Nodes.Add(tvn);
                            }
                            else
                            {
                                try
                                {
                                    tvOrganization.FindNodeById(organization.ParentId.ToString()).Nodes.Add(tvn);
                                }
                                catch
                                {
                                    tvOrganization.Nodes.Clear();
                                    SessionSet.PageMessage = "数据错误!";
                                    return;
                                }
                            }
                        }
                    }

                    tvOrganization.DataBind();
                }

                if (tvOrganization.Nodes.Count > 0)
                {
                    tvOrganization.Nodes[0].Expanded = true;
                }
            }

            if (tvOrganization.Nodes.Count > 0)
            {
                tvOrganization.Nodes[0].Expanded = true;
            }
        }