コード例 #1
0
        public bool ListCheck(RQItem itemToAdd)
        {
            bool retVal = MvcRQ.Helpers.AccessRightsResolver.HasViewAccess(itemToAdd.AccessRights);

            if (this.SortType == SortTypeEnum.ByShelf)
            {
                retVal = false;
            }

            return(retVal);
        }
コード例 #2
0
        public RQItem Add(RQItem newItem)
        {
            RQItem theItem = this.RQItems.Add(newItem);

            try
            {
                if (newItem.ClassificationFieldContent != "")
                {
                    theItem.SetSavedFieldValue("Classification", "$$EMPTY$$");
                }
                if (newItem.Abstract.Substring(newItem.Abstract.IndexOf("$$TOC$$=")) != "")
                {
                    theItem.SetSavedFieldValue("TOC", "$$TOC$$=$$EMPTY$$");
                }
            }
            catch { }
            return(theItem);
        }
コード例 #3
0
        public void Change(RQItem fromItem)
        {
            string fromTocStr = "";
            string toCStr     = "";

            if (fromItem.ClassificationFieldContent != this.ClassificationFieldContent)
            {
                this._savedFieldValues.Add("Classification", this.ClassificationFieldContent);
            }
            if ((fromTocStr = fromItem.GetToC()) != "")
            {
                // if fromItem has ToC
                if (((toCStr = this.GetToC()) != "") && (fromTocStr != toCStr))
                {
                    // store old Toc if different from new
                    this._savedFieldValues.Add("TOC", this.GetToC());
                }
                fromItem.Signature = DigitalObjectHelpers.UpdatePrimaryAccessLink(fromItem.ID, fromTocStr, fromItem.Signature);
            }
            this._resultItem.Change(fromItem._resultItem);
        }