예제 #1
0
        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));
        }
예제 #2
0
        public virtual void RequestCdoDefinitionFieldByName(string typeName, string fieldName)
        {
            ICsiXmlElement sourceElement = base.ClearXmlElementChildByName("__CDODefinition");

            CsiXmlHelper.FindCreateSetValue(sourceElement, "__CDOTypeName", typeName);
            new CsiXmlElement(this.GetOwnerDocument(), "__field", sourceElement).SetAttribute("__name", fieldName);
        }
예제 #3
0
 public CsiService(ICsiDocument doc, string serviceName, ICsiXmlElement parent)
     : base(doc, "__service", parent)
 {
     this.SetAttribute("__serviceType", serviceName);
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__txnGUID", CsiXmlHelper.GenerateGuid());
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__utcOffset", CsiXmlDataFormat.GetUTCOffset());
 }
예제 #4
0
        public ICsiRevisionedObject ChangeItemByIndex(int index)
        {
            ICsiRevisionedObject revisionedObject = (ICsiRevisionedObject) new CsiRevisionedObject(this.GetOwnerDocument(), "__listItem", (ICsiXmlElement)this);

            revisionedObject.SetAttribute("__listItemAction", "change");
            CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)revisionedObject, "__index", XmlConvert.ToString(index));
            return(revisionedObject);
        }
        public ICsiSubentity ChangeItemByIndex(int index)
        {
            ICsiSubentity csiSubentity = (ICsiSubentity) new CsiSubentity(this.GetOwnerDocument(), "__listItem", (ICsiXmlElement)this);

            csiSubentity.SetAttribute("__listItemAction", "change");
            CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)csiSubentity, "__index", XmlConvert.ToString(index));
            return(csiSubentity);
        }
예제 #6
0
 public void SetRef(string name, string level)
 {
     CsiXmlHelper.FindCreateSetValue(this, "__name", name, true);
     if (!StringUtil.IsEmptyString(level))
     {
         CsiXmlHelper.FindCreateSetValue2(this, "__level", "__name", level, true);
     }
 }
        public ICsiNamedObject ChangeItemByIndex(int index)
        {
            ICsiNamedObject sourceElement = new CsiNamedObject(this.GetOwnerDocument(), "__listItem", this);

            sourceElement.SetAttribute("__listItemAction", "change");
            CsiXmlHelper.FindCreateSetValue(sourceElement, "__index", XmlConvert.ToString(index));
            return(sourceElement);
        }
 public void SetRef(string name, string revision, bool useRor)
 {
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__name", name, true);
     if (!useRor && revision != null)
     {
         CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__rev", revision, true);
     }
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__useROR", useRor ? "true" : "false");
 }
예제 #9
0
 public void SetContainerRef(string name, string level)
 {
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__name", name);
     if (level.Length <= 0)
     {
         return;
     }
     CsiXmlHelper.FindCreateSetValue2((ICsiXmlElement)this, "__level", "__name", level);
 }
예제 #10
0
 public void SetRevisionedObjectRef(string name, string rev, bool useROR)
 {
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__name", name);
     if (!useROR && rev != null)
     {
         CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__rev", rev);
     }
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__useROR", useROR ? "true" : "false");
 }
예제 #11
0
        public void RequestFieldDefinition()
        {
            CsiMetaData sourceElement = base.FindChildByName("__metadata") as CsiMetaData;

            if (sourceElement == null)
            {
                sourceElement = new CsiMetaData(this.GetOwnerDocument(), this);
            }
            CsiXmlHelper.FindCreateSetValue(sourceElement, "__fieldDef", null);
        }
예제 #12
0
        public ICsiDataField ChangeItemByIndex(int index, string val)
        {
            CsiDataField sourceElement = new CsiDataField(this.GetOwnerDocument(), "__listItem", this);

            sourceElement.SetAttribute("__listItemAction", "change");
            CsiXmlHelper.FindCreateSetValue(sourceElement, "__index", Convert.ToString(index));
            ICsiXmlElement element = CsiXmlHelper.FindCreateSetValue(sourceElement, "__value", val, true);

            return(new CsiDataField(this.GetOwnerDocument(), (element as CsiXmlElement).GetDomElement()));
        }
