using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace ProductLookupDemo
{
    public static class ProductSearch
    {
        private static Products products;

        static ProductSearch()
        {
            products = new Products();
            products.Add("200", new ProductDetail("200", "Czarny kontroler konsoli XBox", 50));
            
        }

        public static ProductDetail Lookup(string productNumber)
        {
            //ProductDetail productDetail = null;
            //products.TryGetValue(productNumber, out productDetail);
            //return productDetail;

            return new ProductDetail(productNumber, "Czarny kontroler konsoli XBox", 50);


        }

        public static ProductDetail Lookup(SearchCriteria criteria)
        {
            return new ProductDetail(criteria.ProductNumber, "Czarny kontroler konsoli XBox", 50);
        }
    }
}
