Exemple #1
0
        private bool InitState()
        {
            string ouID   = WebUtility.GetRequestQueryString("ou", string.Empty);
            bool   result = true;

            try
            {
                SCOrganization   parent         = DbUtil.GetEffectiveObject <SCOrganization>(ouID);
                SCRelationObject parentRelation = DbUtil.GetParentOURelation(parent.ID);

                this.ParentOrganization = parent.ToSimpleObject();
                this.StartFullPath      = parentRelation != null ? parentRelation.FullPath : string.Empty;
                this.hfOuParentId.Value = parent.ID == SCOrganization.RootOrganizationID ? string.Empty : parentRelation.ParentID;
            }
            catch (ObjectNotFoundException)
            {
                result = false;
            }

            return(result);
        }
        private bool InitState()
        {
            string ouID   = WebUtility.GetRequestQueryString("ou", string.Empty);
            bool   result = true;

            try
            {
                SchemaObjectBase parent = DbUtil.GetEffectiveObject(ouID, null);

                this.ParentOrganization = parent.ToSimpleObject();
                this.hfOuParentId.Value = parent.ID == SCOrganization.RootOrganizationID ? string.Empty : DbUtil.GetParentOURelation(parent.ID).ParentID;
            }
            catch (ObjectNotFoundException)
            {
                result = false;
            }

            return(result);
        }