From e456109208e8f498b6de53a751193e5cfb796834 Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Wed, 15 Mar 2023 09:15:50 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E6=8F=90=E5=8D=87MyBookingList=20?= =?UTF-8?q?=E6=95=88=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowEasy/BookingMaintain_QryService.cs | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_QryService.cs index 2eb4e43..e721dc9 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_QryService.cs @@ -753,7 +753,6 @@ namespace EasyBL.WEBAPP.SYS var rsSupplierDic = sm_qry.FindAllByIDsAsDictionary(sLanguageID); FileMaintain_QryService fm_qry = new FileMaintain_QryService(); - var ImageDic = fm_qry.FindAllImageURLAsDic(""); var AllFileDic = fm_qry.FindAllByIDsAsDictionary(""); PaymentMaintain_QryService pm_qry = new PaymentMaintain_QryService(); @@ -789,12 +788,8 @@ namespace EasyBL.WEBAPP.SYS rsService.ServiceID = Service.ServiceID; rsService.ServiceName = Service.ServiceName; - - if (ImageDic.ContainsKey(Service.PreviewFile)) { - - rsService.Logo = ImageDic[Service.PreviewFile]; - - } + var ServiceLogoPath = AllFileDic.Values.Where(w => w.ParentID == Service.PreviewFile).Select(s => s.FilePath).FirstOrDefault(); + rsService.Logo = SEFileService.FilePathToURL(ServiceLogoPath); //rsService.BoothNo = ""; @@ -817,12 +812,8 @@ namespace EasyBL.WEBAPP.SYS Provider.ProviderName = rsSupplier.CompanyName; Provider.ProviderStatus = Booking.SupplierStatus; - if (ImageDic.ContainsKey(rsSupplier.LogoFile)) - { - - Provider.Logo = ImageDic[rsSupplier.LogoFile]; - - } + var ProviderLogoPath = AllFileDic.Values.Where(w => w.ParentID == rsSupplier.LogoFile).Select(s => s.FilePath).FirstOrDefault(); + Provider.Logo = SEFileService.FilePathToURL(ProviderLogoPath); rsService.Provider = Provider; @@ -873,8 +864,6 @@ namespace EasyBL.WEBAPP.SYS // set Contact - System.Diagnostics.Debug.WriteLine("payment count: " + PaymentDic.Count); - // set Payment if (PaymentDic.Count > 0) { @@ -889,16 +878,15 @@ namespace EasyBL.WEBAPP.SYS if (!string.IsNullOrEmpty(Payment.Remittance)) { - if (ImageDic.ContainsKey(Payment.Remittance)) - { - rsPayment.Remittance = ImageDic[Payment.Remittance]; - rsPayment.RemittanceFileName = AllFileDic.Values.Where(w => w.ParentID == Payment.Remittance).Select(s => s.FileName).FirstOrDefault(); - } + var RemittanceFile = AllFileDic.Values.Where(w => w.ParentID == Payment.Remittance).FirstOrDefault(); + if (RemittanceFile != null) { + rsPayment.Remittance = SEFileService.FilePathToURL(RemittanceFile.FilePath); + rsPayment.RemittanceFileName = RemittanceFile.FileName; + } + } - - if (!string.IsNullOrEmpty(Payment.CurrencyID)) { CurrencyDTO PaymentCurrency = new CurrencyDTO();