diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs index c9627c2..e6e8642 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs @@ -1173,18 +1173,18 @@ namespace EasyBL.WEBAPP.SYS var Dic = new Dictionary(); - if (CountryExhibDic[Location.CountryID].Count > 0) - { - Dic = CountryExhibDic[Location.CountryID]; + if (!CountryExhibDic.ContainsKey(Location.CountryID)) { + CountryExhibDic[Location.CountryID] = Dic; } + Dic = CountryExhibDic[Location.CountryID]; + Dic[Location.CountryID] = ExhibitionID; CountryExhibDic[Location.CountryID] = Dic; - // do something with entry.Value or entry.Key } - var CountryIDList = CountryExhibDic.Values.OrderBy(o => o.Count).Take(iCount).ToList(); + var CountryIDList = CountryExhibDic.Values.OrderBy(o => o.Count).ToList().Take(iCount); CountryMaintain_QryService cm_qry = new CountryMaintain_QryService(); var CountryDic = cm_qry.FindAllByIDsAsDictionary(sLanguageID, "", ""); @@ -1195,15 +1195,17 @@ namespace EasyBL.WEBAPP.SYS var CountryID = entry.Keys.FirstOrDefault(); CountryDTO Country = new CountryDTO(); + Country.CityList = null; + Country.CityDic = null; Country.CountryID = CountryDic[CountryID].CountryID; Country.CountryName = CountryDic[CountryID].CountryName; rsCountryList.Add(Country); - return rsCountryList; - } + return rsCountryList; + } while (false); } catch (Exception ex)