public virtual void SetAlwaysReturnSelectionValues(bool val) { if (val == this.GetAlwaysReturnSelectionValues()) { return; } ICsiXmlElement childByName1 = this.GetRootElement().FindChildByName("__session"); if (childByName1 == null) { throw new CsiClientException(-1L, "会话不存在", this.GetType().FullName + ".setAlwaysReturnSelectionValues()"); } ICsiXmlElement childByName2 = childByName1.FindChildByName("__connect"); if (childByName2 == null) { throw new CsiClientException(-1L, "连接不存在", this.GetType().FullName + ".setAlwaysReturnSelectionValues()"); } ICsiXmlElement parentElement = childByName2.FindChildByName("__processingDefaults") ?? (ICsiXmlElement) new CsiXmlElement((ICsiDocument)this, "__processingDefaults", childByName2); ICsiXmlElement childByName3 = parentElement.FindChildByName("__alwaysGetSelectionValues"); if (childByName3 == null) { ICsiXmlElement csiXmlElement = (ICsiXmlElement) new CsiXmlElement((ICsiDocument)this, "__alwaysGetSelectionValues", parentElement); } else { parentElement.RemoveChild(childByName3); } }
protected virtual void removeChildByName(ICsiXmlElement element, string name) { if (StringUtil.IsEmptyString(name)) { element.RemoveAllChildren(); } else { ICsiXmlElement child = element.FindChildByName(name); if (child != null) { element.RemoveChild(child); } } }