diff --git a/Logic/Structure/Geography.cs b/Logic/Structure/Geography.cs index 4be8f292..17109730 100644 --- a/Logic/Structure/Geography.cs +++ b/Logic/Structure/Geography.cs @@ -113,13 +113,11 @@ namespace Activizr.Logic.Structure get { return Children.Identities; } } - [NonSerialized] // interface cannot be serialized public ITreeNodeObject ParentObject { get { return this.Parent; } } - [NonSerialized] // interface cannot be serialized public List ChildObjects { get diff --git a/Site5/Automation/GetGeographyData.asmx b/Site5/Automation/GetGeographyData.asmx index 2d30d134..c8f2bb2d 100644 --- a/Site5/Automation/GetGeographyData.asmx +++ b/Site5/Automation/GetGeographyData.asmx @@ -4,6 +4,8 @@ using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; +using Activizr.Basic.Types; +using Activizr.Database; using Activizr.Logic.Structure; [WebService(Namespace = "http://activizr.com/")] @@ -36,16 +38,16 @@ public class GetGeographyData : System.Web.Services.WebService { } [WebMethod] - public Geographies GetGeographiesFromRoot (int rootId) + public BasicGeography[] GetGeographiesFromRoot (int rootId) { - return Geography.FromIdentity(rootId).GetTree(); + return PirateDb.GetDatabase().GetGeographyTree(rootId); } [WebMethod] - public Geographies GetGeographiesForCountry (string countryCode) + public BasicGeography[] GetGeographiesForCountry (string countryCode) { Country country = Country.FromCode(countryCode); - return GetGeographiesFromRoot(country.GeographyId); + return PirateDb.GetDatabase().GetGeographyTree(country.GeographyId); } } \ No newline at end of file