Class Rounding
- Namespace
- Dynamicweb.Ecommerce.Prices
- Assembly
- Dynamicweb.Ecommerce.dll
Represents the methods for rounding of sums.
[Serializable]
public class Rounding
- Inheritance
-
Rounding
- Inherited Members
Constructors
Rounding()
Initializes a new instance of the Rounding class.
public Rounding()
Rounding(IDataReader)
Initializes a new instance of the Rounding class.
[Obsolete("Use Services.Roundings instead.")]
public Rounding(IDataReader DataReader)
Parameters
DataReader
IDataReader- The data reader.
Properties
Decimals
Gets or sets the decimals.
public int Decimals { get; set; }
Property Value
Id
Gets or sets the id.
public string Id { get; set; }
Property Value
Method
Gets or sets the method.
public int Method { get; set; }
Property Value
ModDecimalCorrection
Gets or sets the mod decimal correction.
public int ModDecimalCorrection { get; set; }
Property Value
ModDecimalPart
Gets or sets the mod decimal part.
public int ModDecimalPart { get; set; }
Property Value
ModIntegerCorrection
Gets or sets the mod integer correction.
public int ModIntegerCorrection { get; set; }
Property Value
ModIntegerPart
Gets or sets the mod integer part.
public int ModIntegerPart { get; set; }
Property Value
Name
Gets or sets the name.
public string Name { get; set; }
Property Value
Methods
ClearCache()
Clears the cache.
[Obsolete("Use Services.Roundings.ClearCache instead.")]
public static void ClearCache()
Delete()
Deletes this instance.
[Obsolete("Use Services.Roundings.Delete instead.")]
public void Delete()
Delete(string)
Deletes the specified Rounding object from DB.
[Obsolete("Use Services.Roundings.Delete instead.")]
public void Delete(string id)
Parameters
id
string- DB field name is RoundingID.
GetRoundingById(string)
Gets the rounding by identifier.
[Obsolete("Use Services.Roundings.GetRoundingById instead.")]
public static Rounding GetRoundingById(string id)
Parameters
id
string- The identifier.
Returns
Remarks
This method uses caching.
GetRoundings()
Gets the collection of Rounding objects.
[Obsolete("Use Services.Roundings.GetRoundings instead.")]
public static RoundingCollection GetRoundings()
Returns
- RoundingCollection
- The collection of Rounding objects
Round(double)
Rounds the specified value. If Method = 0 return the value.
public double Round(double value)
Parameters
value
double- The value.
Returns
- double
- The rounded value.
Save(string)
Saves the specified Rounding object into DB.
[Obsolete("Use Services.Roundings.Save instead.")]
public void Save(string id)
Parameters
id
string- DB field name is RoundingID.