Browse Source

[WHAT] 提升MyBookingList 效能

Dev
berlin-tzen 2 years ago
parent
commit
e456109208
  1. 32
      EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_QryService.cs

32
EuroTran/EasyBL.WEBAPP/ShowEasy/BookingMaintain_QryService.cs

@ -753,7 +753,6 @@ namespace EasyBL.WEBAPP.SYS
var rsSupplierDic = sm_qry.FindAllByIDsAsDictionary(sLanguageID); var rsSupplierDic = sm_qry.FindAllByIDsAsDictionary(sLanguageID);
FileMaintain_QryService fm_qry = new FileMaintain_QryService(); FileMaintain_QryService fm_qry = new FileMaintain_QryService();
var ImageDic = fm_qry.FindAllImageURLAsDic("");
var AllFileDic = fm_qry.FindAllByIDsAsDictionary(""); var AllFileDic = fm_qry.FindAllByIDsAsDictionary("");
PaymentMaintain_QryService pm_qry = new PaymentMaintain_QryService(); PaymentMaintain_QryService pm_qry = new PaymentMaintain_QryService();
@ -789,12 +788,8 @@ namespace EasyBL.WEBAPP.SYS
rsService.ServiceID = Service.ServiceID; rsService.ServiceID = Service.ServiceID;
rsService.ServiceName = Service.ServiceName; 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 = ""; //rsService.BoothNo = "";
@ -817,12 +812,8 @@ namespace EasyBL.WEBAPP.SYS
Provider.ProviderName = rsSupplier.CompanyName; Provider.ProviderName = rsSupplier.CompanyName;
Provider.ProviderStatus = Booking.SupplierStatus; 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; rsService.Provider = Provider;
@ -873,8 +864,6 @@ namespace EasyBL.WEBAPP.SYS
// set Contact // set Contact
System.Diagnostics.Debug.WriteLine("payment count: " + PaymentDic.Count);
// set Payment // set Payment
if (PaymentDic.Count > 0) { if (PaymentDic.Count > 0) {
@ -889,16 +878,15 @@ namespace EasyBL.WEBAPP.SYS
if (!string.IsNullOrEmpty(Payment.Remittance)) { 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)) { if (!string.IsNullOrEmpty(Payment.CurrencyID)) {
CurrencyDTO PaymentCurrency = new CurrencyDTO(); CurrencyDTO PaymentCurrency = new CurrencyDTO();

Loading…
Cancel
Save