// asp code Generated by Basic Processor
// Original Page Name: C:\gmTestBed\FMStocks\src\FMSWeb\ASP\ViewProduct.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 _ViewProduct : 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_sku = "";
   public void EmitProduct()
   {
      gmRTL.DataLib.SqlClient.Recordset rs = null;
      int sku = 0;
      rs = prod.GetBySKU(m_sku.ToInt());
      if (rs.EOF)
      {
         HttpContext.Current.Response.Write("		No products found with SKU '" + m_sku + "'" + "\n");
      }
      else
      {
         HttpContext.Current.Response.Write("		<table border='0'>" + "\n");
         HttpContext.Current.Response.Write("		<tr>" + "\n");
         HttpContext.Current.Response.Write("			<td><b>" + HttpContext.Current.Server.HtmlEncode(rs.Fields["Description"].Value.ToStr()) + "</b>" + "\n");
         HttpContext.Current.Response.Write("				" + gmRTL.Core.FormatHelper.FormatCurrency(rs.Fields["Price"].Value,-1,gmRTL.Core.Enums.TriState.UseDefault,gmRTL.Core.Enums.TriState.UseDefault,gmRTL.Core.Enums.TriState.UseDefault) + "" + "\n");
         sku = gmRTL.Core.ConversionHelper.DBNullToValue<int>(rs.Fields["SKU"].Value);
         rs = _t_begin_cart1.cart.GetByKey(_t_head1.g_AccountID.ToInt(),sku);
         if (rs.EOF)
         {
            HttpContext.Current.Response.Write("					<a title='Add this item to your cart'" + "\n");
            HttpContext.Current.Response.Write(" href='" + "cart.aspx?Add=" + sku + "'>Add to cart</a>" + "\n");
         }
         else
         {
            HttpContext.Current.Response.Write("					<tr><td>You have " + rs.Fields["Quantity"].Value + " of this item" + "\n");
            HttpContext.Current.Response.Write("					in your <a href='cart.aspx'>shopping cart</a>, <a title='Add this item to your cart'" + "\n");
            HttpContext.Current.Response.Write(" href='" + "cart.aspx?Add=" + sku + "'>Add to cart</a> anyway?" + "\n");
         }
         HttpContext.Current.Response.Write("		<tr>" + "\n");
         HttpContext.Current.Response.Write("			<td><br>Finding the next Microsoft has been the Holy Grail for many investors. However," + "\n");
         HttpContext.Current.Response.Write("				anyone who has dabbled in technology stocks can't help but be dismayed at their" + "\n");
         HttpContext.Current.Response.Write("				extreme volatility--it's not unusual for tech stocks to gain or lose 10 to 20" + "\n");
         HttpContext.Current.Response.Write("				percent in a single day. So how can you win in this market and find the next" + "\n");
         HttpContext.Current.Response.Write("				Cisco, Intel, or Oracle? The key to winning, says bestselling author Geoffrey" + "\n");
         HttpContext.Current.Response.Write("				Moore, is to play the 'gorilla game.'" + "\n");
         HttpContext.Current.Response.Write("				<p>Moore's previous two books, <i>Crossing the Chasm</i> and <i>Inside the" + "\n");
         HttpContext.Current.Response.Write("				Tornado</i>, are the bibles for many marketing professionals and product" + "\n");
         HttpContext.Current.Response.Write("				managers. In these books, Moore describes the life cycle common to the" + "\n");
         HttpContext.Current.Response.Write("				successful adoption of technology products and pinpoints moments in the cycle," + "\n");
         HttpContext.Current.Response.Write("				for example 'the chasm,' the 'bowling alley,' and the 'tornado,' where products" + "\n");
         HttpContext.Current.Response.Write("				can either flourish or fade away. In <i>The Gorilla Game</i>, Moore takes these" + "\n");
         HttpContext.Current.Response.Write("				concepts, with the help of coauthors Paul Johnson and Tom Kippola, applies them" + "\n");
         HttpContext.Current.Response.Write("				to finding gorilla stocks--stocks that dominate their market niche. The book" + "\n");
         HttpContext.Current.Response.Write("				looks at how the market values technology stocks and provides case studies of" + "\n");
         HttpContext.Current.Response.Write("				markets where gorillas have been born. Moore and his coauthors put their ideas" + "\n");
         HttpContext.Current.Response.Write("				to the test in the final chapter and pick a portfolio of stocks that they" + "\n");
         HttpContext.Current.Response.Write("				believe have the potential to become winners in the gorilla game. The result is" + "\n");
         HttpContext.Current.Response.Write("				a highly perceptive investment guide that anyone who's a fan of Moore's earlier" + "\n");
         HttpContext.Current.Response.Write("				work will find exciting and profitable. Highly recommended.</p>" + "\n");
         HttpContext.Current.Response.Write("		</table>" + "\n");
      }
   }
}
}
