public TreeNode GenerateSelectAssignedWebTreeNodeByApplication(SystemApplication app, string rootImageUrl, string groupImageUrl, string itemImageUrl)
        {
            SuperWebTreeNode baseTreeNode = new SuperWebTreeNode(SYSTEMMENU_MIN_DEPTH, SYSTEMMENU_MAX_DEPTH, 0);
            baseTreeNode.ShowCheckBox = false;
            baseTreeNode.SelectAction = TreeNodeSelectAction.None;
            baseTreeNode.Text = app.SystemApplicationName;
            baseTreeNode.Value = "0";
            baseTreeNode.ImageUrl = rootImageUrl;


            List<SystemMenu> listmenu =
            this.SelfDao.GetMenuByApplication(app);

            foreach (SystemMenu groupMenu in listmenu)
            {
                if (groupMenu.MenuIsEnable && groupMenu.MenuIsCategory)
                {
                    SuperWebTreeNode groupTreeNode = new SuperWebTreeNode(SYSTEMMENU_MIN_DEPTH, SYSTEMMENU_MAX_DEPTH, 0);
                    groupTreeNode.Checked = false;
                    groupTreeNode.SelectAction = TreeNodeSelectAction.None;
                    groupTreeNode.Text = groupMenu.MenuName;
                    groupTreeNode.ImageUrl = groupImageUrl;
                    groupTreeNode.Value = groupMenu.MenuID.ToString();
                    baseTreeNode.ChildNodes.Add(groupTreeNode);
                    foreach (SystemMenu itemMenu in listmenu)
                    {
                        if (itemMenu.MenuIsEnable && !itemMenu.MenuIsCategory && itemMenu.ParentMenuID == groupMenu)
                        {
                            SuperWebTreeNode itemTreeNode = new SuperWebTreeNode(SYSTEMMENU_MIN_DEPTH, SYSTEMMENU_MAX_DEPTH, 0);
                            itemTreeNode.Checked = false;
                            itemTreeNode.SelectAction = TreeNodeSelectAction.None;
                            itemTreeNode.Text = itemMenu.MenuName;
                            itemTreeNode.ImageUrl = itemImageUrl;
                            itemTreeNode.Value = itemMenu.MenuID.ToString();
                            groupTreeNode.ChildNodes.Add(itemTreeNode);
                        }
                    }
                }
            }

            return baseTreeNode;
        }
        private void GenerateSubManageWebTreeNodeByParentDepartment(string itemImageUrl, SystemDepartment upDepartment, TreeNode upTreeNode)
        {

            SuperWebTreeNode groupTreeNode = new SuperWebTreeNode(SYSTEMDEPARTMENT_MIN_DEPTH, SYSTEMDEPARTMENT_MAX_DEPTH, 0);
            groupTreeNode.Checked = false;
            groupTreeNode.SelectAction = TreeNodeSelectAction.Select;
            groupTreeNode.Text = upDepartment.DepartmentNameCn;
            groupTreeNode.ImageUrl = itemImageUrl;
            groupTreeNode.Value = upDepartment.DepartmentID.ToString();
            upTreeNode.ChildNodes.Add(groupTreeNode);

            List<SystemDepartment> topLevelSystemDepartment =
this.SelfDao.GetSubDepartmentByParentDepartment(upDepartment);

            foreach (SystemDepartment department in topLevelSystemDepartment)
            {
                GenerateSubManageWebTreeNodeByParentDepartment(itemImageUrl, department, groupTreeNode);
            }

        }
        public TreeNode GenerateManageWebTreeNodeByParentDepartment(string rootImageUrl, string itemImageUrl, int rootDepartmentID)
        {
            SuperWebTreeNode baseTreeNode = new SuperWebTreeNode(SYSTEMDEPARTMENT_MIN_DEPTH, SYSTEMDEPARTMENT_MAX_DEPTH, 0);
            baseTreeNode.Checked = false;
            baseTreeNode.SelectAction = TreeNodeSelectAction.Select;
            baseTreeNode.Text = "²¿ÃŹÜÀí";
            baseTreeNode.Value = "0";
            baseTreeNode.ImageUrl = rootImageUrl;

            SystemDepartment rootDepartment = null;

            if (rootDepartmentID > 0)
                rootDepartment = this.SelfDao.Load(rootDepartmentID);

            List<SystemDepartment> topLevelSystemDepartment =
                this.SelfDao.GetSubDepartmentByParentDepartment(rootDepartment);

            foreach (SystemDepartment topDepartment in topLevelSystemDepartment)
            {
                GenerateSubManageWebTreeNodeByParentDepartment(itemImageUrl, topDepartment, baseTreeNode);
            }

            return baseTreeNode;
        }