Exemplo n.º 1
0
        public Dictionary <String, EntityLeader> NewGovernorsList()
        {
            Dictionary <String, EntityLeader> RetVal        = new Dictionary <String, EntityLeader>();
            List <PopulationDataEntry>        lFoundEntries = new List <PopulationDataEntry>();

            foreach (PopulationDataEntry lEntry in mData)
            {
                lEntry.Geocode = TambonHelper.GetGeocode(lEntry.Name);
                PopulationData lData = TambonHelper.GetGeocodeList(lEntry.Geocode);
                lEntry.English = lData.Data.English;
                foreach (EntityOffice lOffice in lEntry.Offices)
                {
                    foreach (EntityLeader lLeader in lOffice.OfficialsList)
                    {
                        if (lLeader.Position == EntityLeaderType.Governor)
                        {
                            if (lData.Data.LeaderAlreadyInList(lLeader))
                            {
                                lFoundEntries.Add(lEntry);
                            }
                            else
                            {
                                RetVal.Add(lEntry.English, lLeader);
                            }
                        }
                    }
                }
            }
            foreach (PopulationDataEntry lEntry in lFoundEntries)
            {
                mData.Remove(lEntry);
            }
            return(RetVal);
        }
Exemplo n.º 2
0
 internal void CalcGeocode()
 {
     // Should include Tambon
     _geocode = TambonHelper.GetGeocode(Changwat, Amphoe, EntityType.Amphoe);
 }
Exemplo n.º 3
0
 internal void CalcGeocode()
 {
     // Tambon eigentlich auch
     mGeocode = TambonHelper.GetGeocode(Changwat, Amphoe, EntityType.Amphoe);
 }
Exemplo n.º 4
0
        public Int32 Geocode()
        {
            Int32 amphoeID = TambonHelper.GetGeocode(ChangwatName, AmphoeName, EntityType.Amphoe);

            return(amphoeID);
        }