Exemple #1
0
        public EditProduct()
        {
            storeProductRep = new StoreProductRepository();
            storeAnimeRep   = new StoreAnimeRepository();
            storeColorRep   = new StoreColorRepository();

            long productID = 0;

            if (!string.IsNullOrEmpty(HttpContext.Current.Request["ProductID"]))
            {
                productID = MyCommon.ToLong(HttpContext.Current.Request["ProductID"]);
            }
            if (productID > 0)
            {
                _product = storeProductRep.GetProductByID(productID);
                if (_product == null)
                {
                    HttpContext.Current.Response.Redirect("ProductList.aspx");
                }
            }
        }