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.

Example 10.35. Price Query Code in ASP.NET C# codebehind<br />

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

//Price Query Subroutine<br />

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

public void btnPriceQuery_Click(object sender, EventArgs e)<br />

{<br />

pnlPriceQuery.Visible = true;<br />

StringBuilder xmlin = 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 />

string content = "text/html";<br />

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

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

ref content));<br />

Response.ContentType = content;<br />

}<br />

As you can see from the code sample, we have created four textbox data entry points and<br />

have built our XmlIn string using the input from those textboxes. We use the<br />

Response.Write command to display the data returned from the Build function<br />

described earlier.<br />

10–50

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

Saved successfully!

Ooh no, something went wrong!