// -----------------------------------------------------------------------------------------------
 //  Return FundPayload as an XML String
 // -----------------------------------------------------------------------------------------------
 public static string SerialiseFundPayload(ServiceReferenceSFL.FundPayload searchFundPayload)
 {
     try
     {
         MemoryStream  XmlStream  = new MemoryStream();
         StreamReader  XmlReader  = new StreamReader(XmlStream);
         XmlSerializer Serializer = new XmlSerializer(typeof(ServiceReferenceSFL.FundPayload));
         Serializer.Serialize(XmlStream, searchFundPayload);
         XmlStream.Seek(0, System.IO.SeekOrigin.Begin);
         return(XmlReader.ReadToEnd());
     }
     catch
     {
         throw;
     }
 }
Пример #2
0
 // -----------------------------------------------------------------------------------------------
 //  Search using the web service proxies. See Web References for the project
 // -----------------------------------------------------------------------------------------------
 private void UseStronglyTypedSearch()
 {
     ServiceReferenceSFL.FundPayload SearchFundPayload = null;
     try
     {
         if (this.radioButtonAbn.Checked)
         {
             //SearchFundPayload response will contain a Superannuation Fund when searching By ABN
             SearchFundPayload            = ProxyXmlSearch.AbnSearch(TrimString(this.textBoxCriteria.Text), TrimString(this.textBoxGuid.Text));
             this.richTextBoxResults.Text = ResultsInterpreter.SerialiseFundPayload(SearchFundPayload);
         }
     }
     catch
     {
         throw;
     }
 }