'' asp code Generated by Basic Processor
'' Original Page Name: C:\gmTestBed\FMStocks\src\FMSWeb\ASP\FindProduct.asp

Imports System.Web
NameSpace FMSWeb
Public Partial class _FindProduct : Inherits System.Web.UI.Page
   Public _t_head1 As FMSWeb._t_head
   Public _t_begin_cart1 As FMSWeb._t_begin_cart
   Public _t_end1 As FMSWeb._t_end
   Public _t_begin1 As FMSWeb._t_begin

   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      _t_head1 = New FMSWeb._t_head()
      _t_begin_cart1 = New FMSWeb._t_begin_cart()
      _t_end1 = New FMSWeb._t_end()
      _t_begin1 = New FMSWeb._t_begin()
      _t_begin_cart1.Include_Load(_t_head1, _t_begin1)
      _t_end1.Include_Load(_t_head1)
      _t_begin1.Include_Load(_t_head1)
   End Sub
   Dim prod As New FMSStore_Bus.Product
   Public m_desc As String = ""
   Public Sub EmitProducts()
      Dim rs As gmRTL.DataLib.SqlClient.Recordset = Nothing
      rs = prod.FindByDescription(m_desc)
      If (rs.EOF) Then
         HttpContext.Current.Response.Write("		No products were found containing '" & m_desc & "'<br>" & vbCrLf)
         HttpContext.Current.Response.Write("		<a href='javascript:history.back()'>Try again</a>" & vbCrLf)
      Else
         HttpContext.Current.Response.Write("		<thead>" & vbCrLf)
         HttpContext.Current.Response.Write("			<tr><th>Price<th>Description" & vbCrLf)
         HttpContext.Current.Response.Write("		<tbody>" & vbCrLf)
         Do Until rs.EOF
            HttpContext.Current.Response.Write("			<tr>" & vbCrLf)
            HttpContext.Current.Response.Write("				<td>" & Strings.FormatCurrency(rs.Fields("Price").Value,-1,TriState.UseDefault,TriState.UseDefault,TriState.UseDefault))
            HttpContext.Current.Response.Write("				<td><a title='View this item'" & vbCrLf)
            HttpContext.Current.Response.Write(" href='" & "ViewProduct.aspx?SKU=" & rs.Fields("SKU").Value & "'>" & HttpContext.Current.Server.HtmlEncode(Convert.ToString(rs.Fields("Description").Value)))
            HttpContext.Current.Response.Write("			</tr>" & vbCrLf)
            rs.MoveNext()
         Loop
      End If
   End Sub
End Class
End Namespace
