protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int id = Convert.ToInt32(Request.QueryString["Id"]); ProductCategory category = categoryManager.GetProductCategoryById(id); LoadFormWithProductCategory(category); } }
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); } }
public ProductCategory GetProductCategoryById(int id) { var productCategoryManager = new ProductCategoryManager(); return(productCategoryManager.GetProductCategoryById(id).ToServiceProductCategory()); }