private bool Update() { return(DBShippingTableRate.Update( this.shippingTableRateID, this.shippingMethodID, this.geoZoneGuid, this.fromValue, this.shippingFee, this.additionalValue, this.additionalFee, this.freeShippingOverXValue)); }
private void GetShippingTableRate(int shippingTableRateId) { using (IDataReader reader = DBShippingTableRate.GetOne(shippingTableRateId)) { if (reader.Read()) { this.shippingTableRateID = Convert.ToInt32(reader["ShippingTableRateID"]); this.shippingMethodID = Convert.ToInt32(reader["ShippingMethodID"]); this.geoZoneGuid = new Guid(reader["GeoZoneGuid"].ToString()); this.fromValue = Convert.ToDecimal(reader["FromValue"]); this.shippingFee = Convert.ToDecimal(reader["ShippingFee"]); this.additionalValue = Convert.ToDecimal(reader["AdditionalValue"]); this.additionalFee = Convert.ToDecimal(reader["AdditionalFee"]); this.freeShippingOverXValue = Convert.ToDecimal(reader["FreeShippingOverXValue"]); } } }
public static ShippingTableRate GetOneMaxValue(int shippingMethodId, decimal fromValue, string geoZoneGuids) { if (string.IsNullOrEmpty(geoZoneGuids)) { geoZoneGuids = null; } IDataReader reader = DBShippingTableRate.GetOneMaxValue(shippingMethodId, fromValue, geoZoneGuids); var lstTableRates = LoadListFromReader(reader); if (lstTableRates.Count > 0) { return(lstTableRates[0]); } return(null); }
/// <summary> /// Persists a new instance of ShippingTableRate. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { int newID = 0; newID = DBShippingTableRate.Create( this.shippingMethodID, this.geoZoneGuid, this.fromValue, this.shippingFee, this.additionalValue, this.additionalFee, this.freeShippingOverXValue); this.shippingTableRateID = newID; return(newID > 0); }
public static List <ShippingTableRate> GetByMethod(int shippingMethodId) { IDataReader reader = DBShippingTableRate.GetByMethod(shippingMethodId); return(LoadListFromReader(reader, true)); }
public static bool DeleteByMethod(int shippingMethodId) { return(DBShippingTableRate.DeleteByMethod(shippingMethodId)); }
public static bool Delete(int shippingTableRateId) { return(DBShippingTableRate.Delete(shippingTableRateId)); }