private void OnAccessRuleChanged(object sender, ModelAddedEventArgs<User_AccessRule> e) { var userAccessRule = new UserAccessRuleVM(e.NewModel, Access, RelationDirection.Straight); var newNode = FindNode(RootNode, userAccessRule.AccessRuleId) as UserAccessNodeVM; if (newNode != null) newNode.UserAccess = userAccessRule.Type; if (CurrentNode == RootNode) { CurrentNode = newNode; } }
private void OnUserAdded(object sender, ModelAddedEventArgs<User_AccessRule> e) { var userAccessRuleVm = new UserAccessRuleVM(e.NewModel, Access, RelationDirection.Reverse); SelectedItems.AddNewItem(userAccessRuleVm); SelectedItems.CommitNew(); }