public static bool Get(int Country_num, ref tnr[] tax_rates) { tax_rates = null; Tax_Rates_by_Country_List country_ISO_3166_list = new Tax_Rates_by_Country_List(); foreach (Tax_Rates_by_Country taxc in country_ISO_3166_list.item) { if (taxc.Country_Code_ISO_3166 == Country_num) { if (taxc.rates != null) { tax_rates = new tnr[taxc.rates.Length]; int i = 0; for (i=0;i< tax_rates.Length;i++) { tax_rates[i] = taxc.rates[i].Clone(); if (Get(tax_rates[i].Name, tax_rates[i].Rate, ref tax_rates[i].Taxation_ID)) { continue; } else { return false; } } } } } return true; }
public tnr Clone() { tnr new_tnr = new tnr(); new_tnr.Name = this.Name; new_tnr.Rate = this.Rate; new_tnr.Taxation_ID = this.Taxation_ID; return new_tnr; }
public Tax_Rates_by_Country(string xCountryName,int xCountry_Code_ISO_3166, tnr[] xrates) { Country_Name = xCountryName; Country_Code_ISO_3166 = xCountry_Code_ISO_3166; rates = xrates; }