public DataRow[] LoadNodes(string[] nodes) { StringBuilder inQueryBuilder = new StringBuilder(); for (int i = 0; i < nodes.Length; i++) { inQueryBuilder.Append("'" + nodes [i] + "'" + (i < nodes.Length - 1 ? "," : "")); } return(NodesTable.Select(string.Format("Id IN ({0})", inQueryBuilder.ToString()))); }
/// <summary> /// Finds the nodes by matching the begin of the label.. /// </summary> /// <param name="label">The label or a part of it</param> public DataRow[] FindNodesByLabel(string label) { return(NodesTable.Select(string.Format("Label LIKE '{0}%'", label))); }
public DataRow GetNodeById(string id) { return(NodesTable.Select(string.Format("Id = '{0}'", id)).FirstOrDefault()); }
public DataRow GetNodeByLabel(string label) { return(NodesTable.Select(string.Format("Label = '{0}'", label)).FirstOrDefault()); }