public static bool StoreProductExists(int store_id, string product_code) { SBTableProduct tp = new SBTableProduct(); Hashtable prod = tp.getRow(string.Format("store_id = {0} AND product_code = '{1}'", store_id, product_code.Trim())); return((prod == null || prod.Count <= 0) ? false : true); }
/// <summary> /// Gets the store product. /// </summary> /// <returns> /// The store product. /// A <see cref="SBProduct"/> /// </returns> /// <param name='store_id'> /// Store_id. /// </param> /// <param name='product_code'> /// Product_code. /// </param> public static SBProduct GetStoreProduct(int store_id, string product_code) { SBTableProduct tp = new SBTableProduct(); Hashtable prod = tp.getRow(string.Format("store_id = {0} AND product_code = '{1}'", store_id, product_code.Trim())); if (prod == null) { return(null); } SBProduct product = new SBProduct(); product.SetDbData(prod); product.GetDbMeta(); return(product); }