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.

Sample Applications<br />

10.5.2. Price Query Subroutine<br />

This section of sample code deals with creating a Price Query option. The ASP.NET .aspx<br />

form file containing the asp:Button to be clicked is presented after the subroutine<br />

(presented in VB and C#).<br />

Example 10.34. Price Query Code in ASP.NET VB codebehind<br />

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

'Price Query Subroutine<br />

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

Public Sub btnPriceQuery_Click(ByVal sender As Object, \<br />

ByVal e As EventArgs)<br />

pnlPriceQuery.Visible = True<br />

Dim xmlin As StringBuilder = New StringBuilder<br />

xmlin.Append("")<br />

xmlin.Append("")<br />

xmlin.Append("")<br />

xmlin.Append("" + txtstockcode.Text + \<br />

"")<br />

xmlin.Append("" + txtcustomer.Text + \<br />

"")<br />

xmlin.Append("" + txtquantity.Text + \<br />

"")<br />

xmlin.Append("" + selwarehouse.Text + \<br />

"")<br />

xmlin.Append("")<br />

Dim content As String = "text/html"<br />

Response.Write(Build(lblUid.Text, "SORRSL", \<br />

xmlin.ToString, "S", Server.MapPath("xsl/priceQuery.xsl") \<br />

, content))<br />

Response.ContentType = content<br />

End Sub<br />

10–49

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

Saved successfully!

Ooh no, something went wrong!