Example #1
0
        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())));
        }
Example #2
0
 /// <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)));
 }
Example #3
0
 public DataRow GetNodeById(string id)
 {
     return(NodesTable.Select(string.Format("Id = '{0}'", id)).FirstOrDefault());
 }
Example #4
0
 public DataRow GetNodeByLabel(string label)
 {
     return(NodesTable.Select(string.Format("Label = '{0}'", label)).FirstOrDefault());
 }