Table of Contents

Class Country

Namespace
Dynamicweb.Ecommerce.International
Assembly
Dynamicweb.Ecommerce.dll
Represents a country.
[Serializable]
public class Country : ICloneable
Inheritance
Country
Implements
Inherited Members

Constructors

Country()

Initializes a new instance of the class.
public Country()

Country(IDataReader)

Initializes a new instance of the class.
[Obsolete("Is not used")]
public Country(IDataReader dataReader)

Parameters

dataReader IDataReader
The data reader.

Properties

AddressDisplayFormat

Gets or sets the display format
public string AddressDisplayFormat { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

AddressDisplayFormatMode

Gets or sets the display format mode
public AddressFormatMode AddressDisplayFormatMode { get; set; }

Property Value

AddressFormatMode

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

AddressEditFormat

Gets or sets the edit format
public string AddressEditFormat { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

AddressEditFormatMode

Gets or sets the edit format mode
public AddressFormatMode AddressEditFormatMode { get; set; }

Property Value

AddressFormatMode

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

Code2

Gets or sets the two-character code.
public string Code2 { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

Code3

Gets or sets the three-character code.
public string Code3 { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

CountryText

Gets or sets the country text.
[Obsolete("Is not used")]
public CountryText CountryText { get; set; }

Property Value

CountryText

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

CultureInfo

Gets or sets the culture information.
public string CultureInfo { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

CurrencyCode

Gets or sets the currency code.
public string CurrencyCode { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

LanguageId

Gets or sets the language id.
[Obsolete("Use Translations")]
public string LanguageId { get; set; }

Property Value

string

Name

Gets or sets the country name
[Obsolete("Use GetName")]
public string Name { get; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

Number

Gets or sets the number.
public int Number { get; set; }

Property Value

int

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

RegionCode

Gets or sets the region code.
public string RegionCode { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

Regions

Gets or sets the regions.
public CountryCollection Regions { get; }

Property Value

CountryCollection

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

ReverseChargeForVat

Gets or sets the reverse VAT
public bool ReverseChargeForVat { get; set; }

Property Value

bool

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

Translations

Gets the translations for the current entity
public TranslationCollection<CountryTranslation> Translations { get; }

Property Value

TranslationCollection<CountryTranslation>

Vat

Gets or sets the VAT
public double Vat { get; set; }

Property Value

double

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

VatPostingGroup

Gets or sets the VAT Posting Group
public string VatPostingGroup { get; set; }

Property Value

string

Exceptions

ReadOnlyException
Setter throws this exception when the current instance is in the read only mode.

Methods

ClearCache()

Clears cached countries.
[Obsolete("Use Ecommerce.Services.Countries.ClearCache() instead")]
public static void ClearCache()

Clone()

Creates a new instance of a class with the same value as an existing instance.
public object Clone()

Returns

object

Remarks

Method performs a deep copy of all properties except the IsReadOnly and LanguageId properties. IsReadOnly property always is set to False. LanguageId property always is set to Nothing.

Create(string)

Creates country.
[Obsolete("Use Ecommerce.Services.Countries.GetCountry(countryCode) instead")]
public static Country Create(string countryCode)

Parameters

countryCode string
The base country.

Returns

Country
A new country.

Delete()

Deletes this instance.
[Obsolete("Use Ecommerce.Services.Countries.DeleteRegion(Code2, RegionCode) instead")]
public void Delete()

Delete(string)

Deletes an instance with the specified parameters.
[Obsolete("Use Ecommerce.Services.Countries.Delete(Code2) instead")]
public static void Delete(string code2)

Parameters

code2 string
The two-character code.

DeleteRegion(string, string)

Deletes an instance with the specified parameters.
[Obsolete("Use Ecommerce.Services.Countries.DeleteRegion(Code2, RegionCode) instead")]
public static void DeleteRegion(string code2, string regionCode)

Parameters

code2 string
The two-character code.
regionCode string
The region code.

GetAvailableLanguageIds()

Makes this instance to read only.
[Obsolete("Use Translations.LanguageIds")]
public IEnumerable<string> GetAvailableLanguageIds()

Returns

IEnumerable<string>

GetCountries()

Gets the countries.
[Obsolete("Use Ecommerce.Services.Countries.GetCountries() instead")]
public static CountryCollection GetCountries()

Returns

CountryCollection
A collection of the Country.

GetCountries(string)

Gets the countries.
[Obsolete("Use Ecommerce.Services.Countries.GetCountry(countryCode) instead")]
public static CountryCollection GetCountries(string countryCode)

Parameters

countryCode string

Returns

CountryCollection
A collection of the Country.

GetCountryTextByDefaultLanguage()

Gets the country text.
[Obsolete("Use GetName instead")]
public string GetCountryTextByDefaultLanguage()

Returns

string
The country text.

GetDisplayAddress(CountryAddressInfo)

Gets the display address according to the address format information for specific country
public static List<string> GetDisplayAddress(CountryAddressInfo addressInfo)

Parameters

addressInfo CountryAddressInfo
Address information

Returns

List<string>

GetDisplayAddress(string)

Gets the display address according to the address format information for specific country
public static List<List<string>> GetDisplayAddress(string countryCode)

Parameters

countryCode string
2 letter country code

Returns

List<List<string>>

GetEditAddress(CountryAddressInfo)

Gets the edit address data according to the address format information for specific country
public static List<AddressFormatEditRow> GetEditAddress(CountryAddressInfo addressInfo)

Parameters

addressInfo CountryAddressInfo
Address information

Returns

List<AddressFormatEditRow>

GetEditAddress(string)

Gets the edit address data according to the address format information for specific country
public static List<List<string>> GetEditAddress(string countryCode)

Parameters

countryCode string
2 letter country code

Returns

List<List<string>>

GetLocalizedName(string)

[Obsolete("Use GetName")]
public string GetLocalizedName(string languageId)

Parameters

languageId string

Returns

string

GetName(string)

Gets the translated name in specified language
public string GetName(string languageId)

Parameters

languageId string

Returns

string

GetRegions()

Returns countries in the ISO format
[Obsolete("Use GlobalISO.GetRegions() instead")]
public static List<RegionInfo> GetRegions()

Returns

List<RegionInfo>

GetRegions(string)

Gets the regions.
[Obsolete("Use Ecommerce.Services.Countries.GetRegions(countryCode) instead")]
public static CountryCollection GetRegions(string countryCode)

Parameters

countryCode string
The country code.

Returns

CountryCollection
A collection of the Country.

Save(string)

Saves an instance with the specified parameters.
[Obsolete("Use Ecommerce.Services.Countries.Save(country) instead")]
public void Save(string code2)

Parameters

code2 string
The two-digit code.

SetLocalizedName(string, string)

[Obsolete("Use SetName")]
public void SetLocalizedName(string languageId, string name)

Parameters

languageId string
name string

SetName(string, string)

Sets the translated name in specified language
public void SetName(string languageId, string name)

Parameters

languageId string
name string

SetProperties(Country)

Sets the class properties.
[Obsolete("Is not used")]
public void SetProperties(Country country)

Parameters

country Country
The country.

UpdateId(string, string)

Updates two-character code.
[Obsolete("Use Ecommerce.Services.Countries.UpdateCountryCode(oldCode2, newCode2) instead")]
public static void UpdateId(string oldCode2, string newCode2)

Parameters

oldCode2 string
The old two-character code.
newCode2 string
The new two-character code.

UpdateRelationTables(string, string)

Updates relations.
[Obsolete("Use Ecommerce.Services.Countries.UpdateCountryCode(oldCode2, newCode2) instead")]
public static void UpdateRelationTables(string oldCode2, string newCode2)

Parameters

oldCode2 string
The old two-character code.
newCode2 string
The new two-character code.
To top