//конструктор public StandartNode(TreeViewNodeType NodeType, object ChildsParam, Type ChildTypeParam, bool bDbSetType = false) { //информация по узлу TreeViewNodeInfo NI = TreeViewNodeInfos[NodeType]; Name = NI.nodeName; this.bDbSetType = bDbSetType; Childs = ChildsParam; ChildType = ChildTypeParam; this.NodeType = NodeType; }
//конструктор public TreeViewNode(string name, int nodeId, int id, DataProvider NodeProvider) { if (name != null) { this.name = name; } this.nodeId = nodeId; this.id = id; this.NodeProvider = NodeProvider; NodeType = NodeProvider.NodeType; NodeInfo = TreeViewNodeInfos[NodeType]; systemName = NodeInfo.systemNodeName; }
//получить данные для таблицы выбранного узла public TableData_Client GetAllTableData() { if (currNode == null) { return(null); } TreeViewNodeInfo CurrNodeInfo = currNode.NodeInfo; if (CurrNodeInfo.hasTableData == false) { return(null); } TableData_Server TDS = currNode.NodeProvider.GetTableData(db, selectedId); if (TDS == null) { return(null); } return(TDS.TransformToClient()); }