public bool AddNode(string nodeId, string nodeTypeId, string name, string description = null, string parentNodeId = null) { ITenant tenant = HttpContext.Current.GetCurrentTenant(); if (tenant == null) { return(false); } Node node = new Node() { NodeID = Guid.NewGuid(), AdditionalID = nodeId, Name = name, Description = description, CreationDate = DateTime.Now }; if (!string.IsNullOrEmpty(parentNodeId)) { node.ParentNodeID = CNController.get_node_id(tenant.Id, parentNodeId, nodeTypeId); } return(CNController.add_node(tenant.Id, node, nodeTypeId)); }
private void _rss_to_nodes(object obj) { List <Modules.CoreNetwork.Node> nodes = (List <Modules.CoreNetwork.Node>)obj; foreach (Modules.CoreNetwork.Node nd in nodes) { CNController.add_node(paramsContainer.Tenant.Id, nd); } }