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.

Sample Applications<br />

directory (usually c:\I<strong>net</strong>pub\wwwroot\ or<br />

c:\I<strong>net</strong>pub\wwwroot\<strong>Syspro</strong>web if you are using the SYSPRO web-based<br />

applications). Load the .aspx file in your web browser (usually<br />

http://localhost/Logon.aspx) and use your SYSPRO user details to logon and display your<br />

UserID. Then click on the "Trial" button.<br />

10.3. Using the Data in XmlOut<br />

There are different ways of utilizing the data returned in the XmlOut string. In this section<br />

we will show a few of them, ranging from the simple use of asp:Labels to the use of XSL<br />

to format and present the data.<br />

10.3.1. Simple Xml Data Usage<br />

ASP.NET contains the functionality that allows us to assign specific XML nodes to string<br />

variables using LoadXML(). The following example pulls the company name, email, and<br />

address from the XmlOut and assigns the data values to asp:Labels.<br />

Example 10.3. ASP.NET code for ARSQRY.aspx<br />

<br />

<br />

<br />

<br />

<br />

Dim uid As String<br />

Dim Xmlout As String<br />

Dim Util As New Encore.Utilities()<br />

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

Sub btnLogon_Click(sender As Object, e As EventArgs)<br />

uid = Util.logon(tbUser.Text, tbUserPass.Text, tbComp. \<br />

Text, tbCompPass.Text, Encore.Language.ENGLISH, \<br />

0, 0, "")<br />

lblUid.Text = uid<br />

End Sub<br />

Sub btnTrial_Click(sender As Object, e As EventArgs)<br />

'Define the XmlIn to send to ARSQIP<br />

Dim Xmlin As New StringBuilder()<br />

With Xmlin<br />

.Append("")<br />

.Append("")<br />

.Append("")<br />

10–7

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

Saved successfully!

Ooh no, something went wrong!