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

namespace FMSWeb
{
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using VBNET=Microsoft.VisualBasic;
using gmRTL.Core;

public partial class _FindProduct : System.Web.UI.Page
{
   public FMSWeb._t_head _t_head1 = null;
   public FMSWeb._t_begin_cart _t_begin_cart1 = null;
   public FMSWeb._t_end _t_end1 = null;
   public FMSWeb._t_begin _t_begin1 = null;

   protected void Page_Load(object sender, EventArgs e)
   {
      _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);
   }
   private FMSStore_Bus.Product prod = new FMSStore_Bus.Product();
   public string m_desc = "";
   public void EmitProducts()
   {
      gmRTL.DataLib.SqlClient.Recordset rs = null;
      rs = prod.FindByDescription(m_desc);
      if (rs.EOF)
      {
         HttpContext.Current.Response.Write("		No products were found containing '" + m_desc + "'<br>" + "\n");
         HttpContext.Current.Response.Write("		<a href='javascript:history.back()'>Try again</a>" + "\n");
      }
      else
      {
         HttpContext.Current.Response.Write("		<thead>" + "\n");
         HttpContext.Current.Response.Write("			<tr><th>Price<th>Description" + "\n");
         HttpContext.Current.Response.Write("		<tbody>" + "\n");
         while (!(rs.EOF))
         {
            HttpContext.Current.Response.Write("			<tr>" + "\n");
            HttpContext.Current.Response.Write("				<td>" + gmRTL.Core.FormatHelper.FormatCurrency(rs.Fields["Price"].Value,-1,gmRTL.Core.Enums.TriState.UseDefault,gmRTL.Core.Enums.TriState.UseDefault,gmRTL.Core.Enums.TriState.UseDefault));
            HttpContext.Current.Response.Write("				<td><a title='View this item'" + "\n");
            HttpContext.Current.Response.Write(" href='" + "ViewProduct.aspx?SKU=" + rs.Fields["SKU"].Value + "'>" + HttpContext.Current.Server.HtmlEncode(rs.Fields["Description"].Value.ToStr()));
            HttpContext.Current.Response.Write("			</tr>" + "\n");
            rs.MoveNext();
         }
      }
   }
}
}
