From f6face26c716c11f7876a9987c5e740d8467297d Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Fri, 10 Feb 2023 16:44:15 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E5=A2=9E=E5=8A=A0=E5=B1=95=E8=A6=BD?= =?UTF-8?q?=E4=B8=BB=E8=BE=A6=E5=96=AE=E4=BD=8DAPI=E5=9B=9E=E5=82=B3?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowEasy/ExhibMaintain_QryService.cs | 21 ++++++++ .../ShowEasy/OrganizerMaintain_QryService.cs | 48 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs index 44fa7ff..d882813 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs @@ -1337,6 +1337,9 @@ namespace EasyBL.WEBAPP.SYS VenueMaintain_QryService vm_qry = new VenueMaintain_QryService(); var VenueDic = vm_qry.FindAllByIDsAsDictionary(sLanguageID); + OrganizerMaintain_QryService om_qry = new OrganizerMaintain_QryService(); + var OrganizerDic = om_qry.FindAllByIDsAsDictionary(sLanguageID, ""); + ExhibStatMaintain_QryService esm_qry = new ExhibStatMaintain_QryService(); foreach (var Exhibition in ExhibitionList) { @@ -1440,12 +1443,30 @@ namespace EasyBL.WEBAPP.SYS VenueDTO rsVenue = new VenueDTO(); rsVenue.VenueID = Venue.VenueID; rsVenue.VenueName = Venue.VenueName; + rsVenue.Address = Venue.Address; rsExhibition.Venues.Add(rsVenue); } } + if (!string.IsNullOrEmpty(ExhibInfo.OrganizerIDs)) + { + + List OrganizerIDList = JsonConvert.DeserializeObject>(ExhibInfo.OrganizerIDs); + + foreach (var OrganizerID in OrganizerIDList) + { + var Organizer = OrganizerDic[OrganizerID]; + OrganizerDTO rsOrganizer = new OrganizerDTO(); + rsOrganizer.OrganizerID = Organizer.OrganizerID; + rsOrganizer.OrganizerName = Organizer.OrganizerName; + + rsExhibition.Organizers.Add(rsOrganizer); + } + + } + } if (Location != null) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs index 9708d7e..21f4030 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs @@ -288,6 +288,54 @@ namespace EasyBL.WEBAPP.ShowEasy #endregion 主辦單位管理(以ID查詢) + #region 主辦單位管理(以ID查詢) + + /// 主辦單位管理(以ID查詢) + /// + /// + /// + /// + + public Dictionary FindAllByIDsAsDictionary(string sLanguageID, string sOrganizerID) + { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + Dictionary rsOrganizerDic = new Dictionary(); + + try + { + do + { + + if (string.IsNullOrEmpty(sLanguageID)) { + sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE; + } + + var rsOrganizer = db.Queryable() + .WhereIF(!string.IsNullOrEmpty(sOrganizerID), (t1) => t1.OrganizerID == sOrganizerID) + .Where((t1) => t1.LangType == sLanguageID) + .ToList(); + + foreach (var Organizer in rsOrganizer) { + rsOrganizerDic[Organizer.OrganizerID] = Organizer; + } + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + } + + return rsOrganizerDic; + + } + + #endregion 主辦單位管理(以ID查詢) + } } \ No newline at end of file