Esempio n. 1
0
        public void Init()
        {
            allObjects.Clear();
            objects.Clear();

            allObjects.AddRange(StudyUnit.RelatedMetaData(bookRelationType));

            Filter("");
            SearchText = "";

            SelectedObject = Find(objects, metaDataId);
            metaDataId     = null;
        }
Esempio n. 2
0
        private BookRelationVM CreateRelation(BookRelation relationModel)
        {
            ObservableCollection <ITitleProvider> objects = StudyUnit.RelatedMetaData(relationModel.BookRelationType);
            string         typeName     = BookRelationItem.GetLabel(relationModel.BookRelationType);
            ITitleProvider obj          = SelectMetaDataWindowVM.Find(objects, relationModel.MetadataId);
            string         metaDataName = null;

            if (obj != null)
            {
                metaDataName = obj.Title;
            }
            BookRelationVM relation = new BookRelationVM(relationModel)
            {
                Parent       = this,
                TypeName     = typeName,
                MetaDataName = metaDataName
            };

            return(relation);
        }