protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = Convert.ToInt32(Request.QueryString["Id"]);

                ProductCategory category = categoryManager.GetProductCategoryById(id);

                LoadFormWithProductCategory(category);
            }
        }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Int16 categoryId = 0;

        if (Int16.TryParse(QueryStringParamID, out categoryId))
        {
            ProductCategories productCategory = productCategoryManager.GetProductCategoryById(categoryId);
            if (productCategory != null)
            {
                ltCategoryName.Text = productCategory.Name;
            }
            BindProducts(categoryId);
        }
    }
Esempio n. 3
0
        public ProductCategory GetProductCategoryById(int id)
        {
            var productCategoryManager = new ProductCategoryManager();

            return(productCategoryManager.GetProductCategoryById(id).ToServiceProductCategory());
        }