private string GetNewPath(NodeVM nodeVM) { if (nodeVM.Node.Level_id == 1) { return(string.Format("{0}", nodeVM.Node.Name)); } else { return(string.Format("{1}\\{0}", nodeVM.Node.Name, GetNewPath(nodeVM.Parent))); } }
public string GetParentValues(NodeVM parent) { string query = string.Format("{0}={1},", parent.Node.Level_id, parent.Node.Name); if (parent.Node.Level_id == 1) { return(query); } else { return(query + GetParentValues(parent.Parent)); } }