public void LoadAggregations(Meridian _meridian) { if((parent_id > 0) && (_meridian.pagesStore.Exists(parent_id))) { this.sub_pages_pages = _meridian.pagesStore.Get(parent_id);; this.sub_pages_pages.AddSubPages(this); } }
public pages RemoveSubPages(pages _item, bool _complete = false) { sub_pages.Remove(_item); if(_complete) Meridian.Default.pagesStore.Delete(_item); return _item; }
public pages AddSubPages(pages _item, bool _insertToStore = false) { if(sub_pages.IndexOf(_item) != -1) return _item; sub_pages.Add(_item); _item.parent_id = id; if(_insertToStore && !Meridian.Default.pagesStore.Exists(_item.id)) { Meridian.Default.pagesStore.Insert(_item); _item.LoadAggregations(Meridian.Default); } return _item; }