private void SaveProductDetails() { Product obj = retriveValuesFromControls(); productProcess process = new productProcess(); process.UpdateProduct1(obj); }
private void FetchProductDate() { if (Cache["productList"] == null) //Hashtable { try { productProcess process = new productProcess(); // var list = process.GetProductSearchProcess(txtSearch.Text); var list = process.GetProducts(txtSearch.Text); Cache["productList"] = list; this.grid1.DataSource = list; this.grid1.DataBind(); } catch (Exception) { throw; } } else { var list = Cache["productList"] as List <Product>; this.grid1.DataSource = list; this.grid1.DataBind(); } }
private void LoadProductDetails() { int productId = Convert.ToInt32("0" + Request.QueryString["id"]); if (productId != 0) { productProcess process = new productProcess(); var item = process.GetProduct(productId); AssignValuesToTextBoxes(item[0]); } }