public void CopyStaticDataFrom(PopulationDataEntry iValue) { Geocode = iValue.Geocode; GeocodeOfCorrespondingTambon = iValue.GeocodeOfCorrespondingTambon; if (!String.IsNullOrEmpty(iValue.English)) { English = iValue.English; } foreach (Int32 i in iValue.GeocodeParent) { GeocodeParent.Add(i); } if (EntityTypeHelper.IsCompatibleEntityType(Type, EntityType.Tambon)) { var lVillageList = new List <EntityType>() { EntityType.Muban }; if ((iValue.NrOfEntities(lVillageList) > 0) & (this.NrOfEntities(lVillageList) == 0)) { foreach (PopulationDataEntry lVillage in iValue.SubEntities) { if (EntityTypeHelper.IsCompatibleEntityType(lVillage.Type, EntityType.Muban)) { this.SubEntities.Add((PopulationDataEntry)lVillage.Clone()); } } } } }
public void CopyStaticDataFrom(PopulationDataEntry iValue) { Geocode = iValue.Geocode; GeocodeOfCorrespondingTambon = iValue.GeocodeOfCorrespondingTambon; if ( !String.IsNullOrEmpty(iValue.English) ) { English = iValue.English; } foreach ( Int32 i in iValue.GeocodeParent ) { GeocodeParent.Add(i); } if ( EntityTypeHelper.IsCompatibleEntityType(Type, EntityType.Tambon) ) { var lVillageList = new List<EntityType>() { EntityType.Muban }; if ( (iValue.NrOfEntities(lVillageList) > 0) & (this.NrOfEntities(lVillageList) == 0) ) { foreach ( PopulationDataEntry lVillage in iValue.SubEntities ) { if ( EntityTypeHelper.IsCompatibleEntityType(lVillage.Type, EntityType.Muban) ) { this.SubEntities.Add((PopulationDataEntry)lVillage.Clone()); } } } } }