private bool CheckSubSourceFieldName(TreeNodeCollection Aim, string value) { bool result = false; foreach (TreeNode node in Aim) { if (node.Nodes != null) { result = CheckSubSourceFieldName(node.Nodes, value); if (result == false) { return(result); } } SourceField sf = node.Tag as SourceField; if (sf != null && sf.ID != this.ID && sf.GetType() == typeof(SourceFieldDataTable)) { if (sf.Name == value) { result = false; return(result); } } } result = true; return(result); }