Esempio n. 1
0
        public void m_mthGetNextLevelUserGorupAndApplUnit(TreeNode objTreeNode)
        {
            long lngRes = 0;

            objTreeNode.Nodes.Clear();
            TreeNode objChildTreeNode = null;
            clsDomainController_AppGroupManage objDomainControllerAppGroup = new clsDomainController_AppGroupManage();
            string strUserGroupID = ((clsApplUserGroup_VO)objTreeNode.Tag).strUserGroupID;

            //获取该节点下的用户自定义子组
            clsApplUserGroup_VO[] objApplUserGroupVO = null;
            lngRes = objDomainControllerAppGroup.m_lngGetSubGroupByUserGroupID(strUserGroupID, out objApplUserGroupVO);
            if (lngRes > 0 && objApplUserGroupVO != null)
            {
                if (objApplUserGroupVO.Length > 0)
                {
                    for (int i = 0; i < objApplUserGroupVO.Length; i++)
                    {
                        objChildTreeNode     = objTreeNode.Nodes.Add(objApplUserGroupVO[i].strUserGroupName);
                        objChildTreeNode.Tag = objApplUserGroupVO[i];
                        objChildTreeNode.Nodes.Add("");
                    }
                }
            }
            //获取该节点下的申请单元
            m_mthGetChildApplUnit(objTreeNode);
        }
Esempio n. 2
0
        public void m_mthInitialAppGroupList(TreeView p_trvGroup, char p_chrGroupFlag)
        {
            p_trvGroup.Nodes.Clear();
            long lngRes = 0;
            //查询所有的作为子组的用户自定义

            clsDomainController_AppGroupManage objDomainControllerAppGroup = new clsDomainController_AppGroupManage();

            clsApplUserGroup_VO[] objUserGroupVOList = null;
            TreeNode objTreeNode = null;

            lngRes = objDomainControllerAppGroup.m_lngGetMasterUserGroup(out objUserGroupVOList);
            if (lngRes > 0 && objUserGroupVOList != null)
            {
                if (objUserGroupVOList.Length > 0)
                {
                    for (int i = 0; i < objUserGroupVOList.Length; i++)
                    {
                        objTreeNode     = p_trvGroup.Nodes.Add(objUserGroupVOList[i].strUserGroupName);
                        objTreeNode.Tag = objUserGroupVOList[i];
                        TreeNode objChildNode = objTreeNode.Nodes.Add("");
                    }
                }
            }
        }
Esempio n. 3
0
        public void m_mthGetChildUserGroupAndApplUnit(TreeNode objTreeNode)
        {
            long     lngRes           = 0;
            TreeNode objChildTreeNode = null;
            clsDomainController_AppGroupManage objDomainControllerAppGroup = new clsDomainController_AppGroupManage();
            string strUserGroupID = ((clsApplUserGroup_VO)objTreeNode.Tag).strUserGroupID;

            clsApplUserGroup_VO[] objApplUserGroupVO = null;
            lngRes = objDomainControllerAppGroup.m_lngGetSubGroupByUserGroupID(strUserGroupID, out objApplUserGroupVO);
            if (lngRes > 0 && objApplUserGroupVO != null)
            {
                if (objApplUserGroupVO.Length > 0)
                {
                    //考虑到用户自定义组会有包含申请单元的情况
                    m_mthGetChildApplUnit(objTreeNode);
                    for (int i = 0; i < objApplUserGroupVO.Length; i++)
                    {
                        objChildTreeNode     = objTreeNode.Nodes.Add(objApplUserGroupVO[i].strUserGroupName);
                        objChildTreeNode.Tag = objApplUserGroupVO[i];

                        if (int.Parse(objApplUserGroupVO[i].strHasChildGroup) > 0)
                        {
                            //查找下一层的用户定义子组和申请单元
                            m_mthGetChildUserGroupAndApplUnit(objChildTreeNode);
                        }
                        else
                        {
                            m_mthGetChildApplUnit(objChildTreeNode);
                        }
                    }
                }
                else
                {
                    m_mthGetChildApplUnit(objTreeNode);
                }
            }
            else
            {
                m_mthGetChildApplUnit(objTreeNode);
            }
        }
Esempio n. 4
0
        private void m_mthGetChildApplUnit(TreeNode objTreeNode)
        {
            long     lngRes           = 0;
            TreeNode objChildTreeNode = null;
            clsDomainController_AppGroupManage objDomainControllerAppGroup = new clsDomainController_AppGroupManage();
            string strUserGroupID = ((clsApplUserGroup_VO)objTreeNode.Tag).strUserGroupID;

            clsApplUnit_VO[] objApplUnit = null;
            lngRes = objDomainControllerAppGroup.m_lngGetApplUnitByUserGroupID(strUserGroupID, out objApplUnit);
            if (lngRes > 0 && objApplUnit != null)
            {
                if (objApplUnit.Length > 0)
                {
                    for (int i = 0; i < objApplUnit.Length; i++)
                    {
                        objChildTreeNode     = objTreeNode.Nodes.Add(objApplUnit[i].strApplUnitName);
                        objChildTreeNode.Tag = objApplUnit[i];
                    }
                }
            }
        }