Пример #1
0
        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;
            }
        }
Пример #2
0
 private void OnUserAdded(object sender, ModelAddedEventArgs<User_AccessRule> e)
 {
     var userAccessRuleVm = new UserAccessRuleVM(e.NewModel, Access, RelationDirection.Reverse);
     SelectedItems.AddNewItem(userAccessRuleVm);
     SelectedItems.CommitNew();
 }