コード例 #1
0
        public void UnmapViewComponents(View view)
        {
            View readView = ViewDao.FindById(view.Id);

            // Remove all maps for the ViewNodes connected to the View
            IList <ViewNode> viewNodeList = ViewNodeDao.FindAllByViewId(readView.Id);

            foreach (ViewNode viewNode in viewNodeList)
            {
                // Delete the ViewMap
                if (viewNode.ViewMap != null)
                {
                    PropertyMapDao.Delete(viewNode.ViewMap);
                }

                // Remove ViewMap from the ViewNode
                viewNode.ViewMap = null;

                // Save ViewNode
                ViewNodeDao.SaveOrUpdate(viewNode);
            }

            // Remove the connections from ViewComponents to MappedProperty
            WalkViewComponentsAndUnmap(readView.VisualTree);
        }
コード例 #2
0
 public IList <ViewNode> GetViewNodesByViewId(Guid viewId)
 {
     return(ViewNodeDao.FindAllByViewId(viewId));
 }