IModelNavigationItem GetNavigationItem(IModelNavigationItems navigationItems, string id, string objectKey) { IModelNavigationItem navigationItem; if (navigationItems[id] != null) { navigationItem = navigationItems[id]; } else { navigationItem = navigationItems.AddNode <IModelNavigationItem>(id); navigationItem.Caption = id; navigationItem.ObjectKey = objectKey; } return(navigationItem); }
IModelNavigationItem GetNavigationItem(IModelNavigationItems navigationItems, string id, string objectKey, int index) { IModelNavigationItem navigationItem; if (navigationItems[id] != null) { navigationItem = navigationItems[id]; } else { navigationItem = navigationItems.AddNode <IModelNavigationItem>(id); navigationItem.Caption = id; navigationItem.ObjectKey = objectKey; if (index > -1) { navigationItem.Index = index; } } return(navigationItem); }
private void AddNavItem(IModelNavigationItems node, string id) { var personItem = node.AddNode <IModelNavigationItem>(id); personItem.View = node.Application.Views[id]; }