예제 #13
0
        public ICsiDataField ChangeItemByValue(string oldValue, string newValue)
        {
            CsiDataField sourceElement = new CsiDataField(this.GetOwnerDocument(), "__listItem", this);

            sourceElement.SetAttribute("__listItemAction", "change");
            CsiXmlHelper.FindCreateSetValue2(sourceElement, "__key", "__value", oldValue, true);
            ICsiXmlElement element = CsiXmlHelper.FindCreateSetValue(sourceElement, "__value", newValue, true);

            return(new CsiDataField(this.GetOwnerDocument(), (element as CsiXmlElement).GetDomElement()));
        }
예제 #14
0
        private void requestCDOSubTypes(string childTag, string nameOrId, bool recurse)
        {
            ICsiXmlElement parentElement = base.ClearXmlElementChildByName("__CDOSubType");

            if (recurse)
            {
                new CsiXmlElement(this.GetOwnerDocument(), "__recurse", parentElement);
            }
            if ((nameOrId != null) && (childTag != null))
            {
                CsiXmlHelper.FindCreateSetValue(parentElement, childTag, nameOrId);
            }
        }
예제 #15
0
 public virtual void SetUtcOffset(string offset)
 {
     try
     {
         bool flag = offset.StartsWith("-");
         if (offset.StartsWith("-") || offset.StartsWith("+"))
         {
             offset = offset.Remove(0, 1);
         }
         DateTime dateTime = DateTime.Parse(offset);
         if (dateTime.Hour > 12)
         {
             throw new FormatException();
         }
         string str = dateTime.ToString("HH:mm");
         CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__utcOffset", (flag ? "-" : "+") + str);
     }
     catch (Exception ex)
     {
         throw new CsiClientException(-2147467259L, ex, this.GetType().FullName + ".setUTCOffset()");
     }
 }
예제 #16
0
 public virtual void SetRef(string val)
 {
     CsiXmlHelper.FindCreateSetValue(this, "__name", val, true);
 }
예제 #17
0
 public virtual void RequestCdoDefinitionById(int id)
 {
     CsiXmlHelper.FindCreateSetValue(base.ClearXmlElementChildByName("__CDODefinition"), "__CDOTypeId", Convert.ToString(id));
 }
예제 #18
0
 public virtual void RequestCdoDefinitionByName(string typeName)
 {
     CsiXmlHelper.FindCreateSetValue(base.ClearXmlElementChildByName("__CDODefinition"), "__CDOTypeName", typeName);
 }
예제 #19
0
 public virtual void SetName(string name)
 {
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__name", name);
 }
예제 #20
0
 public virtual void SetNamedObjectRef(string val)
 {
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__name", val);
 }
예제 #21
0
 public virtual void SetObjectId(string val)
 {
     CsiXmlHelper.FindCreateSetValue((ICsiXmlElement)this, "__Id", val);
 }
예제 #22
0
 public virtual void RequestLabelById(int labelId)
 {
     CsiXmlHelper.FindCreateSetValue(base.ClearXmlElementChildByName("__label"), "__Id", Convert.ToString(labelId));
 }
예제 #23
0
 public virtual void RequestLabelByName(string name)
 {
     CsiXmlHelper.FindCreateSetValue(base.ClearXmlElementChildByName("__label"), "__name", name);
 }
예제 #24
0
 public void RequestUserDefinedFields()
 {
     CsiXmlHelper.FindCreateSetValue(this, "__userDefinedFields", null);
 }
예제 #25
0
 public void RequestDefaultValue()
 {
     CsiXmlHelper.FindCreateSetValue(this, "__defaultValue", null);
 }