예제 #1
0
    public void PopulateNode (TEntityAction action)
    {
      if (action.NotNull ()) {
        NodeModelCollection.Clear ();

        foreach (var node in action.CollectionAction.ExtensionNodeCollection) {
          if (Id.Equals (node.ParentId)) {
            NodeModelCollection.Add (node);
          }
        }
      }
    }
예제 #2
0
    public void RequestNode (TEntityAction action)
    {
      if (action.NotNull ()) {
        foreach (var node in action.CollectionAction.ExtensionNodeCollection) {
          NodeModelCollection.Add (node);

          if (action.CollectionAction.ModelCollection.ContainsKey (node.ChildId)) {
            var childNodeModel = action.CollectionAction.ModelCollection [node.ChildId]; // node model
            var childNodeComponentModel = Create (childNodeModel); // child node 

            var childNodeComponentModelItem = Create (childNodeComponentModel);
            childNodeComponentModelItem.Select (Server.Models.Infrastructure.TCategoryType.FromValue (node.ChildCategory));

            ChildCollection.Add (childNodeComponentModelItem);
          }
        }
      }
    }