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 />

Example 10.11. Transaction.Build Method in ASP.NET C# codebehind<br />

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

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

// Build business object<br />

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

//Parameters:<br />

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

//BusObject:- business object used to do build<br />

//XmlIn:- The xml to be used in build<br />

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

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

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

string <strong>Syspro</strong>Build(string Uid, string BusObject, \<br />

string XmlIn) {<br />

string xmlOut;<br />

Encore.Transaction EncoreBuild = new \<br />

Encore.Transaction();<br />

xmlOut = EncoreBuild.Build(Uid, BusObject, XmlIn);<br />

EncoreBuild = null;<br />

return xmlOut;<br />

}<br />

You will have noticed by now that the functions are very similar to each other. Each<br />

requires the input of the UserID, the name of the business object, and the XML input that<br />

the business object needs in order to create the required output XML.<br />

Let's continue by looking at a function for Transaction.Post:<br />

10–23

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

Saved successfully!

Ooh no, something went wrong!