Teach Yourself e.net - Syspro
Teach Yourself e.net - Syspro
Teach Yourself e.net - Syspro
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
10<br />
Sample Applications<br />
Objectives - This chapter presents code samples that demonstrate the use of e.<strong>net</strong><br />
solutions to create an application using ASP.NET. We have presented these code sections<br />
to help you integrate what you have learned and incorporate it into one programming<br />
environment.<br />
One of the difficulties facing us when trying to learn a new system or programming<br />
language is being able to comprehend the big picture of what can be done with the limited<br />
knowledge that we have of the system or language while we are learning it. As you have<br />
read through this book you have learned the basics of the e.<strong>net</strong> solutions system and how<br />
to begin programming with it in VBScript, and ASP.NET C# and VB. In this section we<br />
take you one step further by providing some simple applications of the knowledge that you<br />
have gained.<br />
10.1. Simple ASP.NET logon<br />
The first step of any application is to provide a way to logon to the SYSRPO application<br />
server. The following ASP.NET script does this with four user entry text boxes and a<br />
submit button.<br />
Example 10.1. Code Sample for logon.aspx in VB.NET<br />
<br />
<br />
Sub btnlogon_Click(sender As Object, e As EventArgs)<br />
Dim Util As New Encore.Utilities()<br />
Dim uid As String<br />
uid = Util.logon(tbUser.Text, tbUserPass.Text, tbComp.Text, \<br />
tbCompPass.Text, Encore.Language.ENGLISH, 0, 0, "")<br />
lblUid.Text = uid<br />
Util.Logoff(uid)<br />
End Sub<br />
<br />
<br />