private void loadProducts() { IProductBussinessService productBussinessService = null; DataTable productTable = null; try { if (Cache["Products"] == null) { productBussinessService = BizDelegateFactory.Current.ProductBussinessService; productTable = productBussinessService.RetreiveAllProducts(); SqlCacheDependency productCache = new SqlCacheDependency("SpencersDB", "Products"); Cache.Insert("Products", productTable, productCache); } } catch (Exception ex) { CommonLabel.Text = ex.Message; CommonLabel.ForeColor = Color.Red; } finally { productBussinessService = null; } }
public static string[] GetCompletionList(string prefixText, int count) { IProductBussinessService productBussinessService = null; try { productBussinessService = BizDelegateFactory.Current.ProductBussinessService; return(productBussinessService.RetreiveAllProduct(prefixText, count)); } catch (Exception ex) { throw; } finally { productBussinessService = null; } }