public virtual void DeleteItemByIndex(int index) { ICsiXmlElement sourceElement = new CsiXmlElement(this.GetOwnerDocument(), "__listItem", this); sourceElement.SetAttribute("__listItemAction", "delete"); CsiXmlHelper.FindCreateSetValue(sourceElement, "__index", Convert.ToString(index)); }
public ICsiRequestField RequestListItemByIndex(int index, string fieldName, string cdoTypeName) { if (index < 0) { string src = base.GetType().FullName + ".requestListItemByIndex()"; throw new CsiClientException(0x2e001aL, src); } CsiXmlElement parent = null; IEnumerator enumerator = base.GetChildrenByName("__listItem").GetEnumerator(); while (enumerator.MoveNext()) { parent = enumerator.Current as CsiXmlElement; if (int.Parse(parent.GetAttribute("__index")) == index) { break; } parent = null; } if (parent == null) { parent = new CsiXmlElement(this.GetOwnerDocument(), "__listItem", this); parent.SetAttribute("__index", Convert.ToString(index)); } CsiXmlElement child = parent; if (!StringUtil.IsEmptyString(fieldName) && (fieldName != null)) { child = base.FindChildByName(fieldName) as CsiXmlElement; if (child != null) { base.RemoveChild(child); } child = new CsiRequestField(this.GetOwnerDocument(), fieldName, parent); parent.AppendChild(child); } return(child as ICsiRequestField); }
public virtual void RequestAllFieldsRecursive() { ICsiXmlElement element = new CsiXmlElement(this.GetOwnerDocument(), "__allFields", this); element.SetAttribute("__recursive", "true"); }