예제 #1
0
        /// <summary>
        /// returns an XML Document with all key/value pairs for this request
        /// </summary>
        /// <param name="keyAttribute">the key attribute used for the hash key (name, sp_id, rei_id, etc)</param>
        /// <param name="includeOrder">true if the order fields should be included</param>
        /// <param name="includeBlankValues">true if blank values should be included</param>
        /// <returns>XmlDocument</returns>
        public XmlDocument GetTranslatedResponse(string keyAttribute, bool includeOrder, bool includeBlankValues)
        {
            Hashtable ht = this.GetTranslatedHashTable(keyAttribute, includeOrder, includeBlankValues);

            XmlDocument rXml = new XmlDocument();

            rXml.CreateXmlDeclaration("1.0", "utf-8", null);
            XmlElement rXmlRoot = rXml.CreateElement("response");

            rXml.AppendChild(rXmlRoot);

            ArrayList keys = new ArrayList(ht.Keys);

            keys.Sort();

            foreach (string key in keys)
            {
                if (!key.EndsWith("_validator"))
                {
                    rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, key.ToString(), ht[key].ToString()));
                }
            }

            return(rXml);
        }
예제 #2
0
        /// <summary>
        /// Returns the order as a response xml doc
        /// </summary>
        /// <param name="parent"></param>
        /// <returns></returns>
        public XmlDocument GetResponse()
        {
            XmlDocument rXml = new XmlDocument();

            rXml.CreateXmlDeclaration("1.0", "utf-8", null);
            XmlElement rXmlRoot = rXml.CreateElement("response");

            rXml.AppendChild(rXmlRoot);

            //rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "AccountInternalId", this.Account.InternalId));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "ClientName", this.ClientName));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "ClosingDate", this.ClosingDate.ToShortDateString()));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyUse", this.PropertyUse));
            //rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "Created", this.Created.ToShortDateString()));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "CustomerId", this.CustomerId));
            //rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "CustomerStatusCode", this.CustomerStatusCode));
            //rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "Id", this.Id.ToString()));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "InternalId", this.InternalId));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "InternalATSId", this.InternalATSId));
            //rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "InternalStatusCode", this.InternalStatusCode));
            //rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "Modified", this.Modified.ToShortDateString()));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PIN", this.Pin));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "AdditionalPins", this.AdditionalPins));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyAddress", this.PropertyAddress));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyAddress2", this.PropertyAddress2));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyCity", this.PropertyCity));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyCounty", this.PropertyCounty));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyState", this.PropertyState));
            rXmlRoot.AppendChild(XmlForm.GetXmlField(rXml, "PropertyZip", this.PropertyZip));

            return(rXml);
        }