private decimal GetDeliveryChargeByWeight(string countryCode, decimal weight) { try { using (SpHandler sph = new SpHandler("getDeliveryChargeByWeight", new SqlParameter("@countrycode", countryCode), new SqlParameter("@weight", weight))) { object o = sph.ExecuteScalar(); if (o != null) { return Convert.ToDecimal(o); } } } catch (Exception e) { LogManager.GetLogger(GetType()).Error(e); } return 0; }
private decimal GetProductPriceChange(long productID) { try { using (SpHandler sph = new SpHandler("getProductPriceChange", new SqlParameter("@productID", productID))) { object o = sph.ExecuteScalar(); if (o != null) { return Convert.ToDecimal(o); } } } catch (Exception e) { LogManager.GetLogger(GetType()).Error(e); } return 0; }
public void SaveProductPriceChange(long productID, decimal price) { try { using (SpHandler sph = new SpHandler("saveProductPriceChange", new SqlParameter("@productID", productID), new SqlParameter("@newPrice", price))) { object o = sph.ExecuteScalar(); } } catch (Exception e) { LogManager.GetLogger(GetType()).Error(e); } }