Esempio n. 1
0
        /// <summary>
        /// ���������Ļ���·��
        /// </summary>
        /// <param name="ou"></param>
        public void BuildOUOrganizationTreePath(BusinessObjects.AuthorizationDS.OrganizationUnitRow ou)
        {
            StringBuilder path = new StringBuilder();
            AuthorizationDS.OrganizationUnitRow parent = ou.OrganizationUnitRowParent;
            if (parent != null) {
                path.Append(parent.OrganizationTreePath);
                path.Append("P" + parent.OrganizationUnitId + "P ");
            }
            ou.OrganizationTreePath = path.ToString();
            this.OrganizationUnitTA.Update(ou);

            foreach (BusinessObjects.AuthorizationDS.PositionRow position in ou.GetPositionRows()) {
                BuildPositionOrganizationTreePath(position);
            }

            foreach (AuthorizationDS.OrganizationUnitRow childOU in ou.GetOrganizationUnitRows()) {
                BuildOUOrganizationTreePath(childOU);
            }
        }