/// <summary> /// Updates the ShippingByWeightAndCountry /// </summary> /// <param name="ShippingByWeightAndCountryID">The ShippingByWeightAndCountry identifier</param> /// <param name="ShippingMethodID">The shipping method identifier</param> /// <param name="CountryID">The country identifier</param> /// <param name="From">The "from" value</param> /// <param name="To">The "to" value</param> /// <param name="UsePercentage">A value indicating whether to use percentage</param> /// <param name="ShippingChargePercentage">The shipping charge percentage</param> /// <param name="ShippingChargeAmount">The shipping charge amount</param> /// <returns>ShippingByWeightAndCountry</returns> public static ShippingByWeightAndCountry UpdateShippingByWeightAndCountry(int ShippingByWeightAndCountryID, int ShippingMethodID, int CountryID, decimal From, decimal To, bool UsePercentage, decimal ShippingChargePercentage, decimal ShippingChargeAmount) { DBShippingByWeightAndCountry dbItem = DBProviderManager <DBShippingByWeightAndCountryProvider> .Provider.UpdateShippingByWeightAndCountry(ShippingByWeightAndCountryID, ShippingMethodID, CountryID, From, To, UsePercentage, ShippingChargePercentage, ShippingChargeAmount); ShippingByWeightAndCountry shippingByWeightAndCountry = DBMapping(dbItem); return(shippingByWeightAndCountry); }
/// <summary> /// Gets a ShippingByWeightAndCountry /// </summary> /// <param name="ShippingByWeightAndCountryID">ShippingByWeightAndCountry identifier</param> /// <returns>ShippingByWeightAndCountry</returns> public static ShippingByWeightAndCountry GetByID(int ShippingByWeightAndCountryID) { if (ShippingByWeightAndCountryID == 0) { return(null); } DBShippingByWeightAndCountry dbItem = DBProviderManager <DBShippingByWeightAndCountryProvider> .Provider.GetByID(ShippingByWeightAndCountryID); ShippingByWeightAndCountry shippingByWeightAndCountry = DBMapping(dbItem); return(shippingByWeightAndCountry); }
private static ShippingByWeightAndCountry DBMapping(DBShippingByWeightAndCountry dbItem) { if (dbItem == null) { return(null); } var item = new ShippingByWeightAndCountry(); item.ShippingByWeightAndCountryId = dbItem.ShippingByWeightAndCountryId; item.ShippingMethodId = dbItem.ShippingMethodId; item.CountryId = dbItem.CountryId; item.From = dbItem.From; item.To = dbItem.To; item.UsePercentage = dbItem.UsePercentage; item.ShippingChargePercentage = dbItem.ShippingChargePercentage; item.ShippingChargeAmount = dbItem.ShippingChargeAmount; return(item); }