20.01.2015 Views

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

All the functions presented here from the Setup class allow the user to submit the<br />

additional XML Parameters to the business object should they need to. These functions<br />

still follow the simple structure of the earlier ones, taking in the UserID, business object,<br />

XmlIn and XmlParameter strings and submitting them to the SYSPRO application server<br />

through e.<strong>net</strong> solutions.<br />

The next portion of sample programming presents the more sample functions from the<br />

Query class. We have already seen a function for Query.Query, now lets examine Fetch,<br />

Browse, NextKey and PreviousKey. These functions do not require the business object<br />

name to be supplied as the business object is predetermined for Fetch, Browse, NextKey<br />

and PrevKey.<br />

Example 10.20. Query.Fetch Method in ASP.NET VB codebehind<br />

'********************************************************<br />

'-- <strong>Syspro</strong>Fetch does the actual call to the specified<br />

' Fetch Query.<br />

'********************************************************<br />

'Parameters:<br />

'[Uid:- GUID returned by Logon<br />

'XmlIn:- The input xml to be used in fetch<br />

'********************************************************<br />

'Returns:- The XML returned by the business object.<br />

'********************************************************<br />

Function <strong>Syspro</strong>Fetch(ByVal Uid As String, ByVal XmlIn \<br />

As String) As String<br />

Dim xmlOut As String<br />

Dim EncoreFetch As New Encore.Query()<br />

xmlOut = EncoreFetch.Fetch(Uid, XmlIn)<br />

EncoreFetch = Nothing<br />

Return xmlOut<br />

End Function<br />

10–32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!