Ejemplo n.º 1
0
 public virtual void SetObjectId(string id)
 {
     if (!(base.FindChildByName("__Id") is CsiDataField impl))
     {
         impl = new CsiDataField(this.GetOwnerDocument(), "__Id", this);
     }
     impl.SetValue(id);
 }
Ejemplo n.º 2
0
        public ICsiDataField AppendItem(string val)
        {
            ICsiDataField impl = new CsiDataField(this.GetOwnerDocument(), "__listItem", this);

            impl.SetAttribute("__listItemAction", "add");
            impl.SetValue(val);
            return(impl);
        }
Ejemplo n.º 3
0
        public ICsiDataField DeleteItemByValue(string val)
        {
            CsiDataField sourceElement = new CsiDataField(this.GetOwnerDocument(), "__listItem", this);

            sourceElement.SetAttribute("__listItemAction", "delete");
            ICsiXmlElement element = CsiXmlHelper.FindCreateSetValue2(sourceElement, "__key", "__value", val, true);

            return(new CsiDataField(this.GetOwnerDocument(), (element as CsiXmlElement).GetDomElement()));
        }
Ejemplo n.º 4
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()));
        }
Ejemplo n.º 5
0
        private void CreateConnect(string userName, string password, ICsiXmlElement parent)
        {
            ICsiDocument    document = parent.GetOwnerDocument();
            ICsiXmlElement  element  = new CsiXmlElement(document, "__connect", parent);
            ICsiNamedObject obj2     = new CsiNamedObject(document, "user", element);

            obj2.SetRef(userName);
            ICsiDataField field = new CsiDataField(document, "password", element);

            field.SetEncryptedValue(password);
        }
Ejemplo n.º 6
0
        private void CreateConnectWithoutPassword(string userName, string sessionId, ICsiXmlElement parent)
        {
            ICsiDocument    document = parent.GetOwnerDocument();
            ICsiXmlElement  element  = new CsiXmlElement(document, "__useSession", parent);
            ICsiNamedObject obj2     = new CsiNamedObject(document, "user", element);

            obj2.SetRef(userName);
            ICsiDataField field = new CsiDataField(document, "sessionId", element);

            field.SetAttribute("__encrypted", "no");
            field.SetValue(sessionId);
        }
Ejemplo n.º 7
0
 public void SetUserQueryName(string queryName, long changeCount)
 {
     try
     {
         this.removeChildByName(this, "__queryName");
         ICsiXmlElement element = new CsiDataField(this.GetOwnerDocument(), "__queryName", this, queryName);
         element.SetAttribute("__type", "user");
         element.SetAttribute("__changeCount", Convert.ToString(changeCount));
     }
     catch (Exception)
     {
     }
 }
 public virtual void SetRequestRecordCount(bool val)
 {
     try
     {
         this.removeChildByName((ICsiXmlElement)this, "__requestRecordCount");
         if (!val)
         {
             return;
         }
         ICsiDataField csiDataFieldImpl = new CsiDataField(this.GetOwnerDocument(), "__requestRecordCount", (ICsiXmlElement)this, "true");
     }
     catch (Exception ex)
     {
     }
 }
 public virtual void SetStartRow(long val)
 {
     try
     {
         ICsiXmlElement childByName = this.FindChildByName("__startRow");
         if (null != childByName)
         {
             this.RemoveChild(childByName);
         }
         ICsiDataField csiDataFieldImpl = new CsiDataField(this.GetOwnerDocument(), "__startRow", (ICsiXmlElement)this, Convert.ToString(val));
     }
     catch (Exception ex)
     {
     }
 }
 public virtual void SetResultsetSize(long size)
 {
     try
     {
         ICsiXmlElement childByName = this.FindChildByName("__rowSetSize");
         if (null != childByName)
         {
             this.RemoveChild(childByName);
         }
         CsiDataField csiDataFieldImpl = new CsiDataField(this.GetOwnerDocument(), "__rowSetSize", (ICsiXmlElement)this, XmlConvert.ToString(size));
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 11
0
 public virtual void SetRequestRecordCount(bool val)
 {
     try
     {
         this.removeChildByName((ICsiXmlElement)this, "__requestRecordCount");
         if (!val)
         {
             return;
         }
         ICsiDataField csiDataFieldImpl = new CsiDataField(this.GetOwnerDocument(), "__requestRecordCount", (ICsiXmlElement)this, "true");
     }
     catch (Exception ex)
     {
         LogHelper.Error <CsiRequestSelectionValuesEx>(ex.Message);
     }
 }
Ejemplo n.º 12
0
 public virtual void SetStartRow(long val)
 {
     try
     {
         ICsiXmlElement childByName = this.FindChildByName("__startRow");
         if (null != childByName)
         {
             this.RemoveChild(childByName);
         }
         ICsiDataField csiDataFieldImpl = new CsiDataField(this.GetOwnerDocument(), "__startRow", (ICsiXmlElement)this, Convert.ToString(val));
     }
     catch (Exception ex)
     {
         LogHelper.Error <CsiRequestSelectionValuesEx>(ex.Message);
     }
 }
Ejemplo n.º 13
0
 public virtual void SetResultsetSize(long size)
 {
     try
     {
         ICsiXmlElement childByName = this.FindChildByName("__rowSetSize");
         if (null != childByName)
         {
             this.RemoveChild(childByName);
         }
         CsiDataField csiDataFieldImpl = new CsiDataField(this.GetOwnerDocument(), "__rowSetSize", (ICsiXmlElement)this, XmlConvert.ToString(size));
     }
     catch (Exception ex)
     {
         LogHelper.Error <CsiRequestSelectionValuesEx>(ex.Message);
     }
 }
Ejemplo n.º 14
0
        public virtual string GetObjectId()
        {
            CsiDataField impl = base.FindChildByName("__Id") as CsiDataField;

            return(impl?.GetValue());
        }