Example #1
0
        public void CallXmlQuery(
            string xmlQueryText,
            QueryOptions options,
            RecordSet recordSet,
            ResultStatus resultStatus)
        {
            resultStatus.IsSuccess = true;
            this._inSiteXmlParser.ToXmlAsXmlQuery(xmlQueryText, options);
            this._serverConnection.InboundXML = this._inSiteXmlParser.GetXmlAsString();
            this._Log.WriteXml("XmlQuery", this._serverConnection.InboundXML, true, resultStatus);
            string str = this._serverConnection.Submit();

            this._Log.WriteXml("XmlQuery", str, false, resultStatus);
            this._inSiteXmlParser.ToObjectsAsQuery(str, recordSet, resultStatus);
        }
Example #2
0
 public ResultStatus ExecuteMultiple(
     UserProfile userProfile,
     QueryItem[] queries,
     out RecordSet[] recordSets)
 {
     recordSets = (RecordSet[])null;
     try
     {
         recordSets = new RecordSet[queries.Length];
         ResultStatus  resultStatus  = new ResultStatus();
         ServerManager serverManager = new ServerManager(this.GetType().Name, userProfile);
         serverManager.CallQueries(queries, recordSets, resultStatus);
         serverManager.Close();
         return(resultStatus);
     }
     catch (Exception ex)
     {
         return(this.OnThrowException(ex));
     }
 }
Example #3
0
 public ResultStatus ExecuteXMLQuery(
     UserProfile userProfile,
     string xmlQueryText,
     QueryOptions options,
     out RecordSet recordSet)
 {
     recordSet = new RecordSet();
     try
     {
         ResultStatus  resultStatus  = new ResultStatus();
         ServerManager serverManager = new ServerManager(this.GetType().Name, userProfile);
         serverManager.CallXmlQuery(xmlQueryText, options, recordSet, resultStatus);
         serverManager.Close();
         return(resultStatus);
     }
     catch (Exception ex)
     {
         return(this.OnThrowException(ex));
     }
 }
Example #4
0
 public ResultStatus Execute(
     UserProfile userProfile,
     string queryName,
     QueryParameters parameters,
     QueryOptions options,
     out RecordSet recordSet)
 {
     recordSet = new RecordSet();
     try
     {
         ResultStatus  resultStatus  = new ResultStatus();
         ServerManager serverManager = new ServerManager(this.GetType().Name, userProfile);
         serverManager.CallQuery(queryName, parameters, options, recordSet, resultStatus, false);
         serverManager.Close();
         return(resultStatus);
     }
     catch (Exception ex)
     {
         return(this.OnThrowException(ex));
     }
 }
Example #5
0
        public void CallQuery(
            string name,
            QueryParameters parameters,
            QueryOptions options,
            RecordSet recordSet,
            ResultStatus resultStatus,
            bool isAdHoc)
        {
            resultStatus.IsSuccess = true;
            if (!isAdHoc)
            {
                this._inSiteXmlParser.ToXmlAsQuery(name, parameters, options, true, true);
            }
            else
            {
                this._inSiteXmlParser.ToXmlAsQueryAdHoc(name, options);
            }
            this._serverConnection.InboundXML = this._inSiteXmlParser.GetXmlAsString();
            this._Log.WriteXml(isAdHoc ? "ExecuteAdHoc" : "Execute", this._serverConnection.InboundXML, true, resultStatus);
            string str = this._serverConnection.Submit();

            this._Log.WriteXml(isAdHoc ? "ExecuteAdHoc" : "Execute", str, false, resultStatus);
            this._inSiteXmlParser.ToObjectsAsQuery(str, recordSet, resultStatus);
        }