public override void FillChildren(ContainerNode parentCont, ComplexValue list) { var dTable = list.list; foreach (ContainerMap item in dTable) { var cont = new ContainerNode(item); parentCont.AddChild(cont); } }
public override void FillChildren(ContainerNode in_parentCont, ComplexValue list) { DataTable dTable = list.dtable; for (int i = 0; i < dTable.Rows.Count; i++) { var ct_id = dTable.Rows[i].Field <long>("ct_id"); var parent_id = dTable.Rows[i].Field <long>("parent_id"); var name = dTable.Rows[i].Field <string>("name"); var created_at = dTable.Rows[i].Field <DateTime?>("created_at"); var cMap = new ContainerMap(name, ct_id, null, parent_id, 0, -1, -1, -1, created_at); var cont = new ContainerNode(cMap); ContainerNode parentCont = in_parentCont; if (in_parentCont == null) { parentCont = GetContainerByID(parent_id); } parentCont.AddChild(cont); } }