From 1d639d1fc267cbb08598407ef9cd9a362a91aac9 Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Fri, 3 Feb 2023 16:19:55 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E5=A2=9E=E5=8A=A0=E5=B1=95=E8=A6=BD?= =?UTF-8?q?=E6=9C=80=E5=A4=9A=E5=9C=8B=E5=AE=B6=E6=9F=A5=E8=A9=A2API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowEasy/ExhibMaintain_QryService.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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)