20.01.2015 Views

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Here is a similar procedure using ASP.NET C#:<br />

Example 5.3. ASP.NET C# codebehind for Utilities.Logon<br />

string UserId;<br />

Encore.Utilities Obj = new Encore.Utilities();<br />

try {<br />

UserId=Obj.Logon("ADMIN", " ", "1", " ", 5, 0, 0, " ");<br />

}<br />

catch (Exception exc) {<br />

Response.Write(("Exception - message:" + exc.Message));<br />

return;<br />

}<br />

If you compare the VB and the C# code you will see that they are almost identical once<br />

you take into account syntax differences. This shows that the Classes and Methods of e.<strong>net</strong><br />

solutions are generic enough to be easily accessed by either language, and specific enough<br />

to perform the business functions necessary for an enterprise application.<br />

5.1.2. Utilities.Logoff<br />

Syntax:<br />

Utilities.Logoff(UserID)<br />

The Logoff method closes the e.<strong>net</strong> solutions session for a given UserID.<br />

Failure to use the Logoff method when exiting e.<strong>net</strong> solutions leaves the<br />

session associated with the UserID as active within the SYSPRO server.<br />

This may result in exceptions being returned as a result of concurrency issues<br />

related to licensing. To avoid this it is recommended that sessions are always<br />

gracefully terminated using the Logoff method (see Section 8.1.3,<br />

“Concurrency Issues” [8–5]).<br />

Business objects available to this method include:<br />

• COMLGN<br />

5–6

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

Saved successfully!

Ooh no, something went wrong!